Introduction to OSPF
OSPF is the industry standard for interior dynamic routing protocols and it’s supported by most vendors. Basics functions of OSPF are; single and multi-area configuration, link priority, DR/BDR Election, OSPF network types, stub area types, timers, default route propagation, route summarization and Link State Advertisements (LSA) Types. etc…
OSPF is a link state protocol – each router maintains a topology map of their entire areas. Routers in Area 0 maintain the topology for the entire network which makes them backbone routers. Backbone routers know every single link and route. Just because a backbone router knows about the link does not mean it will use that link in the routing table. Many factors can take into play to manipulate the “best path” such as a distribute list, route maps or policy based routing.
OSPF was designed to support Variable Length Subnet Masking (VLSM) and a hierarchical network model by nature. All traffic destined between areas, known as inter-area traffic must traverse area 0 which is called the backbone area. All area’s must have a single interface attaching the area to area 0. Routers that have these connections to Area 0 are called Area Boarder Router(s) (ABR’s). Any routers that connect an area to an external autonomous system are called Autonomous System Boundary Router(s), (ASBR’s). These routers connect OSPF to an external network such as the internet or a redistributed autonomous system.
OSPF does not use TCP/UDP to encapsulate its traffic but instead encapsulates the traffic into its own protocol; protocol number 89. OSPF sends multicast traffic packets have a TTL of 1 so they never travel further then 1 hop. OSPF uses the destination addresses 225.0.0.5 for all OSPF routers and 224.0.0.6 for communication between the DR/BDR (Designated Router and Backup Designated Router). You can only summarize routes at an ABR/ASBR on the link facing the inbound towards the network.
OSPF uses a centralized management method of distributing route updates on networks. On multi-access networks such as Ethernet or frame relay point-to-multipoint, a Designated router and potentially backup designated router is elected. The function of the DR is to distribute updates to the other routers connected on the multi-access network. The Backup Designated Router will take over the Designated roll if the DR fails. So with that said, If R1 is the DR then R2 could be the BDR and when a link on R3 goes down it informs R1 which in turn informs all other routers on the multi-access network segment.
The DR/BDR election winner is determined by one of several factors, whichever breaks the tie. OSPF Interface Priority takes precedence. By default all interfaces send hello packets with an OSPF priority of 1. If an interface has the OSPF interface priority of 0 then that router will never become the DR/BDR for that particular network segment. If all OSPF interface priorities match then the highest router ID wins. The Router-ID can be statically configured under the OSPF routing process configuration mode or it is dynamically determined by the highest IP address of a loopback interface. If no loopback interfaces exist on the router then the highest IP address of an active interface becomes the router-id for OSPF. For example; 192.168.0.1/24 is higher then 10.0.0.1/24
If a router comes online with a higher priority/router-id then that router will not preempt the DR/BDR role but will have to wait until a role change. DR or BDR failure. The Router Priority ranges between 0-255.
The DR’s purpose is to provide a central source for routing updates and to reduce traffic. All routers form a neighbor relationship with the DR/BDR but not between DROTHER’s (Non DR or BDR Routers)
DR/BDR routers are not elected on point-to-point networks as there are only two routers on the link. A DR/BDR is also not elected on a point-to-multipoint network type due to OSPF treating the network type as a collection of point-to-point interfaces.
OSPF LSA Types:
LSA Number | LSA Name | Description |
---|---|---|
Type 1 | Router LSA | Generated by all routers in an area and list the directly connected networks; this specific LSA do not transit the ABR/ASBR into other areas. |
Type 2 | Network LSA | Generated by the DR on a multi-access network such as Ethernet to identify all routers to that network segment. This LSA type is flooded through out the local area only. Both Type 1 and Type 2 LSA’s advertise Intra-Area routes denoted as (O) Routes in the routing table. |
Type 3 | Summary LSA | Generated by the ABR to describe summary routes to neighboring routers outside of the Area such as an Area 1 ABR summarizing the 10.20.0.0/12 network to Area 0. |
Type 4 | Summary LSA | Generated by an ABR to describe route(s) to an ASBR to outside neighboring routers. For example an ABR telling Area 0 that an ASBR is located inside Area 1. LSA’s Type 3 and 4 advertise Inter-Area routes; denoted as (O*IA) routes in the routing table. |
Type 5 | External LSA | Generated by an ASBR to describe routes towards an external network such as redistributed networks. These routes are denoted as (O*E#) Routes in the routing table. |
Type 7 | NSSA External LSA | Generated by an ASBR in an Not-So-Stubby-Area which describes a route to an external network. These LSA’s are sent to the ABR which in turn translates these LSA’s to Type 5 to be sent into the Backbone area. These routes are denoted as (O*N#) Routes in the routing table. |
OSPF Area Types:
Area Type | Description and/or Function |
---|---|
Backbone Area | Permits all LSA types except Type 7. This same rule applies to non-backbone, non stub area routers. |
Stub Area | An area that has a single exit point and blocks type 5 LSA types and receives type 3/4 LSA’s with a default route (0.0.0.0/0) |
Not-So-Stubby-Area (NSSA) | This area allows for a stub area to have characteristics of a stub and non stub. External routes redistributed into the OSPF autonomous system by am NSSA advertising an LSA type 7 which is translated at the ABR to type 5 and forwarded into the OSPF backbone. |
Totally Stubby Area | Permits type 1 and 2 LSA’s while blocking types 3*/4/5/7 LSA’s. *TSA’s receive a single type 3 LSA containing a default route to the ABR. |
Totally NSSA | Is an area that permits LSA’s 1, 2 and 7 while blocking 3 4 and 5. This stub area receives a default route from the ABR using a type 3 LSA. |
Leave a Reply