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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Track, BGP and HSRP

Hi guys,

Needing some help with something that is just a little beyond me.

Have a customer, who will have 2 BGP connections, one with us, one with another ISP.

Customer has 2x 1811 routers to do this, one for each external connection.

The idea is that if provider 1 fails, the secondary will preempt via HSRP and become the local gateway.

Problem comes in that they wish to do tracking on the primary ISP so that in the event of a in direct failover the secondary will take over in a short time.

I have setup tracking on the primary router, this will eventually track a loopback one of ISP1's border routers.

It should also check that they are getting a default route from ISP1 (customer is only accepting default routes).

Now I with a little bit of searching I figure that I need to have a route map in the primary, which will remove the advertised subnet on the event of a tracking failure.

However I’m not exactly sure of what I should be using to get this to happen.

Could someone tell me what I should be looking at to be doing this.

Below is my testing configurations.

Regards Richard

Router A

neighbor 10.0.0.1 remote-as 1

neighbor 10.0.0.1 description ISP1

neighbor 10.0.0.1 version 4

neighbor 10.0.0.1 timers 30 90

neighbor 10.0.0.1 remove-private-as

neighbor 10.0.0.1 prefix-list defaultroute in

neighbor 10.0.0.1 route-map AS1-in in

ip sla 1

icmp-echo 10.10.10.10

request-data-size 1400

timeout 1000

frequency 30

ip sla schedule 5 life forever start-time now

!

track 1 rtr 1 state

!

track 2 ip route 0.0.0.0 0.0.0.0 state

interface Vlan1

ip address 172.16.0.2 255.255.255.0

standby 1 ip 172.16.0.1

standby 1 priority 105

standby 1 preempt delay minimum 60

standby 1 track FastEthernet0

standby 1 track 1 decrement 20

standby 1 track 2 decrement 20

route-map AS64900-in permit 50

match ip address originated

route-map AS64900-in permit 60

local pref 110

(these added incase of possible future changes)

router B

Configured with ISP 2 BGP session, route-maps to prepend AS# and HSRP preempt. I figured this probably isnt needed but if required i'll post.

**edit to fix formatting

1 ACCEPTED SOLUTION

Accepted Solutions
Purple

Re: Track, BGP and HSRP

Hi Richard,

I'm pretty sure there is no way to bring an actual BGP session down, based on the result of a tracked object. But why would you want to bring the session down anyway ? If the aim is not to advertise the local networks over the BGP session when a tracked object goes down you can do something like the following:

router bgp 64512

network 10.1.1.0 mask 255.255.255.0

!

ip route 10.1.1.0 255.255.255.0 null0 track 2

That way, you don't have to kill the session but the injected routes will no longer be injected when the tracked onject is down.

Pls do rate the posts if you find them helpful..

Paresh

8 REPLIES
Purple

Re: Track, BGP and HSRP

Hi,

I'm not totally clear on what you are trying to do - what is this 'advertised subnet' that you wish to remove on a tracking failure ?

Paresh

New Member

Re: Track, BGP and HSRP

Sorry,

After work rambling :)

Basically if routerA cannot get a response from its tracking host, shut down the BGP session.

Richard

Purple

Re: Track, BGP and HSRP

Hi Richard,

I'm pretty sure there is no way to bring an actual BGP session down, based on the result of a tracked object. But why would you want to bring the session down anyway ? If the aim is not to advertise the local networks over the BGP session when a tracked object goes down you can do something like the following:

router bgp 64512

network 10.1.1.0 mask 255.255.255.0

!

ip route 10.1.1.0 255.255.255.0 null0 track 2

That way, you don't have to kill the session but the injected routes will no longer be injected when the tracked onject is down.

Pls do rate the posts if you find them helpful..

Paresh

New Member

Re: Track, BGP and HSRP

Paresh,

I'll try this in the morning.

Removing the route is just as acceptable, I should have said this :)

Can you explain why adding a null route will stop the route from being advertised ?

Purple

Re: Track, BGP and HSRP

The null route is not what causes the route to stop being advertised - it's the 'track 2' that causes it. The null0 route simply ensures that we have a static route that we can track using a tracking object.

Pls do rate the posts if you find them helpful...

Paresh

New Member

Re: Track, BGP and HSRP

Paresh,

If the subnet is directly connected wont this override the lack of a static route and continue to advertise the subnet ?

R

Purple

Re: Track, BGP and HSRP

Yes, it would.. but in most cases, you would not be advertise small blocks but the whole aggregate that belongs to the customer. If the static route is for that aggregate (and the specifics are not advertised, which is the norm), the technique still works...

Pls rate the post if it makes sense :-)

Paresh

New Member

Re: Track, BGP and HSRP

Paresh,

All works wonderfully.

Thanks heaps.

3133
Views
8
Helpful
8
Replies
CreatePlease login to create content