cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Bookmark
|
Subscribe
|
27833
Views
15
Helpful
9
Replies

Differene between E1 & E2 Routes in OSPF

bava_ccna
Level 1
Level 1

When i look at the routing table of my OSPF router it shows lot of E1 and E2 routes.What is E1 and E2 routes.whate is the difference between them

Regards

Bava

9 Replies 9

Harold Ritter
Spotlight

Bava,

Please refer to the following document to find out what are the differences between the E1 and E2.

http://www.cisco.com/warp/public/104/3.html

Regards,

Regards,
Harold Ritter, CCIE #4168 (EI, SP)

bvsnarayana03
Level 5
Level 5

E1 routes indicate cumulative cost to reach the destination i.e. int indicates cost to reach ASBR + cost to destination from ASBR.

E2 route reflects cost only from the ASBR to destination. This is the default used by ospf for redistribution.

And if I may add to above replies, E2 is the default for redistribured routes.

HTH

Sam

PS:apologies , this was already covered.

Hello

Why E2 is the default ????

 

 

Hmm, don't know if something like "why" is documented by the OSPF group, but two possible reasons come to mind.

First, probably reduces some CPU load on the router, as it doesn't also have to calculate "cost" for an external route.  (NB: CPU was a lot more constrained when these standards were initially done, then they are today.)

Second, possibly an assumption that you don't often have multiple paths to the ASBR, so often no need for a "cost" calculation at all.

Very good

Tanx for answer 

I dont agree this answer because for E2 routes the OSPF is still calculating the cost to reach ASBR but is not shown in metric but is shown as a forward metric , IF there are more than 1 ASBR then for the best path selection Forward metric will come into picture , 

For more information please read the following blog

https://ine.com/blog/2011-04-04-understanding-ospf-external-route-path-selection

Please feel free to correct me

"Please feel free to correct me"

Perhaps the only correction is I was discussing "apples" and you're comparing them to "oranges".  ; )

The question I was replying to was "Why E2 is the default ????", I believe in context of E1 vs. E2 when you don't explicitly select the external type.

One of my answers was the OSPF group may have believed it could save CPU cycles avoiding path cost calculation.  As I noted I haven't seen documentation on the actual reason(s), so mine is but a supposition.

From your reference, I take it you believe such a supposition is totally unfounded?

Well, that's certainly possible, but conversely, though, your reference doesn't discuss what platform (Cisco?) is being used and/or supporting OSPF RFCs.

I don't doubt your reference got the results shown, but are they correct (i.e. as Cisco intends) and/or how to they correspond to OSPF RFCs?

Both, very important, as I've personally have documented one bug in Cisco's OSPF (which they corrected) and OSPF RFCs have changed over the years dealing with path selection.  Along with those changes, which RFC standard Cisco is using depends on the age of the IOS and/or what RFC option (if provided) is configured.

In other words, might the author of that reference be making their own suppositions?

That aside, that reference shows a case where internal path cost for E2 does appear to be taken into consideration.

Firstly, did you notice the reference's example had to get into inter-area paths to ASBRs to have equal cost E2s not treated equally?  You do know inter-area OSPF has its own considerations, which have changed based on what RFC is being used?  You might find this Cisco TechNote of interest.

BTW, I'm not saying RFC 1583 vs. RFC 2328 actually matters in this case, but just want to make clear when you get very technical, as your reference does, it helps to be very technical.  Further, I assume you're also aware of all the "gray" areas of Cisco's OSPF implementation vs. RFCs?  In other words, unless a RFC says something must be done, or not done, implementations have pretty much a free hand in doing whatever they want.  (Cisco has done much of this with their OSPF implementation, for much benefit, IMO, but you cannot say something they do, precludes or excludes other "opinions" in the same "gray" area.  [For example, I learned OSPF on Cisco, so I was surprised OSPF cost is dimensionless, i.e. it's not by design, intended to represent bandwidth {e.g. autocost}.])

So, I think it still possible, the OSPF design, took into account saving CPU cycles, where possible, and an E2, might save CPU cycles.

Also BTW, in that reference, I set up my own lab, doing intra-area E2s, and for those, intra-area calculated path costs didn't seem to matter.

 

 

Router#sh ip os in br
Interface     PID   Area                     IP Address/Mask          Cost  State  Nbrs F/C
Gig0/0/0        1   0                      192.168.1.2/255.255.255.0   1    POINT  0/0
Gig0/0/1        1   0                      192.168.2.2/255.255.255.0   10   POINT  0/0

Router#sh ip route
.
.

Gateway of last resort is not set

     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/0/0
L       192.168.1.2/32 is directly connected, GigabitEthernet0/0/0
     192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.2.0/24 is directly connected, GigabitEthernet0/0/1
L       192.168.2.2/32 is directly connected, GigabitEthernet0/0/1
O E2 192.168.3.0/24 [110/20] via 192.168.1.1, 00:03:25, GigabitEthernet0/0/0
                    [110/20] via 192.168.2.1, 00:01:46, GigabitEthernet0/0/1

 

 

I'll close with agreeing with the reference's author, CCIE level goes beyond CCNA or CCNP levels, and is often the level needed to resolve why an unexpected result occurred.  But, that article, alone, doesn't prove or disprove anything, because it only shows one example, which may represent a bug, or an OSPF feature, may violate OSPF standards, may be part of OSPF standards, or non-standard, but not in violation.

Above I showed output, where E2s didn't take into account computed intra-area cost to ASBRs.  However I did this on Packet Tracer, ver. 8.2.2.0400, but I often find Packet Tracer doesn't always accurately reflect IOS functioning on actual Cisco platforms.  When concerned about accuracy, I lab same with Cisco's CML, which much better represents current IOS, but it, or any platform, can have feature bugs or non-standard "features".  So, if you really want to know what OSPF ought to be doing, you need to dive into the RFCs, which I haven't done, because, first for the question I replied to, I didn't think it worth the time, and second, something like my supposition, about CPU impact, is unlikely to be documented in a RFC, but if you worked on computer hardware 50 years ago, trying to be efficient or using the minimal CPU cycles to accomplish something was "understood".  "Speed" is often appreciated, even today, although today, often the focus is on "faster" hardware rather than "better" algorithms.

Finally, to be clear, again, my reply was a supposition on "why"; not a declaration of how any OSPF implementation actually works or should work.  As to whether E2 path cost is actually calculated to an ABR, it always is, i.e. standard computation to reach a destination, but is it calculated for the E2, itself, or used as a tie breaker?  At least in my PT lab, for intra-area, it implies it was not.  And if not, that would likely save some CPU cycles, agree?

BTW, I started as a programmer in '79, and have coded, professionally, in assembler.  So, I have some first hand experience in the capabilities of the hardware then, and how to get the most out of it.

"Please feel free to correct me"

More . . . (laugh)

Again, not so much you need correction, but the article you referenced bothered me, starting with:

 

This is actually a very common area of confusion and misunderstanding in OSPF. Part of the problem is that the vast majority of CCNA and CCNP texts teach the theory that for OSPF path selection of E1 vs E2 routes, E1 routes use the redistributed cost plus the cost to the ASBR, while with E2 routes only use the redistributed cost. When I just checked the most recent CCNP ROUTE text from Cisco Press, it specifically says that "[w]hen flooded, OSPF has little work to do to calculate the metric for an E2 route, because by definition, the E2 route’s metric is simply the metric listed in the Type 5 LSA. In other words, the OSPF routers do not add any internal OSPF cost to the metric for an E2 route." While technically true, this statement is an oversimplification. For CCNP level, this might be fine, but for CCIE level it is not.

 

because I've usually found Cisco Press Text books pretty accurate.  Hmm, an oversimplification, well that's possible, you'll often see that even in many responses on these forums, but there are ways to simplify without precluding that there's possible more detail, but unmentioned.  (For example, using words like "always" or "never", when there are rare situations that's not true.)

Anyway, it's an interesting article, but I believe the author has also made an oversimplification.

The author describes how R1 calculates the best path to the ASBR, i.e.:

 

The final result of this is that R1 chooses the shorter path to the ASBR, which is the R1 -> R3 -> R5 path. Although the other route to the prefix is via an E2 route with the same external cost, one is preferred over another due to the shorter ASBR path.

 

Well, not exactly.

OSPF path calculation, i.e. SPF, is per area!  What R1 is really doing is calculating the shortest path to the ABR which leads to the ASBR.

The author does confirm this, if you wade through all the details, but the above quotation doesn't make that clear, i.e. it's an oversimplification.

This is another reason, inter-area routing is different from intra-area routing.