07-17-2024 08:16 PM
hi, we have multiple internet lines and some public IP address blocks (subnet A, and subnet B). Now we chose one Internet line as primary link and another internet line as backup line,and configured route-map with prepend local AS x x x when advertising public subnet A and B to ISP via bgp, but we still see the asymmetric routing issue. Outbound traffics are routed via Internet line 1, and return traffics are routed via internet 2. We want to update the as-path prepend in the route-map with add more local AS numbers. Can anyone please advise whether there will be any issue at ISP side if adding too local AS numbers? What is the max as-path length of BGP? Thanks in advance.
Set clauses:
as-path prepend 3xxxx 3xxx 3xxx 3xxx 3xxx 3xxx
Solved! Go to Solution.
07-17-2024 08:43 PM
Check this document. It depends on if other ISPs have this configured later in the path.
Cisco IOS IP Routing: BGP Command Reference - BGP Commands: A through B [Support] - Cisco
-David
07-17-2024 09:28 PM - edited 07-17-2024 10:04 PM
Hi @Herman2018 ,
Setting a longer AS path on the backup link does not always guarantee that traffic will come back via the primary link. This is because other BGP attributes are used to determine the best path.
For instance most service providers (SP) will prefer customers routes over peer routes and peer routes over transit routes. They do that by setting the local preference accordingly. This obviously takes precedence over the AS path length, as the local preference is evaluated before in the BGP best path selection process.
A safer approach is to use the BGP conditional advertisement feature. This feature causes the local prefixes (subnet A and B) to be advertised to the secondary SP only if you stop receiving certain routes from the primary SP. This will ensure that trafic from the Internet returns through the primary SP as long as it is available and uses the secondary SP only in case the primary fails.
Please refer to the following document for more information on how to configure this feature.
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html
Regards,
07-17-2024 08:43 PM
Check this document. It depends on if other ISPs have this configured later in the path.
Cisco IOS IP Routing: BGP Command Reference - BGP Commands: A through B [Support] - Cisco
-David
07-17-2024 11:18 PM
thanks @David Ruess for your advice!
07-17-2024 09:28 PM - edited 07-17-2024 10:04 PM
Hi @Herman2018 ,
Setting a longer AS path on the backup link does not always guarantee that traffic will come back via the primary link. This is because other BGP attributes are used to determine the best path.
For instance most service providers (SP) will prefer customers routes over peer routes and peer routes over transit routes. They do that by setting the local preference accordingly. This obviously takes precedence over the AS path length, as the local preference is evaluated before in the BGP best path selection process.
A safer approach is to use the BGP conditional advertisement feature. This feature causes the local prefixes (subnet A and B) to be advertised to the secondary SP only if you stop receiving certain routes from the primary SP. This will ensure that trafic from the Internet returns through the primary SP as long as it is available and uses the secondary SP only in case the primary fails.
Please refer to the following document for more information on how to configure this feature.
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/16137-cond-adv.html
Regards,
07-17-2024 11:16 PM
Thanks a lot @Harold Ritter for your kind advice!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide