cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
687
Views
0
Helpful
3
Replies

Can the BGP configuration be dynamicaly altered?

joerggrau
Level 1
Level 1

We have multiple Internet providers.  We BGP Peer with them and announce the IP range of provider A out of Provider B and vice versa with AS-PATH prepends.  Now if a provider edge router goes belly up, we have no issue with everything routing now via the other provider.  However, during a recent outage the problem occured a couple of routers up from our BGP peer.  The result was that no failover occured as the routes were still being advertised to the active BGP peer. 

Now we do not receive full routes as that would kill our routers, but we do receive the default gateway.  Of course that didn't go down either.

We are trakcing specific routes in some of our customer facing router pairs and if the primary routers BGP table drops the route to the cutomer network, we decrease the HSRP priority of the interface and manage failvrer tot he secondary router that way.

I am now wondering if I can use something similar to guard against the kind of upstream router failure we saw during our outage.  Is it possible to dynamically change the BGP configuration in a router to change from a regular route announcement to one with AS-PATH prepends?

SO someting along these lines:

When everything is fine and we receive the following route:

track 10 ip route 10.0.0.0 255.0.0.0 reachability


router bgp 11111
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.128
network 1.1.1.128 mask 255.255.255.128
neighbor 2.2.2.1 remote-as 11112
neighbor 2.2.2.1 allowas-in
neighbor 2.2.2.1 route-map set-as-path out

access-list 10 permit 1.1.1.1.0 0.0.0.127
access-list 15 permit 1.1.1.1.128 0.0.0.127

!
!
!
!

route-map set-as-path permit 10
match ip address 10
!
route-map set-as-path permit 15
match ip address 15
!

route-map set-as-path-down permit 10
match ip address 10
set as-path prepend 11111
!
route-map set-as-path-down permit 15
match ip address 15
set as-path prepend 11111
!

If, however, the route drops out of the BGP/routing table, it chnages to:

router bgp 11111
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.128
network 1.1.1.128 mask 255.255.255.128
neighbor 2.2.2.1 remote-as 11112
neighbor 2.2.2.1 allowas-in
neighbor 2.2.2.1 route-map set-as-path-down out


Is that possible?  Wec currently track something similar in interface configurations where we decrease the standby priority

standby 1 track 10 decrement 10

Is this possible or is this a pipe dream?

Thanks
Joerg

1 Accepted Solution

Accepted Solutions

Hi,

I have faced the same problem in the past and i have investigated this issue.

You can shutdown the BGP session based on a tracked object (routes in your case).

Please read the next link which explain how you can configure this in detail

http://blog.ioshints.info/2011/09/shut-down-bgp-session-based-on-tracked.html

Finally, you can apply configuration based on an event, in you case to track routes by using the CISCO EEM

http://blog.ioshints.info/2011/09/changing-configuration-with-eem-yes-or.html

Hope that helps,

Vasilis

View solution in original post

3 Replies 3

Hi,

I have faced the same problem in the past and i have investigated this issue.

You can shutdown the BGP session based on a tracked object (routes in your case).

Please read the next link which explain how you can configure this in detail

http://blog.ioshints.info/2011/09/shut-down-bgp-session-based-on-tracked.html

Finally, you can apply configuration based on an event, in you case to track routes by using the CISCO EEM

http://blog.ioshints.info/2011/09/changing-configuration-with-eem-yes-or.html

Hope that helps,

Vasilis

Vasilis,

excellent!  That is exactly what I need.  However, I just found out that the minimum number of prefixes I can get (besides default rotue only) is 208719.  I am pretty sure that would crash my router in a few seconds....

Off to find another method...

Thanks for the help!

Joerg

Hi.

You should be able to do this with track and EEM (event manager)

Regards

Kristian Brown

Sent from Cisco Technical Support iPhone App

Review Cisco Networking products for a $25 gift card