cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5253
Views
10
Helpful
6
Replies

BGP Weight and redistribution

Hi All,

     I have question on BGP weight and EIGRP redistribution. Let us consider that EIGRP routes are redistributed into BGP and BGP routes into EIGRP.

When I'm readvertising an EIGRP routes in routing table into BGP, the BGP process by default sets the weight to 32768. Suppose if the router learns the same prefix from BGP also, the router will still have EIGRP routes in the routing table and it will also redistribute EIGRP into other BGP neighbors. However what If I set the weight of the incoming route to say 40000? Will the router clean up the routing table and install the BGP learned route?

Also when we say redistributing EIGRP into BGP, it is redistributing the routes in the routing table which are learned by EIGRP. Same with BGP or other routing protocol redistribution. Is my understanding correct?

Thanks,

Ranganath

6 Replies 6

cadet alain
VIP Alumni
VIP Alumni

BGP attributes only influence which BGP prefix will be selected as best and so installed in the RIB and advertised to BGP peers.

If the prefix is already in the RIB as EIGRP then redistributed into BGP then this router will advertise this prefix to other BGP peers then if it were relearnt via eBGP it would be dropped due to own AS in the path and if iBGP then the AD is geater than any default EIGRP routes.

So it will stay EIGRP and setting the weight on a router inbound  is for influencing outbound path in case there are multiple paths to same prefix( BGP paths) so it won't be influencing EIGRP vs BGP RIB installation as it is the  AD of protocols which has this role.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi Alain,

there might be a case the same prefix would be received by eBGP without having the own AS number in the AS_PATH.

(It may happen in a complex topology with multiple protocol redistribution points.)

In that case, with the weight of the incoming route set to 40000, the eBGP received prefix would beat the one redistributed from EIGRP and due to the AD=20 would be installed into RIB.

Generally:

Especially if more routers are involved  in a mutual routing protocol redistribution, the best practice is to configure some kind of prefix tagging when a prefix is redistributed from one routing protocol to another. And to block the tagged prefixes from being redistributed the opposite direction.

HTH,

Milan

Hi Milan,

milan.kulik a écrit:

Hi Alain,

there might be a case the same prefix would be received by eBGP without having the own AS number in the AS_PATH.

(It may happen in a complex topology with multiple protocol redistribution points.)

In that case, with the weight of the incoming route set to 40000, the eBGP received prefix would beat the one redistributed from EIGRP and due to the AD=20 would be installed into RIB.


But it would be the case with any weight value because here we have a same prefix coming from 2 different routing protocols and so AD is the tie-breaker. Tell me if I'm wrong.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi Alain,

the problem with mutual redistribution can sometimes be a sequence in which particular prefixes are received from each protocol.

Imagine the scenario described above and suppose:

The prefix was received from EIGRP first.

It was redistributed to BGP (with the weight=32768).

Then the same prefix arrived via eBGP (without having the own AS number in the AS_PATH) and a default weight=0 was assigned to it.

As there is the same prefix within the BGP table already with weight=32768, it's kept as the best one.

But in a case a higher weight=40000 was assigned to the prefix received via eBGP (by an incoming route-map, e.g.), the prefix received via eBGP wins and becomes the best in the BGP table!

And as the eBGP AD=20, it get's into the RIB as the best route.

So two different results, just due to the value of the weight attribute assigned to the prefixes received from eBGP!

I was facing a very similar problem in the past and fixed that by assigning weight=0 to the prefixes redistributed from EIGRP to BGP.

BR,

Milan

Hi Milan,

ok now I understand what you mean. very instructive indeed but what are the chances to get the same prefix via eBGP without its own AS in it? Could you show me a scenario where it is the case so I can see  when it would come into play.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi Alain,

this sometimes hapens in some complex topologies.

I think similar problems were discussed here in the past, see

https://supportforums.cisco.com/message/3242635#3242635

or

https://supportforums.cisco.com/message/3216251#3216251

I personally had to use some very complex solution using BGP/OSPF/BGP redistribution in my network to fix a problem of a provider using incorrect  AS numbers which was removing the AS_PATH completely, so it could happen under some circumstancies the prefix had been received from eBGP without the own AS number.

BR,

Milan

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:

Review Cisco Networking products for a $25 gift card