Need BGP prepend suggestions

Unanswered Question
May 24th, 2010
User Badges:

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.


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
milan.kulik Tue, 05/25/2010 - 01:17
User Badges:
  • Red, 2250 points or more


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.



merryllem Tue, 05/25/2010 - 11:42
User Badges:


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

wwbishop2 Tue, 05/25/2010 - 13:27
User Badges:

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


This Discussion