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

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

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

BGP Load balancing & Multihoming


I would like to do a BGP multihoming with our service providers for our internet connection

and will to advertise the following networks and to both ISP

I want to distribute my traffic to both the ISP without getting the entire routing table from the ISPs

The internet browsing traffic needs to be forwarded to ISP B and the other static NAts to be forwarded to ISPA with each ISP acting as fallback to each other. THis will be achieved by policy routing wherein the browsing traffic will natted from the range and the others will be natted from the range

Now heres what i feel i would have problem

Can i have specific attributes applied to only a set of routes advertised to one BGP neighbor. Heres the config i plan

Router bgp 31380

Network mask

Network mask

Neighbor remote-as 200

Neighbor route-map ISPA-local-routes out

Neighbor route-map Acceptroutes in

Neighbor remote-as 300

Neighbor route-map ISPB-local-routes out

Neighbor prefix-list Acceptroutes in

access-list 1 permit

access-list 2 permit

access-list 3 permit

ip prefix-list? Acceptroutes seq 5 permit

Route-map ISPA-local-routes permit 10

Match ip address 1

Set as-path prepend 31380 31380 31380 31380 31380

Route-map ISPA-local-routes permit 20

Match ip address 2

Route-map ISPB-local-routes permit 10

Match ip address 2

Set as-path prepend 31380 31380 31380 31380 31380

Route-map ISPB-local-routes permit 20

Match ip address 1

Set as-path prepend 31380 31380 31380 31380 31380

route-map browsing-traffic permit 10

match ip address 1

set ip next-hop

interface fastethernet 0/1

ip address

ip policy route-map browsing-traffic

Will the above config work for my scenario. Also i need to know whether the return trafiic for browsing will be from ISPB and not from ISPA

Thanks in Advance



Re: BGP Load balancing & Multihoming

Your configuration will mostly do what you want and I assume you have looked at the NAT failover stuff if you want your nat to work transparently. The as prepend only works to a point. There may be cases where this path is shorter even with all the perpends. No way to tell but this is still the best way to try to accomplish want you want.

Now the bad news.

No ISP will let you advertise a /27 network. They almost always set a /24 as the longest mask. If the addresses you posted are valid these are owned by

Telepac - Comunicacoes Interactivas, SA

A second ISP will not advertise another ISP's addresses. You will need your own block of addresses and a AS number.

To do what you want you will actually need 2 /24 blocks so that you can use one in each ISP as the preferred route.