cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
36953
Views
71
Helpful
9
Replies

differences between n1 n2 e1 e2 in ospf?

xijisky
Level 1
Level 1
1 Accepted Solution

Accepted Solutions

thisisshanky
Level 11
Level 11

The basic difference between a N type as well as E type is that they belong to two different types of LSAs. Type 5 is E and Type 7 is N. An external route (redistributed from another routing protocol, static route or connected route) will be tagged as a Type 5 LSA (E route). This LSA is circulated throughout the OSPF domain except for Stub, Totally Stubby and Not-so-stubby areas.

Stub areas are not allowed to have external routes, which means there should be no ASBR in a Stub area. But if you have a situation where you have to have a ASBR in your Stub area the only solution is to configure the Stub area as Not-So-Stubby Area or NSSA. A route redistributed (from a connected, static or other routing protocol) inside an NSSA area is a Type 7 LSA or N route. This LSA is circulated only within the NSSA area.

E1 or E2 or N1 or N2 type routes are based upon cost of the route.

E2 or N2 routes tell OSPF routers to set the metric as the metric at the point of redistribution.(At the ASBR)

E1 or N1 routes tell OSPF routers to add the internal costs to reach the ASBR to the cost set at the point of redistrbution (At the ASBR)

Consider this example. ASBR,R1 R2 R3 are connected in line via Ethernet interface with cost of 10 each.

ASBR(default-metric 50)-------R1-----R2---R3

The cost of routes redistributed at the ASBR into OSPF is set to 50 using "default-metric"command. The cost of the same route in routing table of R1, R2 and R3 will be 50 if the route is tagged as E2. (same applies for N2)

The cost of the same route in routing table of R1 will be 60, R2 will be 70, R3 will be 80, if the route is tagged as E1 (same applies for N1) The costs to reach the ASBR is cumulatively added to the cost of the route set at the ASBR

Hope that helps!

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

View solution in original post

9 Replies 9

thisisshanky
Level 11
Level 11

The basic difference between a N type as well as E type is that they belong to two different types of LSAs. Type 5 is E and Type 7 is N. An external route (redistributed from another routing protocol, static route or connected route) will be tagged as a Type 5 LSA (E route). This LSA is circulated throughout the OSPF domain except for Stub, Totally Stubby and Not-so-stubby areas.

Stub areas are not allowed to have external routes, which means there should be no ASBR in a Stub area. But if you have a situation where you have to have a ASBR in your Stub area the only solution is to configure the Stub area as Not-So-Stubby Area or NSSA. A route redistributed (from a connected, static or other routing protocol) inside an NSSA area is a Type 7 LSA or N route. This LSA is circulated only within the NSSA area.

E1 or E2 or N1 or N2 type routes are based upon cost of the route.

E2 or N2 routes tell OSPF routers to set the metric as the metric at the point of redistribution.(At the ASBR)

E1 or N1 routes tell OSPF routers to add the internal costs to reach the ASBR to the cost set at the point of redistrbution (At the ASBR)

Consider this example. ASBR,R1 R2 R3 are connected in line via Ethernet interface with cost of 10 each.

ASBR(default-metric 50)-------R1-----R2---R3

The cost of routes redistributed at the ASBR into OSPF is set to 50 using "default-metric"command. The cost of the same route in routing table of R1, R2 and R3 will be 50 if the route is tagged as E2. (same applies for N2)

The cost of the same route in routing table of R1 will be 60, R2 will be 70, R3 will be 80, if the route is tagged as E1 (same applies for N1) The costs to reach the ASBR is cumulatively added to the cost of the route set at the ASBR

Hope that helps!

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

thank you so much!

Wow, you should write books man, that's a great explanation. Thanks a million

Thank You for your explanation , I have question here ! we have E2&E2 and we understood the different between them . WHY we need N2&N1? 

in another word what is the Benefit for LSA 7 ?

 

Thank You ,

You won the internet with your great explanation. Thank you!

@thisisshanky   @Julio E. Moisa  @Georg Pauwen

 

Hello shanky which route will prefered best route OE1 vs OE2.  I believe whichever route has lowest metric, which means OE2 will be prefered over OE1. Is that correct ?

 

Path selection on OSPF was different earlier which was O>> O IA >> E1 >> E2 >>N1 >> N2 which has been replaced by the below path preference.

O>> O IA >> E1 >> N1 >>E2 >> N2

 

OSPF will always look at the path type and then metric.

 

To answer your question, though E2 routes have a lower metric than E1 routes the path selection will always be followed based on the path type.

thanks for the explanation! Great answer.

dhananjay95929
Level 1
Level 1

thisisshanky, thanks a lot!! that's an incredible explanation, kudos to you.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: