OSPF Virtual-Link over Unnumbered Interfaces April 28

I’ve got a simple OSPF topology – two routers in area 0 on the ethernet interfaces and in area 1 on the unnumbered serial interfaces, which use the loopback interfaces’ addresses.
What is interesting in this setting is that in the router LSAs the MIB-II interface index of the serial interfaces is put in the Link Data field of the LSA and not the loopback ip address. Then if you try to bring up a virtual-link across area 1 to the other router, the MIB-II index will be used as the destination ip address of the OSPF hello packet used to negotiate a virtual-link and 0.0.0.0 is put in the source address field of the ip packet.
R1′s Config:
interface Loopback0
ip address 1.1.1.1 255.0.0.0
ip ospf 1 area 1
!
interface FastEthernet0/0
ip address 12.0.0.1 255.0.0.0
ip ospf 1 area 0
duplex auto
speed auto
!
interface Serial1/0
ip unnumbered Loopback0
ip ospf 1 area 1
serial restart-delay 0
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
area 1 virtual-link 2.2.2.2
R2′s Config:
interface Loopback0
ip address 2.2.2.2 255.0.0.0
ip ospf 1 area 1
!
interface FastEthernet0/0
ip address 12.0.0.2 255.0.0.0
ip ospf 1 area 0
duplex auto
speed auto
!
interface Serial1/0
ip unnumbered Loopback0
ip ospf 1 area 1
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
area 1 virtual-link 1.1.1.1
OSPF Area 1 Database:
R1#show ip ospf database router
! omitted output
Router Link States (Area 1)
LS age: 569
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000003
Checksum: 0x9D2B
Length: 48
Area Border Router
Number of Links: 2
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 2.2.2.2
(Link Data) Router Interface address: 0.0.0.4
Number of TOS metrics: 0
TOS 0 Metrics: 64
Routing Bit Set on this LSA
LS age: 227
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000004
Checksum: 0x1FA0
Length: 48
Area Border Router
Number of Links: 2
Link connected to: a Stub Network
(Link ID) Network/subnet number: 2.2.2.2
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 1.1.1.1
(Link Data) Router Interface address: 0.0.0.4
Number of TOS metrics: 0
TOS 0 Metrics: 64
R1#debug ip packet
IP packet debugging is on
*Mar 1 00:43:29.339: IP: s=0.0.0.0 (local), d=0.0.0.4, len 76, unroutable
ifIndex of S1/0:
R1#sh snmp mib ifmib ifindex s1/0
Interface = Serial1/0, Ifindex = 3
Conclusion: Remember when you are trying to configure a virtual-link between two routers, make sure the virtual-link’s best path is not through an unnumbered interface or otherwise the adjacency would not be formed!
275199722

