cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
482
Views
0
Helpful
8
Replies

Changing BGP Paths

ComputerErik
Level 1
Level 1

I have two routes into a system, one is a T1 and the other a 10Mb connection setup on two routers doing HSRP. Both are being advertised via BGP into different remote AS in different carrier networks.

My problem is that incoming traffic doesn't always prefer the 10Mb connection over the T1 as I would like. Basically I want all traffic going in and out of the larger pipe, and just have the T1 as a backup in case of a total failure. As far as I can tell the traffic coming into the T1 is just seeing that route as better due to BGP putting it as a closer depending on which networks the distant sender is on.

Is there anyway that I can advertise out in my BGP statements which route I would prefer? From what I have been reading in the BGP commands it looks like all of the commands to influence path selection are just for routes or traffic coming into my router. I want a way to advertise out which route I prefer to have used.

Thanks for any ideas

8 Replies 8

pkhatri
Level 11
Level 11

One of the things you can do is to use AS-PATH prepending so that the route advertised out of the T1 has a longer AS-PATH length. That way, your 10M link will be preferred.

Here's a link to an example:

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

Hope that helps - pls do rate the post if it does.

Paresh

So if I create a route map on the T1 line and prepend the local AS to it a couple of times it should make that path longer, and less desirable, correct?

Then should the other connection fail completely even though the path is longer it would now be the only available path?

Thanks again.

Hi,

Your understanding is correct. It should failover to the T1 link when the 10 mb link fails.

BGP uses AS path as one of the key criteria in choosing a route. When you prepend the AS path via the T1 link then it will become less desirable. However, when the route isn't learnt via the 10 mb link then the T1 would be the only choice available to get to your network and hence, the devices on the Internet would use that route to forward traffic to your network. To be on the safe side, check with the provider whether they would be accepting prepended AS path.

After prepending the AS path you can check whether it's working as expected by checking the BGP table on the looking glass on the Internet.

HTH

Sundar

I interpreted your question as: AS-Path prepending will make only a single path into the network via the 10Mb link, while the T1 is idling away. Is it possible to configure BGP to load-balance across the two WAN links, in a similar fashion to EIGRP variance?

The answer to that is No. With BGP, you can configure it to load-balance across multiple paths (possible in some topologies, but not all BGP topology can be load-balanced), but you can't tell BGP to send more traffic down a certain path more than others, because BGP does not have any notion about link bandwidth. "Equal-cost paths" in BGP terminology means equal values in the BGP attributes.

No, I do want to force all traffic down the 10Mb link when it is up, and only use the T1 should the 10Mb link fail.

Really we are kind of mid change. Ultimitely the goal is to have two 10Mb connections, and let BGP do path selection. This will do a sort of load balancing as it will choose whichever link is best dynamically. But now obviously having two such unbalanced connections means that even if the T1 is "closer" it will still be the less ideal way to go. So until the other connection is brough up into production I want to force the use of the 10Mb one, and keep the T1 there should it fail for some reason.

Thanks for the replies. I am going to try the prepending to force my choice of path once I get a chance. Should work fine for my needs from what I have been reading.

Erik,

What you can do is:

1. On your primary BGP router, configure "bgp default local-preference 120" (or higher number, up to you really). This will force outbound traffic FROM your site to the ISP through the 10Mb link on the primary BGP router. Presuming, of course, your BGP routers are advertised internally as the gateway of last resort.

2. On your secondary BGP router, configure AS-Path prepending for ALL routes advertised to the eBGP neighbor. This will influence the ISPs to send traffic INTO your organisation via your primary BGP router. Your required configs would be something like:

route-map Prepend-AS permit 10

set local-preference 120 (or whatever number you want to use)

router bgp

neighbor route-map Prepend-AS out

HTH

Oh crap! I was daydreaming when I typed the config in my last post. Sorry...

Here's the correct route-map config for your secondary BGP router:

route-map Prepend-AS permit 10

set as-path prepend

Note that, for good measure, you can enter your AS number multiple times in the set statement above.

BTW, unless you don't mind being used as Transit AS by your ISP, you might also want to create AS-Path filter on BOTH BGP routers. Let me know if you need help with this too.

HTH.

Thanks, that is pretty much what I was thinking as far as the prepend statement goes. I am planning to get it in on Friday, and will let you know how it goes.

All other BGP statements are already configured, filtering, peering, etc. This was two T1's and I just upgraded on circuit. The next move will be the other T1 getting replaced in the near future if all goes as planned. Until then though I just want everything to be using the bigger pipe.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card