cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1755
Views
0
Helpful
4
Replies

Configuring attributes for BGP to use the primary link

jennyjohn
Level 1
Level 1

I am running BGP on my switch which is connected to a primary and secondary switch of a service provider (as shown in diagram). How to configure attributes so that my switch always uses the primary link and use the secondary link only if the primary link fails.

interface GigabitEthernet2/1
ip address 10.10.123.2 255.255.255.252
!
interface GigabitEthernet3/1
ip address 10.10.123.6 255.255.255.252
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
network 10.10.124.0 mask 255.255.255.0
neighbor 10.10.123.1 remote-as 64500
neighbor 10.10.123.5 remote-as 64500
no auto-summary

Thanks in advance.

1 Accepted Solution

Accepted Solutions

ameen.ahmed
Level 1
Level 1

Hi,

You can configure weight on your L3 switch to prefer one neighbour over other.

Configuration will be like,

!

router bgp 65001
no synchronization
bgp log-neighbor-changes
network 10.10.124.0 mask 255.255.255.0
neighbor 10.10.123.1 remote-as 64500

neighbor 10.10.123.1 weight 200
neighbor 10.10.123.5 remote-as 64500

neighbor 10.10.123.5 weight 100
no auto-summary

!

Weight is local to the router, and higher is best. The above configuration will prefere routes from SP Switch 1 over SP Switch 2.

Thanks,

Ameen Ahmed.

View solution in original post

4 Replies 4

cadet alain
VIP Alumni
VIP Alumni

Hi,

You can use weight to influence outbound path selection like this:

neighbor 10.10.123.1 weight 120 

then  this path will be prefered as weight is the first thing a Cisco router looks at and higher wins( default 0 and 32768 for locally originated prefix)

Regards.

Alain.

Don't forget to rate helpful posts.

ameen.ahmed
Level 1
Level 1

Hi,

You can configure weight on your L3 switch to prefer one neighbour over other.

Configuration will be like,

!

router bgp 65001
no synchronization
bgp log-neighbor-changes
network 10.10.124.0 mask 255.255.255.0
neighbor 10.10.123.1 remote-as 64500

neighbor 10.10.123.1 weight 200
neighbor 10.10.123.5 remote-as 64500

neighbor 10.10.123.5 weight 100
no auto-summary

!

Weight is local to the router, and higher is best. The above configuration will prefere routes from SP Switch 1 over SP Switch 2.

Thanks,

Ameen Ahmed.

i would also consider how your service provider handles the link preference. remember weight is locally significant so that means that it influences the egress traffic and does not influence ingress. you should also inform your service provider which lin you would like to be your primary. you may also want to consider prepending as an option

Yes indeed the solution  using weight will only work for egress and for ingress you can use as-path prepending as told above  or communities( you'll have to discuss with your ISP for this because they may be denying as-path prepend)

Regards.

Alain.

Don't forget to rate helpful posts.