OSPF虚链路

 AR1配置

interface GigabitEthernet0/0/0
 ip address 12.1.1.1 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 13.1.1.1 255.255.255.0 
#
ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 12.1.1.0 0.0.0.255 
 area 0.0.0.1 
  network 13.1.1.0 0.0.0.255 
#

AR2配置

interface GigabitEthernet0/0/0
 ip address 12.1.1.2 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 24.1.1.2 255.255.255.0 
#
ospf 1 router-id 2.2.2.2 
 area 0.0.0.0 
  network 12.1.1.0 0.0.0.255 
 area 0.0.0.2 
  network 24.1.1.0 0.0.0.255 
  vlink-peer 4.4.4.4

AR3配置

interface GigabitEthernet0/0/0
 ip address 13.1.1.3 255.255.255.0 
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255 
#
ospf 1 router-id 3.3.3.3 
 area 0.0.0.1 
  network 1.1.1.1 0.0.0.0 
  network 13.1.1.0 0.0.0.255 
interface GigabitEthernet0/0/0
 ip address 24.1.1.4 255.255.255.0 
#
interface GigabitEthernet0/0/1
 ip address 45.1.1.4 255.255.255.0 
#
interface LoopBack0
 ip address 4.4.4.4 255.255.255.0 
#
ospf 1 router-id 4.4.4.4 
 area 0.0.0.2 
  network 4.4.4.4 0.0.0.0 
  network 24.1.1.0 0.0.0.255 
  vlink-peer 2.2.2.2
 area 0.0.0.3 
  network 45.1.1.0 0.0.0.255 

AR5配置

interface GigabitEthernet0/0/0
 ip address 45.1.1.5 255.255.255.0 

interface LoopBack0
 ip address 5.5.5.5 255.255.255.255 
#
ospf 1 router-id 5.5.5.5 
 area 0.0.0.3 
  network 5.5.5.5 0.0.0.0 
  network 45.1.1.0 0.0.0.255 
#

测试

<AR3> ping -a 1.1.1.1 5.5.5.5
  PING 5.5.5.5: 56  data bytes, press CTRL_C to break
    Reply from 5.5.5.5: bytes=56 Sequence=1 ttl=252 time=230 ms
    Reply from 5.5.5.5: bytes=56 Sequence=2 ttl=252 time=30 ms
    Reply from 5.5.5.5: bytes=56 Sequence=3 ttl=252 time=40 ms
    Reply from 5.5.5.5: bytes=56 Sequence=4 ttl=252 time=50 ms
    Reply from 5.5.5.5: bytes=56 Sequence=5 ttl=252 time=30 ms

  --- 5.5.5.5 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 30/76/230 ms
原文地址:https://www.cnblogs.com/liujunjun/p/12974010.html