User Tools

Site Tools


ospf

OSPF Path Selection explained

As you might have learned in CCNA or CCNP, OSPF will use cost as the metric to choose the shortest path for each destination, this is true but it’s not entirely correct. OSPF will first look at the “type of path” to make a decision and secondly look at the metric. This is the prefered path list that OSPF uses:

  • Intra-Area (O)
  • Inter-Area (O IA)
  • External Type 1 (E1)
  • NSSA Type 1 (N1)
  • External Type 2 (E2)
  • NSSA Type 2 (N2)

After the path selection it will look at the lowest cost path. To give a quick example…when Prefix “X” is learned as an intra-area route (O) and as an inter-area route (O IA) then OSPF will always select the intra-area route, even if the inter-area route has a lower cost.

DR/BDR Roles

Within OSPF, the role of the Designated Router (DR) and a Backup Designated Router (BDR) is to act as a central point for exchanging of OSPF information between multiple routers on the same, multiaccess broadcast network segment. Each non-DR and non-BDR router only exchanges routing information with the DR and BDR, instead of the exchanging updates with every router on the segment. This significantly reduces the amount of OSPF routing updates sent across the network.

DR/BDR Election :Intially when we enable ospf on routers then they start sending hello messages to each other . Then at The End of Two-Way State DR/BDR Election is done.

Election Process:

1. Priority: Interface on which ospf is enabled by default priority is 1 but it can range from 0-255 and if priority of a interface is 0 mean it will not participate in DR/BDR election .

As on all interface priority is 1 by default  therefore it will be a tie . Then election process will move to router-id.

Higher Priority will be preffered.

To check Priority on a interface : show ip ospf neighbor

R1(config)#do show ip ospf neighbor

2. Router-Id : As Every router in case of ospf should have unique router-id to become neighbors .

So Higher Router-Id will be preffered.

As in our example Router R4 has higher Router-Id 4.4.4.4 So he will be DR and Router R3 having Router-Id 3.3.3.3 so he will be BDR.

to check who is DR/BDR : show ip ospf neighbor

R1(config)#do show ip ospf neighbor

Router which are nor DR neither BDR will be called as DROTHER

DROTHER routers will exchange database with only DR and BDR on multicast address 224.0.0.6 and then DR will forward that update to all DROTHER routers

But communication among all routers will be direct.

just wondering if someone can confirm if my understanding of ABR and ASBR is correct?

  • ABR - is a router with interfaces in multiple areas

ABR is a router with interfaces in multiple areas AND AREA 0. At least in Cisco, if you have router with interfaces in different areas, but not in area 0, it is not considered (nor behaves like) an ABR.

  • ASBR - is a router which redistributes routes whether connected, from another protocol etc. into OSPF

Autonomous System Boundary Router (ASBR) is a router that is running multiple protocols and serves as a gateway to routers outside the OSPF domain and those operating with different protocols. The ASBR is able to import and translate different protocol routes into OSPF through a process known as redistribution

What is the difference between Stub and Totally Stub Areas of OSPF?

Routers in stub area do not need to know about all the external destinations and The routers in stub area must send a packet to the ABR to reach the ASBR,

  • no type 5 external LSA
  • no ASBR allowed
  • config-router)#area 2 stub

while routers totally stub area do not need to know about all external destinations or any summary LSA from the backbone for other areas. The routers in totally stub area must send packets to the ABR to reach any destination outside the totally stub area

  • no type 3 summary LSA
  • no type 5 external LSA
  • no ASBR allowed
  • config-router)#area 2 stub no-summary

when you use OSPF all the areas have to be directly connected to the backbone area. Is this really true? Areas have to be connected to the backbone area but if they aren’t we can fix it with a virtual link. Virtual links can be considered as duct tape for OSPF: They can fix things in a pinch, but aren't intended to be a permanent solution and should never comprise your original design

https://networklessons.com/ospf/ospf-path-selection-explained

OSPF Note BooK : A Ten-Day Journey https://www.linkedin.com/pulse/ospf-note-book-ten-day-journey-md-kamruzzaman-khan?utm_source=share&utm_medium=member_android&utm_campaign=share_via

ospf.txt · Last modified: 2023/06/21 15:34 by sysadm