04-19-2011 11:01 PM - edited 03-04-2019 12:07 PM
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.
Solved! Go to Solution.
04-19-2011 11:36 PM
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.
04-19-2011 11:35 PM
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.
04-19-2011 11:36 PM
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.
04-20-2011 12:31 AM
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
04-20-2011 01:57 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide