R1: interface FastEthernet0/0 ip address 192.168.12.1 255.255.255.0 duplex auto speed auto ip route 192.168.23.0 255.255.255.0 192.168.12.2 ip route 192.168.34.0 255.255.255.0 192.168.23.3
| R1#show ip route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, FastEthernet0/0 S 192.168.23.0/24 [1/0] via 192.168.12.2 S 192.168.34.0/24 [1/0] via 192.168.23.3
| R2: interface FastEthernet0/0 ip address 192.168.12.2 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.23.2 255.255.255.0 duplex auto speed auto ip route 192.168.34.0 255.255.255.0 192.168.23.3
| R2#show ip route
Gateway of last resort is not set
C 192.168.12.0/24 is directly connected, FastEthernet0/0 C 192.168.23.0/24 is directly connected, FastEthernet0/1 S 192.168.34.0/24 [1/0] via 192.168.23.3 |
R3: interface FastEthernet0/0 ip address 192.168.23.3 255.255.255.0 duplex auto speed auto ! interface FastEthernet0/1 ip address 192.168.34.3 255.255.255.0 duplex auto speed auto ! ip route 192.168.12.0 255.255.255.0 192.168.23.2
| R3#showip route
Gateway of last resort is not set
S 192.168.12.0/24 [1/0] via 192.168.23.2 C 192.168.23.0/24 is directly connected, FastEthernet0/0 C 192.168.34.0/24 is directly connected, FastEthernet0/1 | R4: interface FastEthernet0/0 ip address 192.168.34.4 255.255.255.0 duplex auto speed auto ip route 192.168.12.0 255.255.255.0 192.168.23.2 ip route 192.168.23.0 255.255.255.0 192.168.34.3
| R4#show ip route
Gateway of last resort is not set
S 192.168.12.0/24 [1/0] via 192.168.23.2 S 192.168.23.0/24 [1/0] via 192.168.34.3 C 192.168.34.0/24 is directly connected, FastEthernet0/0
注:静态路由在路由表中是以“S”开头的 |