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. And see here for current known issues.

New Member

Need BGP prepend suggestions

Hi everyone, I'm simply configuring a WAN failover solution between 2 routers.

I have 2 7206VXR routers. Each WAN connection comes from the same ISP. I have HSRP running successfully inside, but need some clarification on the WAN side in terms of BGP failover if one interface or router fails. As a test I'm announcing the same /24 block on each router, lets say for this example.

RTRA's BGP configuration is a normal BGP configuration. RTRB's configuration is identical, but I have prepended the as-path using a route-map, and applied it to the neighbor statement outbound.

For example, in RTRB

route-map prepend permit 10
set as-path prepend 123 123 (where 123 is my AS example in both routers)

Will this configuration give me the desired effect? i.e. forcing the ISP to route this block to RTRA, unless of course it's not available?

Thanks in advance.


New Member

Re: Need BGP prepend suggestions


Im not an expert, but I have a similar configuration (one provider with two connections for failover), what I use is communities, so there is a prefered path to my networks and if one goes down the other one takes over.

Hope this helps,


Re: Need BGP prepend suggestions


it depends on your provider BGP configuration.

You can use MED, as prepending, communities, etc., to tell your provider which path you'd like him to prefer.

But you need him to accept this. (He can always ignore/override your preferrence.)

So the best practice is to ask the provider: "Is this the way you would accept?"

Should the provider refuse, the only way to force the provider to use your preferred path is advertising the prefix from one of your routers only.

You might use BGP conditional advertisement feature, e.g., see

for details.



New Member

Re: Need BGP prepend suggestions


The method you stated *should* give you your desired outcome. If the provider does not overide it (like mentioned above). (Normaly Internet ISP's do)

If you decide to go with using communities like the post above mentioned, Here is a good site that list common ISP's and gives that details what communities strings they accept

Another method if you have a subnet larger than let say for example a you can split the subnet into two and advertise that on router A (so router A would be advertising and and router B advertise the larger subnet Since the route with the shorter/more specific prefix is preffered traffic will always go to router A and if a failure on router A happens the path thru the larger prefix will still exist.

Hope that helps

New Member

Re: Need BGP prepend suggestions

Thanks all. The original prepend scenario worked as desired. It's always good to have a flexible ISP.