
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 08:46 AM - edited 03-05-2019 09:35 AM
I have two ISP A and B out of 2 different physical locations.
I'm advertising one subnet /24 out of A and B.
I want to always prefer ISP A for all return traffic for the /24 subnet back into ISP-A and only use ISP-B for events where ISP A is not available.
What I have done is configured BGP AS-prepend out of ISP-B and while that works for most networks out on the internet I still see some traffic returning back into ISP-B.
Is there anything I can do to always force return traffic always out of ISP-A in addition to AS-prepend?
Solved! Go to Solution.
- Labels:
-
Other Routing
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 09:08 AM
Hello,
on a side note, why not simply send out a less specific summary to B, and the (more specific) /24 network to A ? A will be preferred since it has the more specific routes...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 09:53 AM
Hi Juan,
The reason the as path prepending does not always work is that most providers set local preference and prefer prefixes coming to their network, based on whether they are received from a customer, peer or transit network, in that order. This overrides the selection based on as path length.
One way to solve this issue is to use a more specific advertisement on one side, as Georg previously mentioned. This is not always possible though. If you only own a /24, you can't advertise anything greater than that /24 and advertising something longer than a /24 will normally be filtered by most service providers.
Another way to solve the issue would be to use BGP conditional advertisement, which will allow you to monitor the state of your BGP session on site A and only advertise the /24 from site B, if you stop receiving prefixes on the BGP session at site A.
For more information on BGP conditional advertisement, please refer to the following URL:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html
Regards,
Harold Ritter, CCIE #4168 (EI, SP)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 08:48 AM - edited 12-04-2017 08:50 AM
Hi
You can play with the BGP attributes, for example:
Incoming Traffic
Weight or Local-preference with High value for incoming traffic.
Outbound Traffic
AS-Path Prepend on Router A with lowest AS repeats
AS-Path Prepend on Router B with higher AS repeats
With this manipulation you will achieve symmetric traffic.
Hope it is useful
:-)
>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 08:50 AM
Those are great but those attributes are not transitive so it might not work for external networks not connected and peer directly with the ISP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 08:53 AM
Hi Juan,
Do you have any topology of your network? or how is your infrastructure?
>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 08:59 AM
ISP-A is located in New York
ISP-B is located in Philadelphia
Both are single router single ISP at the site.
New York and Philadelphia are connected via a L2 private MPLS connection.
The AS-prepend works but not for all remote networks as I’m seeing traffic enter ISP-B.
I have also considered doing a route-map with if route exist type of function but I’m looking for a BGP attribute solution before going into conditional route-maps.
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 09:53 AM
Hi Juan,
The reason the as path prepending does not always work is that most providers set local preference and prefer prefixes coming to their network, based on whether they are received from a customer, peer or transit network, in that order. This overrides the selection based on as path length.
One way to solve this issue is to use a more specific advertisement on one side, as Georg previously mentioned. This is not always possible though. If you only own a /24, you can't advertise anything greater than that /24 and advertising something longer than a /24 will normally be filtered by most service providers.
Another way to solve the issue would be to use BGP conditional advertisement, which will allow you to monitor the state of your BGP session on site A and only advertise the /24 from site B, if you stop receiving prefixes on the BGP session at site A.
For more information on BGP conditional advertisement, please refer to the following URL:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html
Regards,
Harold Ritter, CCIE #4168 (EI, SP)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 09:08 AM
Hello,
on a side note, why not simply send out a less specific summary to B, and the (more specific) /24 network to A ? A will be preferred since it has the more specific routes...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2017 09:12 AM
That's a good idea and I have not tried that. The only possible issue is other subnets that I do not want to advertise might fall in the range but that is something I need to check.
