cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1644
Views
0
Helpful
3
Replies

OSPF E1 and E2 confusing

Steev112
Level 1
Level 1

             Dear All,

i have confusing between E2 and E1, as showing in the network diagram, if i redistribute the loop back under ospf as following:

router ospf 100

redistribute connected subnet

when i do show ip route on R3 for any loop back subnet (show ip route 1.1.1.1) i will see this subnet will come from R4 not fom R1 because the forword cost from R2 to R4 less than the forward cost from R1 to R3.

my question is what the benifit to use E1 if E2 take the forward cost.

Thanks 

3 Replies 3

blau grana
Level 7
Level 7

Hi Steven

you redistributed connected loopbacks on R2 into OSPF domain.

- cost of 20 is set for theese subnets

- external metric-type 2 is used, which means that no routers in OSPF domain add cost to theese E2 routes

- OSPF will choose best route based on best metric, but both metrics on R3 (route from R1 and R4) will tie so decision is based on internal cost  to ASBR (R2).

So R3 will use R4 as next hop because of lower cost to ASBR, R2.

difference between E1 and E2 routes:

E2:

- OSPF choose best route based on external cost (set by ASBR), if tie occurs best internal cost to ASBR will win

- routers do not add cost to E2 routes

E1:

- OSPF chooses best route based on combination of external and internal cost

   - external cost set by ASBR (by default 20)

   - internal cost - routers add cost to E1  routes

usage of E1 and E2:

E1: multiple ASBRs exist so each OSPF router will forward traffic via closest ASBR, local domain topology is considered

E2: prefer one ASBR (primary/secundary path), local domain topology is not considered

OSPF always prefer E1 over E2 routes for same prefix/length

Best Regards

Please rate helpful posts

Best Regards Please rate all helpful posts and close solved questions

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

Not also calculating internal cost to the ASBR probably reduces CPU computation load (a tiny bit).

If you had multiple ASBRs, advertising the same network(s), and you wanted to load balance to them you might need to ignore internal path cost.

Richard Burts
Hall of Fame
Hall of Fame

Steven

I agree that the difference between E1 and E2 can be confusing. E1 routes will explicitly take into account the local metric within the OSPF domain while E2 are based only on the external cost.

I found this explanation in the Cisco OSPF design guide which explains the behavior in your example where the redistribution is creating E2 routes.

If the external routes are both type 2 routes and the external costs to       the destination network are equal, then the path with the lowest cost to the       ASBR is selected as the best path.

You can use this link to find more information about the differences between the types of OSPF external routes.

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t32

When you have only a single router doing redistribution into OSPF it is hard to find much difference if using E2 and I would generally prefer to redistribute specifying type 1 (E1) routes. It is in circumstances where more than one router is redistributing into OSPF that there may be advantages in using E2 routes.

HTH

Rick

HTH

Rick