Cisco Tips & Tricks

October 24, 2007

E1/E2 routes in OSPF

Filed under: IP Routing, ospf, Router — ciscotips @ 7:41 am

In OSPF we have 2 types of external routes. E1 and E2

For example 

R1#show ip route
Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP

Route redistribution is the process of taking routes learned via one routing protocol and injecting those routes into another routing domain. (Static and connected routes can also be redistributed.) When a router running OSPF takes routes learned by another routing protocol and makes them available to the other OSPF-enabled routers it’s communicating with, that router becomes an Autonomous System Border Router (ASBR). Let’s say R1 is running both OSPF and RIP. R4 is in the same OSPF domain as R1, and we want R4 to learn the routes that R1 is learning via RIP. This means we have to perform route redistribution on the ASBR. The routes that are being redistributed from RIP into OSPF will appear as E2 routes on R4:R4#show ip route ospfO E2 5.1.1.1 [110/20] via 172.34.34.3, 00:33:21, Ethernet06.0.0.0/32 is subnetted, 1 subnets

E2 is the default route type for routes learned via redistribution. The key with E2 routes is that the cost of these routes reflects only the cost of the path from the ASBR to the final destination.  It will not reflect the correct “Cost” or path. 

Now if  we want the cost of the routes to reflect the entire path, not just the path between the ASBR and the destination network. The routes must be redistributed into OSPF as E1 routes on the ASBR, as shown here.

.
R1(config)#router ospf 1
R1(config-router)#redistribute rip subnets metric-type 1
Now on R4, the routes appear as E1 routes and have a larger metric, since the entire path cost is now reflected in the routing table.O E1 5.1.1.1 [110/94] via 172.34.34.3, 00:33:21, Ethernet06.0.0.0/32 is subnetted, 1 subnets

Advertisements

2 Comments »

  1. Hi

    Please help to learn about the interview question in network support.
    I am hands on in Cisco Router and switch configuration part.
    But I am not CCNA certified kindly help to learn more about theory part Cisco.

    Comment by Ravi Srivastava — August 24, 2009 @ 7:41 pm

  2. My understanding about E1 & E2 routes.

    E1 routes contains Internal cost + external cost . total cost……….

    E2 routes contains only external cost. Which means ASBR to external Networks. its of default route!!!!!!!!!!!

    Comment by Thirukumaran — October 28, 2011 @ 9:51 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: