连线
Router1 F0/0 <----> VPCS V0/1
Router1 F1/0 <----> Router2 F1/0
Router2 F0/0 <----> Router3 F0/0
Router3 F1/0 <----> Router4 F1/0
Router4 S0/0 <----> Router5 S0/0
Router5 F1/0 <----> VPCS V0/2
R1
Router>en
Router#conf t
Router(config)#host R1
R1(config)#int f0/0
R1(config-if)#ip add 10.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#int f1/0
R1(config-if)#ip add 20.0.0.1 255.0.0.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#net 10.0.0.0
R1(config-router)#net 20.0.0.0
R1(config-router)#end
R1#show ip route
R    50.0.0.0/8 [120/10] via 20.0.0.2, 00:00:11, FastEthernet1/0
C    20.0.0.0/8 is directly connected, FastEthernet1/0
R    40.0.0.0/8 [120/10] via 20.0.0.2, 00:00:11, FastEthernet1/0
C    10.0.0.0/8 is directly connected, FastEthernet0/0
R    60.0.0.0/8 [120/10] via 20.0.0.2, 00:00:11, FastEthernet1/0
R    30.0.0.0/8 [120/10] via 20.0.0.2, 00:00:19, FastEthernet1/0
R2
Router>en
Router#conf t
Router(config)#host R2
R2(config)#int l0
R2(config-if)#ip add 2.2.2.2 255.255.255.255
R2(config-if)#exit
R2(config)#int f1/0
R2(config-if)#ip add 20.0.0.2 255.0.0.0
R2(config-if)#no shut
R2(config-if)#int f0/0
R2(config-if)#ip add 30.0.0.2 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router rip
R2(config-router)#net 20.0.0.0
R2(config-router)#redistribute ospf 1 metric 10
R2(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#net 30.0.0.2 0.0.0.0 area 1
R2(config-router)#redistribute rip metric 100 subnets
R2(config-router)#end
R2#show ip route
O IA 50.0.0.0/8 [110/66] via 30.0.0.1, 00:00:16, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
C    20.0.0.0/8 is directly connected, FastEthernet1/0
O IA 40.0.0.0/8 [110/2] via 30.0.0.1, 00:00:15, FastEthernet0/0
R    10.0.0.0/8 [120/1] via 20.0.0.1, 00:00:21, FastEthernet1/0
O IA 60.0.0.0/8 [110/67] via 30.0.0.1, 00:00:16, FastEthernet0/0
C    30.0.0.0/8 is directly connected, FastEthernet0/0
R2#conf t
R2(config)#router ospf 1
R2(config-router)#area 1 nssa
R2(config-router)#end
R2#
*Mar  1 00:04:49.523: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on FastEthernet0/0
from FULL to DOWN, Neighbor Down: Adjacency forced to reset
*Mar  1 00:04:51.159: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 00:05:07.835: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on FastEthernet0/0
from LOADING to FULL, Loading Done
R2#show ip route
O IA 50.0.0.0/8 [110/66] via 30.0.0.1, 00:00:19, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
C    20.0.0.0/8 is directly connected, FastEthernet1/0
O IA 40.0.0.0/8 [110/2] via 30.0.0.1, 00:00:20, FastEthernet0/0
R    10.0.0.0/8 [120/1] via 20.0.0.1, 00:00:22, FastEthernet1/0
C    30.0.0.0/8 is directly connected, FastEthernet0/0
R3
Router>en
Router#conf t
Router(config)#host R3
R3(config)#int l0
R3(config-if)#ip add 3.3.3.3 255.255.255.255
R3(config-if)#exit
R3(config)#int f0/0
R3(config-if)#ip add 30.0.0.1 255.0.0.0
R3(config-if)#no shut
R3(config-if)#int f1/0
R3(config-if)#ip add 40.0.0.1 255.0.0.0
R3(config-if)#no shut
R3(config-if)#exit
R3(config)#router ospf 1
R3(config-router)#net 30.0.0.1 0.0.0.0 area 1
R3(config-router)#net 40.0.0.1 0.0.0.0 area 0
R3(config-router)#end
R3#show ip route
O IA 50.0.0.0/8 [110/65] via 40.0.0.2, 00:00:22, FastEthernet1/0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
O E2 20.0.0.0/8 [110/100] via 30.0.0.2, 00:00:22, FastEthernet0/0
C    40.0.0.0/8 is directly connected, FastEthernet1/0
O E2 10.0.0.0/8 [110/100] via 30.0.0.2, 00:00:22, FastEthernet0/0
O IA 60.0.0.0/8 [110/66] via 40.0.0.2, 00:00:22, FastEthernet1/0
C    30.0.0.0/8 is directly connected, FastEthernet0/0
R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#router ospf 1
R3(config-router)#area 1 nssa
R3#show ip route
O IA 50.0.0.0/8 [110/65] via 40.0.0.2, 00:00:19, FastEthernet1/0
     3.0.0.0/32 is subnetted, 1 subnets
C       3.3.3.3 is directly connected, Loopback0
O N2 20.0.0.0/8 [110/100] via 30.0.0.2, 00:00:19, FastEthernet0/0
C    40.0.0.0/8 is directly connected, FastEthernet1/0
O N2 10.0.0.0/8 [110/100] via 30.0.0.2, 00:00:19, FastEthernet0/0
C    30.0.0.0/8 is directly connected, FastEthernet0/0
R4
Router>en
Router#conf t
Router(config)#host R4
R4(config)#int l0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#exit
R4(config)#int f1/0
R4(config-if)#ip add 40.0.0.2 255.0.0.0
R4(config-if)#no shut
R4(config-if)#int s0/0
R4(config-if)#ip add 50.0.0.1 255.0.0.0
R4(config-if)#exit
R4(config)#router ospf 1
R4(config-router)#net 40.0.0.2 0.0.0.0 area 0
R4(config-router)#net 50.0.0.1 0.0.0.0 area 2
R4(config-router)#end
R4#show ip route
C    50.0.0.0/8 is directly connected, Serial0/0
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
O E2 20.0.0.0/8 [110/100] via 40.0.0.1, 00:00:03, FastEthernet1/0
O    60.0.0.0/8 [110/65] via 50.0.0.2, 00:00:23, Serial0/0
O IA 30.0.0.0/8 [110/2] via 40.0.0.1, 00:00:03, FastEthernet1/0/0
R4#show ip route
C    50.0.0.0/8 is directly connected, Serial0/0
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
O E2 20.0.0.0/8 [110/100] via 40.0.0.1, 00:00:18, FastEthernet1/0
C    40.0.0.0/8 is directly connected, FastEthernet1/0
O E2 10.0.0.0/8 [110/100] via 40.0.0.1, 00:00:18, FastEthernet1/0
O    60.0.0.0/8 [110/65] via 50.0.0.2, 00:00:38, Serial0/0
O IA 30.0.0.0/8 [110/2] via 40.0.0.1, 00:00:18, FastEthernet1/0
R4#conf t
R4(config)#router ospf 1
R4(config-router)#area 2 stub no-summary
R4(config-router)#end
R4#
*Mar  1 00:04:16.739: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on Serial0/0 from F
ULL to DOWN, Neighbor Down: Adjacency forced to reset
*Mar  1 00:04:18.503: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 00:04:34.019: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on Serial0/0 from L
OADING to FULL, Loading Done
R4#show ip route
C    50.0.0.0/8 is directly connected, Serial0/0
     4.0.0.0/32 is subnetted, 1 subnets
C       4.4.4.4 is directly connected, Loopback0
O E2 20.0.0.0/8 [110/100] via 40.0.0.1, 00:00:00, FastEthernet1/0
C    40.0.0.0/8 is directly connected, FastEthernet1/0
O E2 10.0.0.0/8 [110/100] via 40.0.0.1, 00:00:00, FastEthernet1/0
O IA 30.0.0.0/8 [110/2] via 40.0.0.1, 00:00:00, FastEthernet1/0
R5
Router>en
Router#conf t
Router(config)#host R5
R5(config)#int l0
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#exit
R5(config)#int s0/0
R5(config-if)#ip add 50.0.0.2 255.0.0.0
R5(config-if)#no shut
R5(config-if)#int f1/0
R5(config-if)#ip add 60.0.0.1 255.0.0.0
R5(config-if)#no shut
R5(config-if)#exit
R5(config)#router ospf 1
R5(config-router)#net 50.0.0.2 0.0.0.0 area 2
R5(config-router)#net 60.0.0.1 0.0.0.0 area 2
R5(config-router)#end
R5#show ip route
C    50.0.0.0/8 is directly connected, Serial0/0
O E2 20.0.0.0/8 [110/100] via 50.0.0.1, 00:00:21, Serial0/0
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
O IA 40.0.0.0/8 [110/65] via 50.0.0.1, 00:00:28, Serial0/0
O E2 10.0.0.0/8 [110/100] via 50.0.0.1, 00:00:21, Serial0/0
C    60.0.0.0/8 is directly connected, FastEthernet1/0
O IA 30.0.0.0/8 [110/66] via 50.0.0.1, 00:00:26, Serial0/0
R5#conf t
R5(config)#router ospf 1
R5(config-router)#area 2 stub
R5(config-router)#e
*Mar  1 00:04:23.287: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial0/0 from F
ULL to DOWN, Neighbor Down: Adjacency forced to resetnd
R5#
*Mar  1 00:04:26.243: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 00:04:34.215: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on Serial0/0 from L
OADING to FULL, Loading Done
R5#show ip route
Gateway of last resort is 50.0.0.1 to network 0.0.0.0
C    50.0.0.0/8 is directly connected, Serial0/0
     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
C    60.0.0.0/8 is directly connected, FastEthernet1/0
O*IA 0.0.0.0/0 [110/65] via 50.0.0.1, 00:00:03, Serial0/0