When any OSPF router receives a hello packet, it first checks the source IP of the hello packet and look if the source is in same subnet as the interface on which it receives the hello packet. If yes, the following fields needs to match the local parameter:
- Area ID
- Hello Interval
- Dead Interval
- Subnet Mask
- Options
- Authentication
There are specific cases, where a part of the above rule can be ignored. In this article, we will see which parameters can be ignored.
Case 1: OSPF adjacency will be formed even if the Subnet mask doesn’t match.
Case 2: OSPF adjacency can be formed even if the Source IP of the hello packet is in different subnet.

Case 1:
As per RFC2328, on a point-to-point link and virtual link, Subnet Mask will be ignored and can form adjacency even if the subnet masks are different.
An example below will prove the statement.
R1#sh run int s2/2
Building configuration...
Current configuration : 113 bytes
!
interface Serial2/2
ip address 150.1.13.1 255.255.255.128
encapsulation ppp
no peer default ip address
end
R1#
R1#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
150.1.3.3 0 FULL/ - 00:00:32 150.1.13.3 Serial2/2
R1#
|--------------R3 Configs------------------|
R3#sh run int s2/2
Building configuration...
Current configuration : 83 bytes
!
interface Serial2/2
ip address 150.1.13.3 255.255.255.0
encapsulation ppp
end
R3#
R3#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
150.1.1.1 0 FULL/ - 00:00:32 150.1.13.1 Serial2/2
R3#
Case 2:
When any OSPF router receives a hello packet on point-to-point link which is configured using “ip unnumbered
Router Configuration:
R1#sh run int s2/2
Building configuration...
Current configuration : 99 bytes
!
interface Serial2/2
ip unnumbered Loopback1
encapsulation ppp
no peer default ip address
end
R1#sh run int lo 1
Building configuration...
Current configuration : 87 bytes
!
interface Loopback1
ip address 150.1.13.1 255.255.255.255
no clns route-cache
end
R1#
R3#sh run int s2/2
Building configuration...
Current configuration : 71 bytes
!
interface Serial2/2
ip unnumbered Loopback1
encapsulation ppp
end
R3#sh run int lo 1
Building configuration...
Current configuration : 87 bytes
!
interface Loopback1
ip address 150.1.13.3 255.255.255.255
no clns route-cache
end
R3#
Show Command:
R1#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
150.1.3.3 0 FULL/ - 00:00:35 150.1.13.3 Serial2/2
R1#
R3#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
150.1.1.1 0 FULL/ - 00:00:32 150.1.13.1 Serial2/2
R3#
But when the interface is configured with a /32 address, it throws an error message saying “src not on the same network” and OSPF adjacency will not be formed.
On a PPP link, it is common to see /32 subnet mask when IP address is negotiated as part of IPCP as below,
R1#sh run int s2/2
Building configuration...
Current configuration : 119 bytes
!
interface Serial2/2
ip address 150.1.13.1 255.255.255.0
encapsulation ppp
peer default ip address 150.1.13.3
end
R1#
interface Serial2/2
ip address negotiated
encapsulation ppp
end
R3#sh int s2/2 | inc address
Internet address is 150.1.13.3/32
R3#
Show command:
R1#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
150.1.3.3 0 INIT/ - 00:00:35 150.1.13.3 Serial2/2
R1#
R3#sh ip ospf nei
R3#
R3#show logg | inc src
18:57:58: OSPF: Rcv pkt from 150.1.13.1, Serial2/2, area 0.0.0.0 : src not on the same network
R3#
No comments:
Post a Comment