Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k

Change Weight or Local Pref on iBGP Peering

Hi,

I have a situation where I will be receiving a default route from SP A (eBGP) in location A, I will be receiving another default route from SP B (eBGP) in location B.

I want all downstream customers and networks in location A to go out via the default route from SP A and all customers and networks in location B to go out via the default route from SP B.

I will also have an iBGP peering between my routers so that the default routes can be exchanged and be used as backup if their respectful peering fails.

Because of this design requirement I am thinking to change the weight as the prefix comes in on the eBGP peering as this would only affect the location specific router as oppose to the whole AS.

Would this be bad practice? Would it be better to change the local pref attribute when the prefix is announced over the iBGP peering?

Thanks

6 REPLIES

Re: Change Weight or Local Pref on iBGP Peering

Hello

Local pref would be ideal as weight Is only applicable to the local router but local pref is applicable to IBGP peers

Res
Paul

Sent from Cisco Technical Support iPad App

Please don't forget to rate any posts that have been helpful. Thanks.
New Member

Re:Change Weight or Local Pref on iBGP Peering

In this case "weight" is the ideal match because each site has to route the traffic via its local edge router.The IBGP is acting as backup.


Sent from Cisco Technical Support Android App

New Member

Re:Change Weight or Local Pref on iBGP Peering

Here is the solution

By default the weight parameter is 0.so, what u can do , on both the routers for their ebgp neighbor assign a weight of 1000

Example

Neighbor weight 1000

Why its not recommended to set weight using route-maps, in case of dual ISP setup if by any chance ur AS becomes transit AS then weight value will be propagated further and it can affect the routing at far end.




Sent from Cisco Technical Support Android App

Change Weight or Local Pref on iBGP Peering

Hi,

I don't agree here.

a) Weight is a Cisco proprietary BGP attribute which is never advertised to any BGP neighbor.

b)  It's not clear if a private AS number is not used on the customer side with the SPs removing the private AS number from the AS_PATH.

In that case:

If you simply configure on the router A

neighbor weight 1000

all prefixes received from that neighbor will be preferred.

Including the prefixes advertised by the router B to the other SP possibly?

And vice versa.

The sites A and B could route each to the other via the Internet then?

You'd need a route-map to prefer the prefixes received from the eBGP neighbor using the weight attribute.

But not all of them, exclude the prefixes belonging to the other site!

c) IMHO, the easiest way is to configure a route-map matching the default route only and setting the local preference to 50.

And permitting all other prefixes unchanged.

Applying this route-map as incoming on the iBGP neighbor would bring the necessary behaviour.

Best regards,

Milan

Re: Change Weight or Local Pref on iBGP Peering

Thanks guys,

I am on a public ASN and getting transit off to different SP's.

I have never used weight before as its not really the done thing and never had a need for it.

2 options:

Weight - if I went with this then in location A I would configure a route-map inbound on the eBGP neighborship, match the default route using a prefix list and set the weight to 100

I would do the exact same thing in location B

This would be a solution I believe.

Weight is neve advertised to any BGP neighbor.

Local Pref - in both locations I would use a route-map again and again match the default route then set the local pref to be 150.

The problem here is when location/router A advertises this to location/router B (and vica versa) the default routes would have matching local preferences and it would go down the order of attributes to decide which one to use, so, part of this solution would need a route map on the iBGP peering to then set the local pref again.

Technically and from a 'text book' approach I think this situation is crying out for weight to be used as I then don't have to change any attributes on the iBGP neighborship, the reason I posted this is because I have never used weight and for some reason (probably because its proprietry) (and becasue it does't propergate through the AS - which is actually the use case here) it has a bad rep and I am relectant to use it.

Re: Change Weight or Local Pref on iBGP Peering

Hi,

IMHO, you can use the Weight attribute with the route-map the way you described.

I used that attribute several times in my configs with no problem.

If somebody says it has got a bad reputation, it's possibly because it's not advertised so you might not understand why some router is preferring some profixes without an access to it.

If you insist on using Local preference, you could configure an incoming route-map on the iBGP session which would decrease the default value 100 to 50, e.g.

Don't forget BGP routers advertise only the best prefix. So as long as there will be the default route received from the eBGP neighbor, it will win (LP=100) and will be advertised to any possible neighbor (if there are any others involved).

Also don't forget the prefix received by iBGP will not be advertised to any other iBGP neighbor.

So I think you would be safe this way, too.

Best regards,

Milan

1042
Views
0
Helpful
6
Replies
CreatePlease to create content