In this article, we will discuss Open Shortest Path First (OSPF). It is an open standard routing protocol which is defined as RFC 2328 for IPv4 and RFC 5340 for IPv6. There is a total of 5 packets(messages) and 8 Neighborship states. Let’s discuss this in more detail!
Quick Overview to OSPF
OSPF is one of the famous IGP protocols, which operate in a single autonomous system number. It uses Dijkstra’s algorithm, also known as SPF (Shortest Path First) algorithm to calculate the best path to the destination. Unlike other dynamic routing protocols, each router of OSPF knows the complete topology. However, the forwarding decision is taken based on Best Route in the routing table. Like EIGRP, OSPF also works on the network layer of the OSI Model and its protocol number is 89.
OSPF uses path cost as a basic metric. This metric depends upon interface bandwidth. According to Cisco, the cost of 100Mbp/s link is 1, 10Mbp/s link is 10 and 1Mbp/s is 100, and so on. However, links that are greater than 100Mbp/s also have metric 1.
Different Types of OSPF Area
To divide large and complex OSPF networks into small groups, OSPF introduces Areas. In OSPF, the area is used for the logical grouping of Hosts and Routers. With the help of these areas, we can understand OSPF topology easily and the router can make routing decisions easily. Cisco recommends, that we should put a maximum of 30 routers in an area.
It is a Core Area of OSPF protocol. The backbone area is also known as Area 0 or Area 0.0.0.0. All other routers are connected to this area either directly or indirectly. The backbone area is responsible for forwarding routing information to all non-backbone area routers. All OSPF areas must be connected to the backbone area.
A stub area is the OSPF area which has the following properties:
- It is used to filter type 4 LSA and Type 5 LSA.
- After filtering type 4 LSA and Type 5 LSA, it automatically generates a default route.
- The default route is advertised by ABR in the form of LSA3.
- We configure stubs for all the routers present in an area.
- We can’t configure Area 0 as a stub area.
- The stub area does not allow a virtual link.
- However, the Stub area doesn’t allow an ASBR router, that’s why we can’t configure the stub area near the ASBR router.
When we configure an area as a stub, then it brake the neighborship with neighbor router and then send next Hello Packet with the stub-bit.
Let’s take a look, how we configure Stub Area!
GNS3Router(router-configure)#area 3 stub
Totally Stub Area
- It filters LSA3, LSA4 & LSA5, or external as well as inter-area routes.
- It automatically generates the Default route in the form of LSA3.
- Needs to implement only on the ABR router.
- No virtual link allowed.
- We should declare all area routers as stub routers.
This command can use to configure OSPF Totally Stub Area:
GNS3Router(router-configure)#area 3 stub no-summary
Not-So-Stub Area (NSSA)
- It is used to allow an ASBR to send external routes through Stub Area by using type 7 LSA.
- We can filter LSA4 & LSA5, although re-distribution is allowed.
- ASBR router will generate type 7 LSA after that ABR will convert type 7 LSA back to type 5 LSA.
- A default route can be manually configured.
- Could be implemented on all routers of an area.
- The default route will come in the form of LSA7.
GNS3Router(router-configure)#area 3 nssa
GNS3Router(router-configure)#area 3 nssa default-information originate
- It filters LSA3, LSA4, and LSA5.
- The default route will automatically generate.
- Implemented only on ABR router.
- It allows re-distribution.
- Default route originates by ABR in the form of LSA3.
GNS3Router(router-configure)#area 3 nssa no-summary
Different Types of OSPF Routers
In OSPF, routers are categorized into four different types. They are
Internal Router (IR)
Internal Router, as the name suggests have all of their interfaces in the same area.
OSPF – Area Border Router (ABR)
The area border router is the router, which is placed between different areas. This router connects one or more different OSPF areas to the backbone area.
Backbone Router (BR)
Backbone Router has at least one interface in the Backbone Area (i.e Area 0). A backbone router could be an Internal Router (IR).
Autonomous System Border Router (ASBR)
Autonomous System Border Router (ASBR) router is used to provide connectivity between different Autonomous Systems. Thus, one interface of the router keeps into the OSPF process and the other interfaces are placed different IGP or EGP protocols.
- EIGRP: The complete guide for Beginner and Expert
- EIGRP Messages Types / Packet Types and Neighborship Parameters
In this article, we discussed the Open Shortest Path First (OSPF) routing protocol. It is a great IGP routing protocol. We have also discussed various Areas and Routers used in OSPF. Path Cost is the basic metric of OSPF, which is used to calculate the best path to the destination.
Did you find this article helpful? Please leave a comment in the comment box!