cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
761
Views
0
Helpful
9
Replies

BGP Dual homing issue

arnis
Level 1
Level 1

I have currently two routers connected to the same ISP, using peeing via BGP.

The routers then run HSRP between them for the internal network, so I one fails the other one takes over, there is no BGP peering or other routing protocols between the two routers, just to the ISP.

This is part of the config that I am using

router bgp 35543

no synchronization

bgp router-id 192.51.91.22

bgp log-neighbor-changes

network 187.200.38.0 mask 255.255.254.0

neighbor 192.51.91.21 remote-as 3350

neighbor 192.51.91.21 next-hop-self

neighbor 192.51.91.21 soft-reconfiguration inbound

neighbor 192.51.91.21 prefix-list ourpref out

no auto-summary

ip prefix-list ourpref seq 5 permit 187.200.38.0/23

I am now adding another peering to another ISP just one one of the routers, i.e. the primary one, and have some question regarding configuration issues on that.

1. how would I config the BGP if I want to use the second ISP just as a backup line i.e. not use it for any traffic except when the primary ISP is down ?

2. Is there any way to advertise my network only to the secondary ISP only when the primary is completely down on both routers, i.e. I foresee a problem there as the secondary ISP is only connected to one router. And I can?t see how that router would know if the primary ISP is available on the other router or not, even though it self has lost connection to the primary ISP.

This will do for now, any pointers would be great

Cheers

Arni

9 Replies 9

Richard Burts
Hall of Fame
Hall of Fame

Arni

First I would advise that you really should configure BGP peering between your two routers (establish IBGP session between them). It should make your current environment process better and will be pretty essential when you add the second ISP.

You can configure it so that one ISP is primary and the other is only backup. You will need to control inbound traffic and outbound traffic (there are different mechanisms for each). Controlling outbound traffic is easier if both ISPs are advertising the same routes to you (most easy if both are advertising only a default route). You can make one ISP be primary for outbound traffic (traffic you are sending out) by configuring local-preference to favor that ISP. The most common way to control inbound traffic is to configure prepending in your advertisements to the secondary ISP. To do the primary/backup it will be important that you have IBGP peering between your own routers.

There is a feature called conditional advertisement which should allow you to advertise to the secondary only if the primary is down on both routers (again this is dependent on having IBGP between your own routers).

HTH

Rick

HTH

Rick

Thanks for you replay

Would it not work if I would use AS prepend for the routes to the second ISP, then the internet would not use those routes unles it did not have any routes from the first ISP ?

And I can use local preference to make sure that on the router that has both ISPs connected to it, I always use the primary ISP, unless it is down.

But I can see that it would make sense to configure BGP between the two routers,

Any special issues, that I would need to watch out when doing that ?

When doing that how will I control the the primary router is always used unless it?s connections are down ?

Cheers

Arni

Arni

If you do not run BGP between your 2 routers (IBGP) there is not any way for the second (backup) router to know whether the primary router is learning the routes or not and therefore no reliable way for the second router to know whether to use its routes or not. Once you have IBGP between them it is easy to coordinate so that the second router will not use its routes as long as the primary router is learning routes. That is the reason that I suggested local-preference. You could use weight for the router to prefer the first ISP over the second. But weight is local to that router and would not influence the second router. Local-preference is advertised to IBGP peers. So the first router leans routes from ISP 1, marks the route with its local preference, and advertises it to the second router. The second router recognizes the local preference value makes the route through router 1 as preferred and will not use its own route as long as the route from router 1 is present.

HTH

Rick

HTH

Rick

Hi Rick,

I like your explanation and I have been thinking about the exact same request. In my case though I have BGP between my router as well.

Do you have an example config or link to look at that would make a picture of what you are saying above?

Thanks

Brad

Brad

Are you looking for local preference and prepend or are you looking for conditional advertisement (or are you looking for both)?

HTH

Rick

HTH

Rick

Would it be pssible to give both ...:)

I would like to test with both.

Thanks a mill.

keduncan
Level 1
Level 1

advertise a more specific routes out the primary router

Primary router configuration

ip route 187.200.38.0 255.255.255.0

ip route 187.200.39.0 255.255.255.0

Router BGP 35534

Network 187.200.38.0 mask 255.255.255.0

Network 187.200.39.0 mask 255.255.255.0

--- HSRP track the serial interface, give a high priority, and allow it to prempt---

============================================

Backup router configuration

Router BGP 35534

network 187.200.38.0 mask 255.255.254.0

--- HSRP track the serial interface, give a low priority, and allow it to prempt---

===========================================

As long as the primary router is advertising the two smaller subnets all the traffic will use the primary ISP..

When BGP fails or the you stop advertising the two subnets from the primary router then the best rout to your site will change to the backup router.

mohammedmahmoud
Level 11
Level 11

Hi Arni,

I've only one comment, i know that it has nothing to do with your question, but it grabbed my atttention. Why are you putting "next-hop-self" infront of an EBGP neighbor ?

Best regards,

Mohammed.

Hi Friend,

Go through these links

http://www.cisco.com/warp/public/459/40.html

HTH, rate if it does

Narayan

Review Cisco Networking products for a $25 gift card