Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

ospf ext type-1 versus type-2

hi all,

i've heard than ospf will prefer a type2 ext route over a type1 for the same dest

but it will prefer a type1 over a type2 for same dest

same cost.which are right?

SO pure theorical question

let's say an ospf router receives a network ext type1

with a cost of 30 and the same network type2 with a cost of 60 it would prefer the second?

Thanks in advance

3 REPLIES
Bronze

Re: ospf ext type-1 versus type-2

As far as I know, an OSPF router will always prefer a type 1 route to a type 2 route to the same destination network.

A type 1 route has a more accurate path info since it adds the costs on links inside the OSPF network to the cost of the external link. A type 2 route only has the cost of the external link no matter how many links it passes through in the internal network. So generally, a type-1 route will have a higher cost than a type 2 route anyway and routers in the OSPF network will prefer the type-1 route.

-HTH

New Member

Re: ospf ext type-1 versus type-2

OSPF is going to select the path with the shortest path. So in the give example the path with the cost of 30, type 1 external will be selected.

You are correct in sayiny that type 1 adds the cost of the links in the the OSPG domain to the redistributed cost and type 2 routes only use the redistributed cost and do not take into account the OSPF local costs, but that does not mean that type 1 routes are more accurate to the destination network. They are only more accurate through the OSPF domain and do not take into account the link metrics outside of the domain.

Example:

To destination Net1 you have 2 paths, one through a total of 3 P-2-P T1's and the other through 2 OC-12 links. These to paths terminated on 2 different routers. Now you redistribute these into your OSPF as Type 1 External. Inside your OSPF domain, you have a total cost of 2 to the router that has the P-2-P T1, 2 Gigabit Ethernet hops. And you have a cost of 11 to the router with the OC-12 link, 1 Gigabit Ethernet and 1 Fast Ethernet hops. OSPF will select the path through the T1s over the path through the OC-12s, 22 is lower than 31 (default redistibution cost of 20 is assumed). Which path would you rather use?

Cisco Employee

Re: ospf ext type-1 versus type-2

The E1 will always be preferred over the E2 regardless of their respective costs..

RFC2328 Section 16.4

(6) (b) Type 1 external paths are always preferred over type 2 external paths. When all paths are type 2 external paths, the paths with the smallest advertised type 2 metric are always preferred.

Hope this helps,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
3745
Views
0
Helpful
3
Replies
CreatePlease login to create content