掌握如何配置ospf虚链路
 
实验拓扑:
 
 ospf虚链路_ 
 
R1上配置
 
R1#ping 34.0.0.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/89/136 ms
R1#ping 34.0.0.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 34.0.0.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
 
R5上配置
 
R5#ping 23.0.0.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 23.0.0.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
R5#ping 23.0.0.2
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 23.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 76/111/164 ms
 
 
配置缘由:
 
由于在不同区域间路由不能学习宣告,所以以上ping不能通信。为了使其可以通信所以在r2r4上配置虚拟链路实现跨区域的通信
 
 
配置成功后的表现
 
R4#ping 12.0.0.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 80/99/156 ms
R4#ping 23.0.0.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 23.0.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/73/136 ms
R4#ping 1.1.1.1
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 92/420/1624 ms
 
 
 
 
 
实际的配置关键
 
R4(config)#router ospf 64
R4(config-router)#area 1 virtual-link 12.0.0.2         指定路由的ID
R2(config)#router ospf 64
R2(config-router)#area 1 virtual-link 45.0.0.1         指定路由的ID    
R2(config-router)#^Z
 
 
R4#sh ip ospf virtual-links     查看虚链路连接情况
Virtual Link OSPF_VL1 to router 12.0.0.2 is up      连接成功
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface Serial2/1, Cost of using 128
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:07
    Adjacency State FULL (Hello suppressed)
    Index 1/3, retransmission queue length 0, number of retransmission 1
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 1, maximum is 1
    Last retransmission scan time is 0 msec, maximum is 0 msec
Virtual Link OSPF_VL0 to router 23.0.0.1 is down
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, Cost of using 65535
  Transmit Delay is 1 sec, State DOWN,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
 
 
S2/1r2的路由ids2/2r4的路由id
 
R2  
R4
虚拟链路状态
S2/1
S2/1
不通
S2/1
S2/2
S2/2
S2/1
不通
S2/2
S2/2
不通