RA:
enable
config t
hostname RA
int s0/0
ip address 192.168.1.1 255.255.255.0
clock rate 56000
no shutdown
exit
int s0/1
ip address 192.168.3.2 255.255.255.0
no shutdown
exit
ip route 192.168.2.0 255.255.255.0 192.168.1.2 10
ip route 192.168.2.0 255.255.255.0 s0/0 20
end
show ip route
RB:
enable
config t
hostname RB
int s0/0
ip address 192.168.2.1 255.255.255.0
clock rate 56000
no shutdown
exit
int s0/1
ip address 192.168.1.2 255.255.255.0
no shutdown
exit
ip route 192.168.3.0 255.255.255.0 192.168.1.1
ip route 192.168.3.0 255.255.255.0 192.168.2.2
end
show ip route
RC:
enable
config t
hostname RC
int s0/0
ip address 192.168.3.1 255.255.255.0
clock rate 56000
no shutdown
exit
int s0/1
ip address 192.168.2.2 255.255.255.0
no shutdown
exit
ip route 192.168.1.0 255.255.255.0 192.168.2.1
ip route 192.168.1.0 255.255.255.0 192.168.3.2
end
show ip route
开始测试效果:
RA#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR
P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/0
S 192.168.2.0/24 [10/0] via 192.168.1.2
C 192.168.3.0/24 is directly connected, Serial0/1
RA#trace
RA#traceroute 192.168.2.1
Type escape sequence to abort.
Tracing the route to 192.168.2.1
1 192.168.1.2 31 msec 32 msec 31 msec
RA#traceroute 192.168.2.2
Type escape sequence to abort.
Tracing the route to 192.168.2.2
1 192.168.1.2 31 msec 32 msec 31 msec
2 192.168.2.2 46 msec 62 msec 47 msec
RA#confi t
Enter configuration commands, one per line. End with CNTL/Z.
RA(config)#int s0/0
RA(config-if)#shut
RA(config-if)#
%LINK-5-CHANGED: Interface Serial0/0, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to downend
%SYS-5-CONFIG_I: Configured from console by consoleRA#
RA#
RA#traceroute 192.168.2.1
Type escape sequence to abort.
Tracing the route to 192.168.2.1
1 192.168.3.1 31 msec 31 msec 31 msec
2 192.168.2.1 62 msec 62 msec 62 msec
RA#traceroute 192.168.2.2
Type escape sequence to abort.
Tracing the route to 192.168.2.2
1 192.168.3.1 31 msec 32 msec 31 msec
RA#traceroute 192.168.2.2
Type escape sequence to abort.
Tracing the route to 192.168.2.2
1 192.168.3.1 31 msec 32 msec 17 msec
RA#