cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4208
Views
0
Helpful
18
Replies

Where to set metric for redistribution

Bill19795_2
Level 1
Level 1

I have dual MPLS networks connected to two different TELCO’s running BGP to the provider. I am running EIGRP internally. I have all of the redistribution working and have the routers preferring the EIGRP routes learned internally over a BGP route using the weight command on my BGP routing. My question involves the redistribution of EIGRP into BGP. I know I have to set some type of seed metric to get BGP to redistribute the EIGRP route into its routing protocol. I am currently setting the default metric but I wonder if that is the best place. I only want to adjust the metric to redistributed routes so I don’t want to affect all of my internal EIGRP routes. Should I leave it the way it is or set the metric in the redistribute command under BGP? If I leave it like it is am I just affecting the local EIGRP network? Do those metric’s trickle out to my other devices? As an example a Layer 3 switch that is only running EIGRP but does not have the default metric set. The router that is running both protocols learns internal routes via EIGRP from the layer 3 switch but the layer 3 switch only knows about the BGP routes from redistribution.

router eigrp 50

redistribute bgp 65001

network 1.1.1.0 0 0.0.0.255

network 2.2.2.2 0.0.0.0

default-metric 1000 100 250 100 1500

distance eigrp 15 170

no auto-summary

!

router bgp 65001

bgp log-neighbor-changes

neighbor 12.1.1.1 remote-as 7018

!

address-family ipv4

  redistribute eigrp 50 route-map redistribute-eigrp

  neighbor 12.1.1.2 activate

  neighbor 12.1.1.2 weight 40000

  neighbor 12.1.1.2  soft-reconfiguration inbound

  no auto-summary

  no synchronization

  network 1.1.1.0 mask 255.255.255.0

  network 2.2.2.2 mask 255.255.255.255

exit-address-family

18 Replies 18

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Bill,

you have set a default metric in EIGRP in order to be able to inject BGP routes into EIGRP domain.

For the opposite direction you could set a metric in BGP process, but this is not strictly necessary as BGP can set BGP MED attribute = IGP metric = EIGRP metric.

This  (copying IGP metric) might cause problems or not depending on your topology so you can put a set metric in route-map redistribute-eigrp to have a fixed value for metric constant over time.

Take in account that EIGRP metrics are big numbers in comparison with metric values of other protocols.

What is really important is that if you have mutiple points of mutual redistribution (BGP ->EIGRP and EIGRP-> BGP) you will need to use route-maps in both ends in combination with route filters or route tags to avoid unwanted feedback.

Hope to help

Giuseppe

Thanks for your help. Yes I udnerstand the need to use route-maps and in fact I am if you look at the config. The redistribution is working how I want it to I just don't know if I should keep using the default metric or only set the metric when I redistribute into BGP?

Hello Bill,

if at each site you have only one router copying the EIGRP metric into BGP should not be a problem

if you have two routers at each site each connecting to a different cloud you need route-maps to perform controlled mutual redistribution, and some care about IGP metrics (if totally symmetrical can be good but not if you want to implement a primary/secondary cloud)

So the answer depends on topology and the way you want to use the two MPLS clouds

Hope to help

Giuseppe

Two diffrent providers, Two diffrent Clouds and Two diffrent routers.

RouterA Connects to Severvice Provider A. Runs BGP to SP A and EIGRP internally

Router B connects to Service Provider B. Runs BGP to SP B and EIGRP internally

Internal Ethernet ports are Layer 3 to a L3 switch they are on thier own / 30 subnet. EIGRP is running on the L3 switch. All clients Defautlt gateway point to an SVI which is not on the same subnet as the Ethernet of the routers. EIGRP load balancing between the two diffrent providers. The only way the L3 switch knows about the providers and the rest of the WAN is via EIGRP.

I already ran into the problm where i was redistributing the traffic wrong and causing routing problems. Now from the EIGRP side I specifily only allow the EIGRP routes I want to send back into BGP but BGP is sending all of it's routes into EIGRP.

Hello Bill,

consistency check: you should not accept from BGP IP prefixes that are known to be local to the site.

This is the simplest way to do this but may require some effort to implement in many sites

Route tags could be used for this job but they are more complex to implement

Hope to help

Giuseppe

I am redstributing EIGRP learned routes into BGP so other sites know about them. The routers are running BGP and EIGRP. They learn about other routes on the netwrok from EIGRP then send them to other BGP routers.  I am sending all of the BGP routes into EIGRP but I use route maps to filter what EIGRP routes I am going to send into BGP. I never send a BGP route that was recevied on RouterA then redistributed to EIGRP into RouterB via EIGRP. I did once and it caused problems :)

I only redistribute specifc routes that were learned internally back into BGP. I use a Route-MAP to stop routes going from EIGRP into BGP except the ones I want.

So with all this being said should I still use the default metric on the routers that run BGP and EIGRP and not but a default metric on the EIGRP only devices? 

Hi Bill,

I have something different on my mind and this is what i always prefer to do...

1. When you redistribute anything in EIGRP, keep in mind that Bandwidth and Delay are metrics of EIGRP, so its always better to use the bandwidth and delay of the interface on which it was received in your case its BGP, So if its Fa interface i would put bw as 100000 and delay as 100 so we can ensure that even it goes down the topology everyone in the domain would have clearer picture to get to the destination prefix which were redistributed at different points. If you want to prefer router A or router B to be the preferred exit point you may do alter the metric while redistributing.

2. The problem you faced during the redistribution across the Router A and router B was due to mutual redistribution at two different points.

you can do these configurations on router A and B

Router A

route-map BGP->EIGRP permit 10

set tag 120

router eigrp 1

redistribute bgp xx metrci x x x x x route-map BGP->EIGRP  ( set x as interface bandwidth and delay of bgp facing interface )

router bgp 20 ( whatever address family)

redistribute eigrp 1 route-map FILTER_ROUTER_A

route-map FILTER_ROUTER_B deny 10

match tag 220

route-map FILTER_ROUTER_B permit 20

--------------------------------------------------

Router B

route-map BGP->EIGRP permit 10

set tag 220

router eigrp 1

redistribute bgp xx metric x x x x x route-map BGP->EIGRP  ( set x as interface bandwidth and delay of bgp facing interface )

router bgp 20 ( whatever address family)

redistribute eigrp 1 route-map FILTER_ROUTER_A

route-map FILTER_ROUTER_B deny 10

match tag 120

route-map FILTER_ROUTER_A permit 20

This works good for me and its flexible over route-map with ACL or distribute lists which is not scalable.

HTH

Hitesh Vinzoda

Hello Bill,

Hitesh has provided a good example of redistribution controlled by route tagging

>> I only redistribute specifc routes that were learned internally back into BGP. I use a Route-MAP to stop routes going from EIGRP into BGP except the ones I want.

This is good news

>> So with all this being said should I still use the default metric on the routers that run BGP and EIGRP and not but a default metric on the EIGRP only devices?

Seed metric applies only to devices performing redistribution, EIGRP only routers can prefer internal routes over external routes but they should not be able to influence routing (unless there is a sort of backdoor between sites running EIGRP over it)

Hope to help

Giuseppe

OK so I think I have everything now. I still use the default metric command only on routers that are going

to redistribute into other protocols. My final question is what should I set the default metric? I see a few diffrent examples. Do I need to have a diffrent setting per

ethernet interface?

FastEthernet

router eigrp 100
redistribute bgp 65001
default-metric 1000 100 250 100 1500

GigabitEthernet

router eigrp 100
redistribute bgp 65001
default-metric 10000 100 250 100 1500

If so what happens if I have multiple interface types on the same router?

Hello Bill,

you need to use a meaningful set of values for example I would not use a final 1 meaning an MTU of 1 byte.

if you want to have a primary/secondary between ASBR routers you need to use different sets of values to implement this remembering that EIGRP metric is proportional to sum of delays and inversely proportional to lowest BW in path. (all this with default k values)

>> If so what happens if I have multiple interface types on the same router?

you could even set metric for EIGRP within a route-map that allows to use different set of values in each clause

see this example where different static routes use different seed

sh run | beg ^route-map

route-map red_stat permit 10

match ip address 10

set metric 2048 2000 255 255 1500

!

route-map red_stat permit 20

match ip address 20

set metric 2048 2000 255 255 1500

!

route-map red_stat permit 30

match ip address 30

set metric 2048 2000 255 255 1500

!

default-metric will apply to those routes permitted by an empty final clause like (not present in my case)

route-map red_stat permit 40

!

Hope to help

Giuseppe

I don't want a primary, seconday, I actually want to use EIGRP load balancing to send traffic out both providers at the same time.

Which default metric shoudl I use going out GigE?

Hello Bill,

>> Which default metric shoudl I use going out GigE?

use the same set of reasonable values on both devices  that's all

it is a free choice you don't need to follow bandwidth and delay of GE link.

Hope to help

Giuseppe

OK back to my original question of where to set the metric. Should I set it as the default metric or set it under the redistribute command? Here is my current config which is working fine.

router eigrp 50
redistribute bgp 65001
network 1.1.254.0 0.0.1.255
default-metric 1000000 100 250 100 1500
distance eigrp 15 170
no auto-summary

router bgp 65001
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 5555
neighbor 3.3.3.3 remote-as 6666
!
address-family ipv4
redistribute static
redistribute eigrp 50 route-map redistribute-eigrp
neighbor 2.2.2.2 activate
neighbor  2.2.2.2 weight 40000
neighbor 2.2.2.2 soft-reconfiguration inbound
neighbor  3.3.3.3 activate
neighbor 3.3.3.3 weight 40000
neighbor 3.3.3.3 soft-reconfiguration inbound
default-information originate
no auto-summary
no synchronization
network 8.8.8.0 mask 255.255.255.0
network 9.9.9.0 mask 255.255.255.0
network 1.1.254.0 mask 255.255.254.0
exit-address-family

So should I leave it like that or use the following config.

router eigrp 50
redistribute bgp 65001
network 1.1.254.0 0.0.1.255
distance eigrp 15 170
no auto-summary

router bgp 65001
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 5555
neighbor 3.3.3.3 remote-as 6666
!
address-family ipv4
redistribute static
redistribute eigrp 50 route-map redistribute-eigrp metric 1000000 100 250 100 1500
neighbor 2.2.2.2 activate
neighbor  2.2.2.2 weight 40000
neighbor 2.2.2.2 soft-reconfiguration inbound
neighbor  3.3.3.3 activate
neighbor 3.3.3.3 weight 40000
neighbor 3.3.3.3 soft-reconfiguration inbound
default-information originate
no auto-summary
no synchronization
network 8.8.8.0 mask 255.255.255.0
network 9.9.9.0 mask 255.255.255.0
network 1.1.254.0 mask 255.255.254.0
exit-address-family

Will it work to set the metric only when I redistribute into BGP or do I need to set the default metric?

Should I set the metric in my route map that I am using to specifiy the EIGRP routes I want to send into BGP?

Hello Bill,

the following line will not be accepted:

address-family ipv4
redistribute static
>>>>redistribute eigrp 50 route-map redistribute-eigrp metric 1000000 100 250 100 1500

when setting  a seed metric you need to set a metric meaningful for the protocol that receives the routes that is BGP in above lines not for the source protocol (EIGRP in this case)

So you can set a metric but only using a scalar value (single integer) the effect will be to override IGP metric with a constant value that will not reflect topology changes (faults)

setting a metric on a redistribute command is more specific than using default-metric and will override default-metric settings for the routes imported by the redistribute command line.

also you need to set a default metric into EIGRP or no BGP routes will be imported into EIGRP domain.

This is strictly needed in EIGRP for successful redistribution of dynamic protocols.

in this case you need to use a metric that invokes a vector of 5 seed values as in current working configuration

Hope to help

Giuseppe

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco