Enhance your Career in Networking With IPinBits!!!​

OSPF ROUTE TYPES

So far we have seen OSPF packet types, OSPF Messages, OSPF Areas, DR/BDR election and stuff.

This article will help in understanding all the OSPF route types, and what is their significance, which is default types in whereas cases like NSSA or between Two Areas.

The below shows the overview of all the route types which are present in OSPF, we will see each and type in brief with lab output in this Article.

O IA /O*IA 

OE1 

OE2

ON1

ON2

How to read the above route types and what is the significance of each, let’s see

As per above diagram we have OSPF Running between all routers R1, R2, R3, R4. R5 is in external routing domain. Area 0 is backbone area, we will focus on R1 and R2 OSPF routes.

O or Intra-Area: In a multiarea OSPF network, routes, originated within an area, are known by the routers in the same area as Intra-Area routes. These routes are flagged as O routes as shown in the above output 30.30.30.30/32, 31.31.31.31/32 both are the loopback addresses of R3 routers which are advertised in area 0 by R3 to R2 in OSPF, since both are in same area so its O or Intra area routes

External Routes: They fall under two categories, External Type-1 and External Type-2. The difference between the two is in the way the cost (metric) of the route is being calculated. The cost of a Type-2 route is always the external cost, irrespective of the interior cost to reach that route. A Type-1 cost is the addition of the external cost and the internal cost used to reach that route. A Type-1 route is always preferred over a Type-2 route for the same destination.
External Type-2 or External Type-1—Routes which were redistributed into OSPF, such as Connected, Static, or other Routing Protocol, are known as External Type-2 or External Type-1. These routes are flagged as O E2 or O E1 in the show ip route command output. External Type-2 is the default.
Refer the lab output, for now the type is 2, I will change the metric type and show below how OE1 looks like. So, in the lab, all the routes which were generated apart from area 1 and area 0 (R2 has two interfaces each in area 1 and area 0), will be external routes, e.g R4 loopback address, or routes from external domain if its non-stub areas.

O IA/ O*IA OR Inter-Area: When a route crosses an OSPF Area Border Router (R2/R3), the route is known as an OSPF Inter-Area route. These routes are flagged as O IA as shown above in the lab output.
O*IA are the default routes which are manually or automatically injected as we show in the stub area articles.
Both Intra and Inter-Area routes are also called OSPF Internal routes, as they are generated by OSPF itself, when an interface is covered with the OSPF network command.

NSSA external type 2 or NSSA external type 1: When an area is configured as a Not-So-Stub Area (NSSA), and routes are redistributed into OSPF, the routes are known as NSSA external type 2 or NSSA external type 1. These routes are flagged as O N2 or O N1 in the show ip route command output. Default type is 2.
We had made area 1 as NSSA (separate article already present in KB). So, the routes which are injected by RIP the external routing domain into OSPF will be marked as NSSA N2 routes since area 1 is NSSA, and it will be propagated further.
The below output is taken after changing the default type for both external and NSSA routes to type 1.

Related blog posts