OSPF Interview Questions & Answer Part-5 | OSPF Route Types | E1,E2 & N1 / N2

Summary Insights:
- In OSPF Series today I will elaborate about OSPF route type & Interview Questions with summarized answer of this topic.
OSPF Route Type Interview Questions:
- How many external route type in OSPF?
- Which one is preferred, Router type or Cost in OSPF during route selection?
- What is difference b/w E1 & E2?
- E1 versus N1?
- Which route will be preferred Intra or inter area?
- Where will use OSPF External E1 route?
- How to calculate cost of E1 & E2 Routes?
Mainly there are two type of OSPF Route mentioned below, Further are the sub type of these.
- Internal Route
- External Route

Internal Route:
The route which are belonging to one OSPF Domain is called Internal OSPF route. Means that all route that are learnt in one OSPF Process. Keep in mind that different OSPF processes are not belong to one Domain. For example OSPF process 10 & 20 are different Domain.
Now in Internal OSPF route type we have total two sub type as mentioned below.
- Intra Area Route
- Inter Area Route
Intra Area Route:
The route generated & learnt in same area called Intra area route. These routes are represented by “O” in routing table. Intra area route cannot cross area.
Inter Area Route:
The route which are advertised & learnt between different areas. In routing table it is mentioned with “O IA” Symbol.
Note:
Route type is preferred than cost of route during route selection in routing table.
Let me explain this with example. If one route learned in same intra area (O) with High cost & also same route learned from Inter area(O IA) with less cost Then Intra area (O) route will be selected.
External Route:
Next let’s discuss External Route type. The route which learnt from different domain like different OSPF process or redistribute/import from other protocols RIP, BGP & static etc. Generally external route is divided in terms of Normal & Special area. Then in each type there are two types 1 & 2 i-e E1/E2 and N1/N2.
Normal Area External Route:
- External Type 1 (E1)
- External Type 2 (E2)
Special Area NSSA External Route:
- NSSA Type 1 (N1)
- NSSA Type 2 (N2)
When we import/redistribute external routes on ASBR by default its type is E2.Now let me explain the difference b/w Type 1 & 2.
OSPF External Routes (E1 vs E2 OR N1 vs N2):
External Route Type-1:
When External route are redistributed on ABSR then ASBR will advertise this route to all routers & ABR in the same area with external prefix cost. Next ABR will advertise this route to other area routers & also add cost of the path where this route traversed.
In simple words in Type-1 total cost is equal to External prefix cost plus internal Cost.
Type-1 Cost = External Prefix Cost + Internal Cost
Below Diagram for more details

External Route Type-2:
After import/redistribution of routes on ASBR then it will advertised the same like type-1 But without addition of internal costs.
Type-2 Cost = External Prefix Cost only
