cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2633
Views
0
Helpful
1
Replies

What is the point a external E2 OSPF types?

OK so I have an ASBR and it redistributes any prefix (call it perfix A) into an OSPF area with a type 2 metric. This means that metric does not increase as it is passed through the OSPF area.

However when any given router receives two routes for prefix A the metric will obviously tie. What does the router do to resolve the tie? In essence it will use the interface whose metric to the ASBR is smallest as the outgoing interface.

My questions are as follows:

- Does the router put BOTH routes in the routing table? I am assuming not (I shall go and GNS this shortly)

- Is there any way the router can equal cost load balance between the two (afterall the metric IS the same).

- If the metric had been type 1 it would have incremented as it passed through the network - meaning that any given router would use the interface whose metric to ASBR is smallest  as the outgoing interface (because the metric out of that interface would be the smallest). So the tie breaker, for E2 routes, is to basically fall back and treat them as E1 routes.... but E2 routes, by definition, will always tie. So what is the point?

The only place where I can figure that E2 routes are useful is where there are multiple redistribution points. That way you can force the routers to prefer one ASBR over another. Beyond that, I cannot see any reason to using E2 routes over E1 routes - especially in a network with a single redistribution point.

..............wait.....................

After typing all of this. It has dawned on me that because of the way OSPF works (link state) the only circumstance in which you would receive "two routes for prefix A" as I state above is if there were 2 redistribution points. OSPF routes dont send messages to each other saying "hey I have a path to this network and it costs this much". They simply exchange LSAs and the individual routers look at it and calculate routes on their own.

Does that make any sense or am I just confusing the matter???

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hello Steven,

In essence it will use the interface whose metric to the ASBR is smallest as the outgoing interface.

Yes, you are correct. To put it succintly, in the case the same external type-2 network is advertised by multiple ASBRs, the router will first choose the route with the smallest type-2 metric (which is constant, as you have correctly noted). If there are still multiple choices, OSPF will choose the path with the lowest total metric to the advertising ASBR. If still multiple choices remain even after this second elimination round, OSPF will use all remaining paths and the router will load balance among them.

- Does the router put BOTH routes in the routing table? I am assuming not (I shall go and GNS this shortly)

Yes but only if both routes provide the same distance to the ASBR or ASBRs advertising the external network with the same lowest type-2 metric.

- Is there any way the router can equal cost load balance between the two (afterall the metric IS the same).

Only if multiple routes are installed by OSPF into the routing table. The elimination process is described right above.

If the metric had been type 1 it would have incremented as it passed  through the network - meaning that any given router would use the interface whose metric to ASBR is smallest

No, this is not correct. With type-1 metrics, the router will choose the path with the lowest total cost, summing the total distance from itself to the ASBR, plus the starting metric with which the route was redistributed into OSPF. With type-1 metrics, OSPF may choose a route through more faraway ASBR as long as the total cost is the lowest available.

The only place where I can figure that E2 routes are useful is where  there are multiple redistribution points. That way you can force the  routers to prefer one ASBR over another. Beyond that, I cannot see any  reason to using E2 routes over E1 routes - especially in a network with a  single redistribution point.

Completely true. With a single redistribution point, the difference between type-1 and type-2 metrics is insignificant. RFC 2328 puts it quite nicely:

        OSPF supports two types of external metrics.  Type 1 external
        metrics are expressed in the same units as OSPF interface cost
        (i.e., in terms of the link state metric).  Type 2 external
        metrics are an order of magnitude larger; any Type 2 metric is
        considered greater than the cost of any path internal to the AS.
        Use of Type 2 external metrics assumes that routing between
        AS'es is the major cost of routing a packet, and eliminates the
        need for conversion of external costs to internal link state
        metrics.

After typing all of this. It has dawned on me that because of the way  OSPF works (link state) the only circumstance in which you would receive  "two routes for prefix A" as I state above is if there were 2 redistribution points.

Well, you may have multiple paths to a single ASBR, you may have multiple ASBRs, and you may have multiple paths to multiple ASBRs. You always need to have a mechanism to distinguish which path (or set of paths) is the best. So even in a network with a single ASBR, you may see multiple paths towards it. So even here, you need to choose.

Remember, the type-2 works as follows:

  • Choose the ASBR advertising the lowest type-2 metric.
  • If there are multiple such ASBRs, select the one that is closest to you.
  • If there are multiple such ASBRs, use all of them.

Type-1 works differently:

  • Choose the ASBR that provides the least sum of type-1 metric plus the cost to reach it.
  • If there are multiple such ASBRs, use all of them.

Feel welcome to ask further!

Best regards,

Peter

P.S.: These rules get more complicated if the ASBRs also advertise the forwarding address in their LSA-5. Don't try to wrap your head around those for the time being.

View solution in original post

1 Reply 1

Peter Paluch
Cisco Employee
Cisco Employee

Hello Steven,

In essence it will use the interface whose metric to the ASBR is smallest as the outgoing interface.

Yes, you are correct. To put it succintly, in the case the same external type-2 network is advertised by multiple ASBRs, the router will first choose the route with the smallest type-2 metric (which is constant, as you have correctly noted). If there are still multiple choices, OSPF will choose the path with the lowest total metric to the advertising ASBR. If still multiple choices remain even after this second elimination round, OSPF will use all remaining paths and the router will load balance among them.

- Does the router put BOTH routes in the routing table? I am assuming not (I shall go and GNS this shortly)

Yes but only if both routes provide the same distance to the ASBR or ASBRs advertising the external network with the same lowest type-2 metric.

- Is there any way the router can equal cost load balance between the two (afterall the metric IS the same).

Only if multiple routes are installed by OSPF into the routing table. The elimination process is described right above.

If the metric had been type 1 it would have incremented as it passed  through the network - meaning that any given router would use the interface whose metric to ASBR is smallest

No, this is not correct. With type-1 metrics, the router will choose the path with the lowest total cost, summing the total distance from itself to the ASBR, plus the starting metric with which the route was redistributed into OSPF. With type-1 metrics, OSPF may choose a route through more faraway ASBR as long as the total cost is the lowest available.

The only place where I can figure that E2 routes are useful is where  there are multiple redistribution points. That way you can force the  routers to prefer one ASBR over another. Beyond that, I cannot see any  reason to using E2 routes over E1 routes - especially in a network with a  single redistribution point.

Completely true. With a single redistribution point, the difference between type-1 and type-2 metrics is insignificant. RFC 2328 puts it quite nicely:

        OSPF supports two types of external metrics.  Type 1 external
        metrics are expressed in the same units as OSPF interface cost
        (i.e., in terms of the link state metric).  Type 2 external
        metrics are an order of magnitude larger; any Type 2 metric is
        considered greater than the cost of any path internal to the AS.
        Use of Type 2 external metrics assumes that routing between
        AS'es is the major cost of routing a packet, and eliminates the
        need for conversion of external costs to internal link state
        metrics.

After typing all of this. It has dawned on me that because of the way  OSPF works (link state) the only circumstance in which you would receive  "two routes for prefix A" as I state above is if there were 2 redistribution points.

Well, you may have multiple paths to a single ASBR, you may have multiple ASBRs, and you may have multiple paths to multiple ASBRs. You always need to have a mechanism to distinguish which path (or set of paths) is the best. So even in a network with a single ASBR, you may see multiple paths towards it. So even here, you need to choose.

Remember, the type-2 works as follows:

  • Choose the ASBR advertising the lowest type-2 metric.
  • If there are multiple such ASBRs, select the one that is closest to you.
  • If there are multiple such ASBRs, use all of them.

Type-1 works differently:

  • Choose the ASBR that provides the least sum of type-1 metric plus the cost to reach it.
  • If there are multiple such ASBRs, use all of them.

Feel welcome to ask further!

Best regards,

Peter

P.S.: These rules get more complicated if the ASBRs also advertise the forwarding address in their LSA-5. Don't try to wrap your head around those for the time being.

Review Cisco Networking products for a $25 gift card