OSPF Network Types - A Neighbour Killer?

Yep, I spell neighbour the British way. No, I don't do it in IOS. But I should be able to. :)

While going over some OSPF stuff today, I found a statement saying that OSPF network types have to match for routers for form a neighbour relationship. Because I'm a nerd, I questioned this. My reason? I don't remember OSPF network type being a field in the hello packet header. And if it's not in the header, how can the neighbour tell...therefore, how can it be a criteria?

So, I set out to prove it.

I fired up two routers in GNS3. I connected them by a fast ethernet cable on fa0/0. And I put this in:

R1

interface FastEthernet0/0
  ip address 10.0.0.1 255.255.255.0
  no shut

  router ospf 1
  network 10.0.0.0 0.0.0.255 area 0

R2

interface FastEthernet0/0
  ip address 10.0.0.2 255.255.255.0
  ip ospf network point-to-point


router ospf 1
  network 10.0.0.0 0.0.0.255 area 0

Aaaaaaand.....this happened:

R2#sh ip ospf neigh

Neighbor ID Pri State Dead Time Address Interface
10.0.0.1 0 FULL/ - 00:00:37 10.0.0.1 FastEthernet0/0

Well...that blew that out the water.

Just to prove they are different:

R1

R1#sh ip ospf interface fa0/0
FastEthernet0/0 is up, line protocol is up 
Internet Address 10.0.0.1/24, Area 0 
Process ID 1, Router ID 10.0.0.1, Network Type BROADCAST, Cost: 10
Transmit Delay is 1 sec, State DROTHER, Priority 1
Designated Router (ID) 10.0.0.2, Interface address 10.0.0.2
Backup Designated router (ID) 10.0.0.2, Interface address 10.0.0.2
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:07
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, 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 10.0.0.2 (Designated Router)
Suppress hello for 0 neighbor(s)

R2

R2#sh ip ospf interface fa0/0
FastEthernet0/0 is up, line protocol is up 
Internet Address 10.0.0.2/24, Area 0 
Process ID 1, Router ID 10.0.0.2, Network Type POINT_TO_POINT, Cost: 10
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:00
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1, 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 10.0.0.1
Suppress hello for 0 neighbor(s)

As you can see, one is broadcast and one is point to point. Clearly I didn't randomly pick these - I deliberately picked two network types that have the same hello timers, as they definitely matter to a successful neighbour relationship.

Here's a network type table, just for giggles:

+--------------+--------------+--------------+--------------+--------------+--------------+ | | Broadcast | | ;">point-to- | ;">point-to- | ;">point-to- | | | | | point | multipoint | non-broadcas | | | | | | | t | +--------------+--------------+--------------+--------------+--------------+--------------+ | Hello | 10 | 30 | 10 | 30 | 30 | | Interval | | | | | | +--------------+--------------+--------------+--------------+--------------+--------------+ | Dead | 40 | 120 | 40 | 120 | 120 | | Interval | | | | | | +--------------+--------------+--------------+--------------+--------------+--------------+ | Poll | 120 | 120 | 120 | 120 | 120 | | Interval | | | | | | +--------------+--------------+--------------+--------------+--------------+--------------+ | Retransmit-I | 5 | 5 | 5 | 5 | 5 | | nterval | | | | | | +--------------+--------------+--------------+--------------+--------------+--------------+ | Transmit-Lin | 1 | 1 | 1 | 1 | 1 | | k-Delay-Inte | | | | | | | rval | | | | | | +--------------+--------------+--------------+--------------+--------------+--------------+

I am definitely open to being told I'm wrong, feel free to tell me, but it looks to me like OSPF network type is no an OSPF neighbour dependency.

EDIT: 25/11/14 - It has been mentioned to me that this post could leave you to believe that it's a valid design - it isn't. The routing flag won't be set on the LSA's for this link, which will break your network. This is because two routers are advertising different link properties for the same link - and as OSPF's LSDB has to be agreed upon by the whole topology that isn't a valid design. This post was just to point out that network type isn't actually a dependency for two routers to become fully adjacent.

Share this post

  • Share to Facebook
  • Share to Twitter
  • Share to Google+
  • Share to LinkedIn
  • Share by Email