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

OSPF e2 forward metric

For OSPF E2 metrics, Which is preferred first, forward metric or route metric? for example:

1. A forward metric of 4000 and route metric of 1, or

2. A forward metric of 400 and a route metric of 2

7 REPLIES
Gold

Re: OSPF e2 forward metric

The external cost is only considered if the cost to the ASBR is the same for both routes. I think you are using "forward metric" for the cost to the ASBR, and "route metric" for the cost of the route injected into the OSPF routing domain (?), so it would be 2.

Russ.W

Community Member

Re: OSPF e2 forward metric

Thank you Russ for your answer. Your answer sounds a little confused, but provides some insight.

Community Member

Re: OSPF e2 forward metric

The route metric is preferred; the forward metric is only used to distinguish between two E2 routes with the same route metric.

In your example, the second route would be used because it has a lower route metric.

Alvaro.

Community Member

Re: OSPF e2 forward metric

Hmmm...fat fingered my answer: the first route (lower route metric) would be used.

This is what RFC2328 has to say:

(d) If the new AS external path is still indistinguishable...select the preferred path based on a least cost comparison...Type 2 external paths advertising equal type 2 metrics are compared by looking at the distance to the forwarding addresses.

Alvaro.

Community Member

Re: OSPF e2 forward metric

Alvero,

Thank you for your answer. So Type 1 os based on cost, whereas type 2 is based on metric first, then cost.

Community Member

Re: OSPF e2 forward metric

No...both are based on cost (the router calls it "metric")....but E2s hav ethe extra "forward metric" compoment.

For example...a simple setup in my lab shows an E2 route:

lssr-7206a#sh ip route 17.17.17.17

Routing entry for 17.17.17.17/32

Known via "ospf 123", distance 110, metric 20, type extern 2, forward metric 1

Last update from 140.1.10.46 on POS1/0, 00:00:47 ago

Routing Descriptor Blocks:

* 140.1.10.46, from 140.1.100.3, 00:00:47 ago, via POS1/0

Route metric is 20, traffic share count is 1

Note that the (route) metric = 20 and the forward metric = 1.

The same route as an E1 shows up as:

lssr-7206a#sh ip route 17.17.17.17

Routing entry for 17.17.17.17/32

Known via "ospf 123", distance 110, metric 21, type extern 1

Last update from 140.1.10.46 on POS1/0, 00:02:45 ago

Routing Descriptor Blocks:

* 140.1.10.46, from 140.1.100.3, 00:02:45 ago, via POS1/0

Route metric is 21, traffic share count is 1

In this case, the (route) metric = 21, but there's no forward metric.

For both E1 and E2 the (route) metric is considered first. In the case of a tie, the forward metric is considered when comparing two E2 routes.

Alvaro.

Gold

Re: OSPF e2 forward metric

Right--you have to define by what you mean by "cost" and "metric." The forward metric (cost) is the cost to the ASBR. The "metric" is the cost injected into OSPF when the route is redistributed. The forward metric (cost to the ASBR) is only considered if the injected metric is the same on both routes.

I actually had it backwards above....

:-)

Russ.W

288
Views
5
Helpful
7
Replies
CreatePlease to create content