OSPF Election on /30 Link – How It Works

ospfpoint-to-point

I have a few /30 subnets connecting OSPF routers over a broadcast capable link.. Should I also configure the interfaces involved in the link to ip ospf network point-to-point? Or does it matter? The only thing I can think of is to prevent the election which from my understanding shouldn't matter since it's only 2 hosts (the routers) in the subnet?

Best Answer

I have a few /30 subnets connecting OSPF routers over a broadcast capable link.. Should I also configure the interfaces involved in the link to ip ospf network point-to-point? Or does it matter?

The network type definitely matters, but you need to be sharp about handling this situation... there are some corner cases to consider. Let's compare the consequences of configuring a /30 as "Broadcast" or "Point-to-Point" OSPF networks...

----------+-------+--------------+--------------------+--------------+
Network   | Hello | DeadInterval | Adjacency Time     | LSAs per /30 | 
----------+-------+--------------+--------------------+--------------|
Broadcast |   10s |          40s |  > 40s (very slow) |            3 |
Pt-to-Pt  |   30s |         120s |       <  2s (fast) |            2 |
----------+-------+--------------+--------------------+--------------+

Summary

  • OSPF Broadcast Network types establish an adjacency slowly (because they must wait for the DR election), and generate 50% more LSAs for every /30 you designate as an OSPF Broadcast network. Those LSAs must be flooded and processed, which slows down convergence. In short, designs which use many /30 OSPF Broadcast networks will converge somewhat more slowly than if you substituted /30 Point-to-Point networks...
  • OSPF Point-to-Point network types bring up an adjacency very quickly; however, as Ron mentioned, the RouterDeadInterval is 120 seconds so you might want to set HelloInterval lower. However, a correctly-designed network doesn't need to worry about lowering HelloInterval for a /30 Point-to-Point OSPF network.

Details: /30 on an OSPF Broadcast Network

OSPF Broadcast Network Defaults:

  • HelloInterval: 10 Seconds
  • RouterDeadInterval: 40 Seconds

Time to detect OSPF Process failure: <= 40 Seconds

Adjacency time: more-than 40 seconds

  1. [Time T = 0] Both routers send OSPF Hellos as the link comes up. (OSPF STATE: INIT)
  2. [Time T = 0] Both routers see the opposite hello; however, unless configured with DR Priority 0, both routers must wait RouterDeadInterval seconds to ensure that there are no other candidate DRs are on the link. (OSPF STATE: 2-WAY)
  3. [Time T = 40] DR / BDR are elected, and DBD exchange starts (OSPF STATE: EXSTART)
  4. [Time T = 40 + 'DBD exchange time'] DBD is parsed, and SPF runs (OSPF STATE: FULL)

LSAs:

  • Each router sends Router LSA(s): OSPF LSA Type 1
  • The DR sends a Type 2 Network LSA for the broadcast link itself

Details: /30 on an OSPF Point-to-Point Network

OSPF Point-to-Point Network Defaults:

  • HelloInterval: 30 Seconds
  • RouterDeadInterval: 120 Seconds

Time to detect OSPF Process failure: <= 120 Seconds

Adjacency time: Fast (normally less-than 2 Seconds)

  1. [Time T = 0] Both routers send OSPF Hellos as the link comes up. (OSPF STATE: INIT)
  2. [Time T = 0] Both routers see the opposite hello. (OSPF STATE: 2-WAY)
  3. [Time T = 0] DBD exchange starts (OSPF STATE: EXSTART)
  4. [Time T = 'DBD exchange time'] DBD is parsed, and SPF runs (OSPF STATE: FULL)

When to lower HelloInterval for an OSPF Point-to-Point Network

Consider these cases...

Case A: Direct fiber link between routers

Router1-------------------------------Router2

The link between the routers is configured as OSPF Network Point-to-Point. If the link between Router1 and Router2 dies, both routers immediately see their link go down, and run SPF to find an alternative path. OSPF Process failures tend to be very rare, so there usually isn't a good argument to lower HelloInterval for CaseA.

Case B: One Switch between two routers

Router1-------------Switch------------Router2

The link between the routers is configured as OSPF Network Point-to-Point. If the link between Router1 and the switch dies, there is a problem... Router1 immediately knows to run SPF (after waiting SPFDelay); however, Router2's link is still up. Consequently Router2 must wait to converge until either RouterDeadInterval expires, or until Router2 sees Router1's new LSA (flooded after Router1 finishes SPF). In most cases, Router2 will see Router1's new LSA and then run SPF himself... however, Router2's reconvergence in that case is at least two times the SPFInterval (SPFInterval default: 5 seconds in IOS).

It's worth lowering hello timers (or BFD timers) for CaseB when your routers are configured as OSPF Network Point-to-Point.

Case C: Two routers adjacent through multiple switches

Router1-----Switch1-----Switch2--------Router2

This is the worst case for OSPF Point-to-Point convergence time; the link between the routers is configured as OSPF Network Point-to-Point. If the link between Switch1 and Switch2 dies, both routers see their links up; this means the default HelloInterval timers should be changed to prevent a two-minute delay between the link going down, and the SPF run. In this case, it's definitely worth lowering hello timers (or BFD timers) for CaseC when your routers are configured as OSPF Network Point-to-Point.

Related Topic