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?
4 Answers
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 setHelloInterval
lower. However, a correctly-designed network doesn't need to worry about loweringHelloInterval
for a /30 Point-to-Point OSPF network.
Details: /30 on an OSPF Broadcast Network
OSPF Broadcast Network Defaults:
HelloInterval
: 10 SecondsRouterDeadInterval
: 40 Seconds
Time to detect OSPF Process failure: <= 40 Seconds
Adjacency time: more-than 40 seconds
[Time T = 0]
Both routers send OSPF Hellos as the link comes up. (OSPF STATE: INIT)[Time T = 0]
Both routers see the opposite hello; however, unless configured with DR Priority 0, both routers must waitRouterDeadInterval
seconds to ensure that there are no other candidate DRs are on the link. (OSPF STATE: 2-WAY)[Time T = 40]
DR / BDR are elected, and DBD exchange starts (OSPF STATE: EXSTART)[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 SecondsRouterDeadInterval
: 120 Seconds
Time to detect OSPF Process failure: <= 120 Seconds
Adjacency time: Fast (normally less-than 2 Seconds)
[Time T = 0]
Both routers send OSPF Hellos as the link comes up. (OSPF STATE: INIT)[Time T = 0]
Both routers see the opposite hello. (OSPF STATE: 2-WAY)[Time T = 0]
DBD exchange starts (OSPF STATE: EXSTART)[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.
-
Thanks Mike! Great Info. One last question. Does the Point-to-Point command need to be run on both endpoints? My thoughts are yes...– JimAug 4, 2014 at 13:23
-
Yes both interfaces need matching p2p interface configurations Aug 4, 2014 at 13:24
There are actually a few things for you to weigh up with this question.
Use point-to-point if:
- Rapid failure detection and convergence is important to you.
- Convergence: The lack of a DR/BDR election will speed convergence
- Failure-detection: Couple OSPF network point-to-point network type with BFD to for fast detection of a link-failure. You could adjust the OSPF timers but BFD performs better than fast-hellos and is a bit easier on system resources.
- You want to use /31 networks on your point-to-point links to conserve IP address space
- The network-mask in hello packets for point-to-point networks is ignored
Note: For routes received via a point-to-point network-type, OSPF will report the next-hop as the neighbour router.
Use broadcast (default type) if:
- You aren't too concerned with convergence times
- You don't want to engineer a complex fine-tuned solution
Note: For routes received via a broadcast network-type, OSPF will report the next-hop as the advertising router.
-
I'm not sure that OSPF p2p networks are Cisco proprietary; they are explained in RFC2328 Section 12.4.1.1 Aug 1, 2014 at 10:11
-
Yes absolutely, I'm wrong here. It is point-to-multipoint and point-to-multipoint NBMA that I've confused it with. These two are proprietary.– mbudAug 1, 2014 at 13:48
One thing to be concerned about is the timers. Broadcast networks have a 40 sec dead timer, but PTP is 120 secs. That may be an issue for convergence/recovery time in the event of a network failure.
Usually, setting OSPF to point-to-point is done to save bandwidth on leased links because it won't have elections, so if the link is not leased or metered, you shouldn't see much difference between both setups.
-
-
Save bandwidth by not having OSPF elections. Sorry, thought faster than I typed. Aug 1, 2014 at 10:50
-
DR elections are determined with hello packets. There is no extra bandwidth needed– user5025Aug 1, 2014 at 11:11