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?
OSPF Election on /30 Link – How It Works
ospfpoint-to-point
Related Solutions
As the firewalls aren't part of a vPC they won't be part of the normal vPC loop prevention.
The loop prevention only states that a packet cannot ingress on the peer link if it is destined to go out another vPC enabled port.
Not too sure on the multicast front as we don't use it in our environment and I haven't really looked into its behaviour on the 7K's.
Usually if you are running a routing protocol down on the switch stack the recommended design would be to not have it as a member of a vPC and just use OSPF to give you the same advantages that vPC gives you at L2.
OSPF is a link state protocol that uses multicast. It sends Link State Advertisements (LSAs) that are flooded.
Every router builds a tree by running SPF where the router itself is the root of the tree. In OSPF we have transit networks and stub networks. Transit networks are networks that are used for transit to reach networks while stub networks are the endpoints or leaves as you described it.
If we are in the same area then the router LSA (type-1) is examined to find the destination. Here is a router-LSA to reach the network of R1 which has a RID of 1.1.1.1.
R2#sh ip ospf data router 1.1.1.1
OSPF Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 0)
LS age: 256
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: 80000005
Checksum: 0x4B09
Length: 60
Number of Links: 3
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: a Transit Network
(Link ID) Designated Router address: 13.13.13.1
(Link Data) Router Interface address: 13.13.13.1
Number of TOS metrics: 0
TOS 0 Metrics: 10
Link connected to: a Transit Network
(Link ID) Designated Router address: 12.12.12.2
(Link Data) Router Interface address: 12.12.12.1
Number of TOS metrics: 0
TOS 0 Metrics: 10
R1 has a cost of 1 to this stub network. R2 can reach this network through the 12.12.12.0/24 transit network. So we need to add a cost of 10 which brings the total metric to 11.
R2#sh ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 11, type intra area
Last update from 12.12.12.1 on FastEthernet0/0, 00:06:49 ago
Routing Descriptor Blocks:
* 12.12.12.1, from 1.1.1.1, 00:06:49 ago, via FastEthernet0/0
Route metric is 11, traffic share count is 1
This is an intra area route. For inter area routes OSPF actually behaves like a distance vector protocol because traffic is sent through the ABR. How can we identify an ABR?
R4#sh ip ospf data router 2.2.2.2
OSPF Router with ID (4.4.4.4) (Process ID 1)
Router Link States (Area 1)
Routing Bit Set on this LSA
LS age: 573
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: 80000002
Checksum: 0xCCB6
Length: 36
**Area Border Router**
Number of Links: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 24.24.24.2
(Link Data) Router Interface address: 24.24.24.2
Number of TOS metrics: 0
TOS 0 Metrics: 10
The B bit is set in the OSPF header which makes a router an ABR.
This can be seen in a packet capture.
To find the metric of an inter area route the metric of the ABR to the destination + the metric of the local route to the ABR is added.
R4#sh ip ospf border-routers
OSPF Process 1 internal Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 2.2.2.2 [10] via 24.24.24.2, FastEthernet0/0, ABR, Area 1, SPF 4
i 3.3.3.3 [10] via 34.34.34.3, FastEthernet0/1, ABR, Area 1, SPF 4
R4#
Here the cost is 10 to reach the two ABRs. Because the cost was 11 from the ABR to the destination that should mean that R4 has a metric of 21.
R4#sh ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 21, type inter area
Last update from 24.24.24.2 on FastEthernet0/0, 00:09:37 ago
Routing Descriptor Blocks:
* 34.34.34.3, from 3.3.3.3, 00:09:37 ago, via FastEthernet0/1
Route metric is 21, traffic share count is 1
24.24.24.2, from 2.2.2.2, 00:09:37 ago, via FastEthernet0/0
Route metric is 21, traffic share count is 1
Which it is. Because there are two ABRs here with the same cost both routes are installed into the RIB/FIB. If we increase the cost to one ABR then only one entry will be installed.
R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#int f0/0
R4(config-if)#ip ospf cost 11
R4(config-if)#^Z
R4#sh ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 21, type inter area
Last update from 34.34.34.3 on FastEthernet0/1, 00:10:58 ago
Routing Descriptor Blocks:
* 34.34.34.3, from 3.3.3.3, 00:10:58 ago, via FastEthernet0/1
Route metric is 21, traffic share count is 1
There really is no concept of AS in OSPF but you can originate a default route and then the best metric would win. I recommend that you read through RFC 2328 and OSPF: Anatomy of an Internet Routing Protocol if you want more understanding of OSPF.
Best Answer
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...
Summary
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 SecondsTime 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:
Details: /30 on an OSPF Point-to-Point Network
OSPF Point-to-Point Network Defaults:
HelloInterval
: 30 SecondsRouterDeadInterval
: 120 SecondsTime 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 NetworkConsider these cases...
Case A: Direct fiber link between routers
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
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 eitherRouterDeadInterval
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 theSPFInterval
(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
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.