Configuring Virtual-link

To configure virtual-link, enter the following command in OSPF configuration mode.

Configuring Virtual-link(config)#router ospf <process-id>
(config-router)#area <area-id> virtual-link <router-id>

<process-id> : process ID
<area-id> : area ID of transit area
<router-id> : Router ID of the router on the other side of the virtual-link

Virtual-link is configured between two ABRs. The area to which the ABRs of the endpoints of the virtual-link commonly belong is the transit area. Note that when configuring virtual-link, the router ID, not the IP address of the router on the other side, is specified.

Verifying Virtual-link

The following commands are the main show commands for verifying virtual-link.

show commandSummary
show ip ospf interface [brief]Displays the interfaces with OSPF enabled.
show ip ospf virtual-linksDisplays the details of virtual-link.
show ip ospf neighborDisplays OSPF neighbors.
Table Virtual-link Verification Commands

show ip ospf interface

When virtual link is configured, a virtual interface “OSPF_VL<number>” is automatically created. <number> will be assigned in order starting from “0”.

R2#show ip ospf interface brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
VL0          1     0           10    P2P   1/1
Fa0/0        1     0            10    DR    1/1
Fa0/1        1     23          10    BDR   1/1
R2#show ip ospf interface
OSPF_VL0 is up, line protocol is up
  Internet Address, Area 0
  Process ID 1, Router ID, Network Type VIRTUAL_LINK, Cost: 10
  Configured as demand circuit.
  Run as demand circuit.
  DoNotAge LSA allowed.
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:01
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 2/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor  (Hello suppressed)
  Suppress hello for 1 neighbor(s)
-- omitted --

show ip ospf virtual-links

Use the show ip ospf virtual-links command to display the details of virtual-links. If it is successful in forming an adjacency with the opposing endpoint router, virtual-link is working properly.

R2#show ip ospf virtual-links
Virtual Link OSPF_VL0 to router is up
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 23, via interface FastEthernet0/1, Cost of using 10
  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:06
    Adjacency State FULL (Hello suppressed)
    Index 2/3, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec

show ip ospf neighbor

Look at the show ip ospf neighbor command, and if it is in the FULL state with the opposite router on the virtual OSPF interface “OSPF_VL”, it is OK.

R2#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface           0   FULL/  -           -      OSPF_VL0           1   FULL/BDR        00:00:33       FastEthernet0/0           1   FULL/DR         00:00:30      FastEthernet0/1

How the OSPF works