cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
624
Views
15
Helpful
4
Replies

Understanding redistribution - OSPF/EIGRP

nuggetinu
Level 1
Level 1

Hi,

 

Can someone explain why, when we redistribute:

 

OSPF into EIGRP, the metric command is related to EIGRP. Such as: bandwidth value, delay value, reliability, effective bandwidth metric and MTU.

 

Example:

- router eigrp 100

- redistribute ospf 100 metric 1000 100 255 1 1500

 

Question 1: Can someone explain further the logic behind this?

 

And vice versa

 

EIGRP into OSPF, the metric command is related to OSPF.

 

- router ospf 100

- redistribute eigrp 100 metric 1 subnets

Question 2: Can someone explain the "metric 1" OSPF value in "redistribute eigrp 100 metric 1 subnets"?

 

Thanks in advance

4 Replies 4

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

With redistribution, you always need to keep in mind that different protocols use different ways to compute their metric, and they use different input values to compute that metric. The metric from one protocol cannot be retaken into the other protocol because the other one might not understand it or be capable to work with it. Even the range might be different - for example, RIP used the metric in the range 0-15 while OSPF and EIGRP have their metric range much higher (OSPF uses 32-bit path metric, EIGRP uses either 32-bit or 64-bit metric with some additional calculations in the background).

The bottom line is: Every time you redistribute from one protocol into another, you cannot rely on the metric in the source routing protocol - you always have to specify the metric for the destination routing protocol to use.

Question 1: Can someone explain further the logic behind this?

EIGRP's metric is computed from a vector of component values - indeed, Bandwidth, Delay, Reliability, Load, and MTU which is a parameter that is advertised but not really used. You specify these metric components, and EIGRP computes the resulting metric using these components. Internally, EIGRP always advertises the metric as these components, and computes the resulting metric on each hop individually, that is why they also need to be specified in components.

Question 2: Can someone explain the "metric 1" OSPF value in "redistribute eigrp 100 metric 1 subnets"?

OSPF uses a scalar metric that is determined by a single number, the cost. That cost is directly specified in the command.

Feel welcome to ask further!

Best regards,
Peter

mmanthe
Level 1
Level 1

If I may expand  a little on Peter’s excellent answer:

 

in simple terms: EIGRP has no idea what metric OSPF uses or how - the same is true in reverse. So when you add OSPF routes *INTO* EIGRP - you must translate the route metrics into something it can understand. It really is as simple as that (in concept ;-) )

 

As for you ‘Question 2’, the ‘metric 1’ Command refers to the OSPF type E1 (as opposed to type E2) external route metric types. Remember, anything you’re distributing INTO one protocol FROM another protocol is going to be considered an ‘external’ route to the destination protocol. So EIGRP routes distributed into OSPF are going to show up as OSPF EXTERNAL in the routing table. OSPF has 2 ways of applying costs to external routes. By method ‘type E1’ it uses ‘actual’ per hop cumulative cost from origin (on top of any fixed cost you might configure as a base cost - if any). You can also specify ‘type E2’ (your command would just be ‘redistribute EIGRP metric 2 subnets’). E2 is actually also the default for external OSPF routes. It applies a fixed cost of 20 and is unchanging (e.g. per hop cost are not cumulatively added). 

 

I hope this this helps explain things better/further.

Hi,

I want to add one more question. I have two routes to the same destination. My one route is E1 and second route is E2. Which route will choose by the router while sending the packet to the destination?

 

Regards,

Deepak Kumar

 

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

Hi Deepak,

It will always be the E1 route. This is by OSPF's design - it always prefers E1 routes to E2 routes, even if the E2 had a lower metric.

Best regards,
Peter

Review Cisco Networking for a $25 gift card