在路由器R1上进行配制 R1(config)#int s 2/1 R1(config-if)#ip add R1(config-if)#no sh R1(config-if)#exit R1(config)#router ospf 1 R1(config-router)#network R1(config-router)#end
R1# 34.0.0.0/24 is subnetted, 1 subnets O IA 34.0.0.0 [110/192] vi O IA C 45.0.0.0/24 is subnetted, 1 subnets O 45.0.0.0 [110/256] vi 45.0.0.0/24是通过虚电路学习到另外一个自治区域area0的路由 R1# 在路由器R2上进行配制 R2(config)#int s 2/1 R2(config-if)#ip add R2(config-if)#no sh R2(config-if)#int s 2/2 R2(config-if)#ip add R2(config-if)#no sh R2(config-if)#exit R2(config)#router ospf 1 R2(config-router)#network R2(config-router)#network R2(config-router)#end R2(config)#router ospf 1 R2(config-router)#router-id 99.99.99.99 配置R4的router-id Reload or use "clear ip ospf process" command, for this to take effect R2(config-router)#area 1 virtual-link 88.88.88.88 配置R4到R5之间的虚电路,为两个area0之间打通一个隧道 R2(config-router)#end R2#sh ip route 34.0.0.0/24 is subnetted, 1 subnets O 34.0.0.0 [110/128] vi C C 45.0.0.0/24 is subnetted, 1 subnets O 45.0.0.0 [110/192] vi R2# 在路由器R3上进行配制 R3(config)#int s 2/1 R3(config-if)#ip add R3(config-if)#no sh R3(config-if)#int s 2/2 R3(config-if)#ip add 34.0.0.3 255.255.255.0 R3(config-if)#no sh R3(config-if)#router ospf 1 R3(config-router)#network 34.0.0.3 R3(config-router)#network R3(config-router)#end R3#sh ip route 34.0.0.0/24 is subnetted, 1 subnets C 34.0.0.0 is directly connected, Serial2/2 C O IA 45.0.0.0/24 is subnetted, 1 subnets O IA 45.0.0.0 [110/128] via 34.0.0.4, 00:10:22, Serial2/2 这两条路由是通过ABR路由器R2和R4学习到 R3# 在路由器R4上进行配制 R4(config)#int s 2/1 R4(config-if)#ip add 34.0.0.4 255.255.255.0 R4(config-if)#no sh R4(config-if)#exit R4(config)#int s 2/2 R4(config-if)#ip add 45.0.0.4 255.255.255.0 R4(config-if)#no sh R4(config-if)#exit R4(config)#router ospf 1 R4(config-router)#network 45.0.0.4 R4(config-router)#network 34.0.0.4 R4(config-router)#end R4(config)#router ospf 1 R4(config-router)#router-id 88.88.88.88 配置R4的router-id Reload or use "clear ip ospf process" command, for this to take effect R4(config-router)#area 1 vi R4(config-router)#area 1 virtual-link 99.99.99.99 配置R4到R5之间的虚电路,为两个area0之间打通一个隧道 R4(config-router)#end R4#sh ip route 34.0.0.0/24 is subnetted, 1 subnets C 34.0.0.0 is directly connected, Serial2/1 O O 45.0.0.0/24 is subnetted, 1 subnets C 45.0.0.0 is directly connected, Serial2/2 R4# 在路由器R5上进行配制 R5(config)#int s 2/2 R5(config-if)#ip add 45.0.0.5 255.255.255.0 R5(config-if)#no sh R5(config-if)#exit R5(config)#router ospf 1 R5(config-router)#network 45.0.0.5 R5(config-router)#end R5# sh ip route 34.0.0.0/24 is subnetted, 1 subnets O IA 34.0.0.0 [110/128] via 45.0.0.4, 00:06:05, Serial2/2 O IA O 45.0.0.0/24是通过虚电路学习到另外一个自治区域area0的路由 45.0.0.0/24 is subnetted, 1 subnets C 45.0.0.0 is directly connected, Serial2/2 |

