04-19-2004 11:10 PM - edited 03-02-2019 03:06 PM
We are running BGP with two Service Providers, The requirement is to use SP1 as primary and SP2 as backup. Want to achieve this by using conditional advertisement.
Current config is:
router bgp xxxxx
no synchronization
bgp log-neighbor-changes
network xxx.xx.x44.0
network xxx.xx.x48.0
network xxx.xx.x49.0
network xxx.xx.x50.0
network xxx.xx.x51.0
neighbor yy.yyy.yyy.17 remote-as yyyyy
neighbor yy.yyy.yyy.17 route-map localonly out
neighbor zzz.zzz.zzz.189 remote-as zzzzz
neighbor zzz.zzz.zzz.189 route-map localonly out
!
ip route 0.0.0.0 0.0.0.0 yy.yyy.yyy.17
ip route 0.0.0.0 0.0.0.0 zzz.zzz.zzz.189
ip as-path access-list 10 permit ^$
!
route-map localonly permit 10
match as-path 10
x is for my network
y is for SP1
z is for SP2
04-20-2004 12:27 AM
Hello,
if you want to use conditional advertising, you could do the following:
Add a tag to the default route pointing to your primary ISP:
ip route 0.0.0.0 0.0.0.0 yy.yyy.yyy.17 tag 10
Add the following to your route map:
route-map localonly permit 10
match tag 10
set weight 200
This way you default route pointing to SP1 would always have a higher wight and therefor be preferred.
The same could be achieved by spwcifying the weight in your neighbor statement:
neighbor yy.yyy.yyy.17 weight 200
Or you could use local preference:
neighbor yy.yyy.yyy.17 local-preference 200
HTH,
GP
04-20-2004 02:43 AM
Your answer serves the purpose, but there are some upcoming requirements in which I have to advertise certain classes on one network and other class on second network. And in case of any link failure remaining link will carry all the traffic.
04-20-2004 01:44 AM
Your requirement is to use SP1 as primary and SP2 as backup - OK..What can be done is -
1. For the incoming traffic from Internet -
a. Advertise all your IP subnets on both of the SP links.. For the Sec SP link add a route map to the outgoing advertisement and set AS PAth Prepend..
2. For the outgoing traffic from ur network ..
a. Set local preference for the incoming traffic..
Hope the above solution will work..
Pls let me know for further queries..
04-20-2004 03:18 AM
Here's a good paper on the BGP conditional advertisement feature.
Let me know if it helps,
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