Introduction to OSPF Routes
Before discussing OSPF N1 and N2 routes, it is essential to understand OSPR routes.
OSPF external routes in a normal area would appear as either E1 routes or E2 routes. By default when we configure the redistribution of external routes in an OSPF area the route type for the external network is E2 which appear as OE2 in the routing table.
- E1 are the route when the cost of the internal links is taken into consideration for SPF calculation.
- E2 are the routes which take only the external link cost into the SPF calculation.
OSPF N1 and N2 Routes
OE1 or OE2 both are represented by LSA type 5 in the OSPF database. Now in a special OSPF area, NSSA or Totally NSSA the LSA type 5 cannot be propagated. Hence a new LSA type 7 is propagated in these areas by the respective ABR for that area. In the routing table of routers in NSSA OSPF areas the external routes instead of appearing as OE1 or OE2 routes would appear as OSPF N1 and N2 routes (i.e. ON1 route or ON2 route). ON1 routes are very similar to OE1 routes and ON2 are similar to OE2. Default metric for OE2 and ON2 routes are 20.
We will check all these OE1 and OE2 in the topology below –
In the topology above the route for 220.127.116.11 will be redistributed from EIGRP domain to OSPF area 20 which is NSSA area on router R5 acting as the ASBR. This type 7 LSA (ON2) on reaching the router R3 is converted to Type 5 LSA (OE2) and is propagated to area 0 and area 10 there onwards.
Related- Ultimate Guide on OSPF LSA Types
Output (OSPF N1 and N2 routes)
On R4 we see the route for external subnet appears as N2 route by default. If we need to modify the default behaviour and have N1 route then we need to specifically mention that as the time of redistribution of EIGRP in OSPF on router R5.
R4# sh ip route | i N2
On R1 and R2 if we see route for 18.104.22.168 appears as OE2 route as R3 has converted the type 7 LSA to type 5 LSA.
R1#sh ip route | i E2
R2# sh ip route | i E2
On adding the below command on R5 at time of redistribution
Now we will be able to see the route for external subnets as ON1 and OE1.
R4#sh ip route | i N1
R2#sh ip route | i E1