虚链路实验

关于虚链路的实验,只为看实验效果,图可点击放大。
R1(config)#int lo0
R1(config-if)#ip addr 172.16.12.1 255.255.255.0
R1(config-if)#int lo1
R1(config-if)#ip addr 172.16.13.1 255.255.255.0
R1(config-if)#int lo2
R1(config-if)#ip addr 172.16.14.1 255.255.255.0
R1(config-if)#int lo3
R1(config-if)#ip addr 172.16.15.1 255.255.255.0
R1(config-if)#int s1/0
R1(config-if)#ip addr 202.110.100.1 255.255.255.0
R1(config-if)#encap hdlc
R1(config-if)#clock rate 56000
R1(config-if)#no shut
R1(config-if)#router ospf 100
R1(config-router)#net 172.16.0.0 0.0.255.255 are 2
R1(config-router)#net 202.110.100.1 0.0.0 .0 are 2
 
R2(config)#int s1/0
R2(config-if)#ip addr 202.110.100.2 255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#no shut
R2(config-if)#int s1/1
R2(config-if)#ip addr 202.110.101.1 255.255.255.0
R2(config-if)#encap hdlc
R2(config-if)#clock rate 56000
R2(config-if)#no shut
R2(config-if)#router ospf 100
R2(config-router)#net 202.110.100.2 0.0.0 .0 are 2
R2(config-router)#net 202.110.101.1 0.0.0 .0 are 0
 
R3(config)#int s1/1
R3(config-if)#ip addr 202.110.101.2 255.255.255.0
R3(config-if)#encap hdlc
R3(config-if)#no shut
R3(config)#int s1/2
R3(config-if)#ip addr 202.110.102.1 255.255.255.0
R3(config-if)#encap hdlc
R3(config-if)#clock rate 56000
R3(config-if)#no shut
R3(config-if)#router ospf 100
R3(config-router)#net 202.110.101.2 0.0.0 .0 are 0
R3(config-router)#net 202.110.102.1 0.0.0 .0 are 1
R3(config)#router ospf 100
R3(config-router)#area 1 virtual-link 202.110.103.1
 
R4(config)#int s1/2
R4(config-if)#ip addr 202.110.102.2 255.255.255.0
R4(config-if)#encap hdlc
R4(config-if)#no shut
R4(config)#int s1/1
R4(config-if)#ip addr 202.110.103.1 255.255.255.0
R4(config-if)#encap hdlc
R4(config-if)#clock rate 56000
R4(config-if)#no shut
R4(config-router)#router ospf 100
R4(config-router)#net 202.110.102.2 0.0.0 .0 are 1
R4(config-router)#net 202.110.103.1 0.0.0 .0 are 3
R4(config)#router ospf 100
R4(config-router)#area 1 virtual-link 202.110.102.1
 
R5(config)#int s1/1
R5(config-if)#ip addr 202.110.103.2 255.255.255.0
R5(config-if)#encap hdlc
R5(config-if)#no shut
R5(config-if)#router ospf 100
R5(config-router)#net 202.110.103.2 0.0.0 .0 are 3
 
1. R3 R4 没做虚链路:
则:R5只学到同区域的路由。
R5#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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    202.110.103.0/24 is directly connected, Serial1/1
 
2.若R3R4做完虚链路后(上面红色字体)
则:R5学到了不同区域的所有路由。
R5#show ip route
Codes: C - connected, S - static, 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
       i - IS-IS, su - IS-IS summary, 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
 
O IA 202.110.100.0/24 [110/256] via 202.110.103.1, 00:00:12, Serial1/1
O IA 202.110.101.0/24 [110/192] via 202.110.103.1, 00:00:12, Serial1/1
O IA 202.110.102.0/24 [110/128] via 202.110.103.1, 00:00:22, Serial1/1
     172.16.0.0/32 is subnetted, 4 subnets
O IA    172.16.13.1 [110/257] via 202.110.103.1, 00:00:12, Serial1/1
O IA    172.16.12.1 [110/257] via 202.110.103.1, 00:00:12, Serial1/1
O IA    172.16.15.1 [110/257] via 202.110.103.1, 00:00:12, Serial1/1
O IA    172.16.14.1 [110/257] via 202.110.103.1, 00:00:12, Serial1/1
C    202.110.103.0/24 is directly connected, Serial1/1
 
 

本文出自 “leeveis” 博客,谢绝转载!

你可能感兴趣的:(职场,路由,休闲)