cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
121
Views
0
Helpful
4
Replies

What is the max as-path length of BGP in cisco network>

Herman2018
Level 3
Level 3

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

 

2 Accepted Solutions

Accepted Solutions

 

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

View solution in original post

Harold Ritter
Cisco Employee
Cisco Employee

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

4 Replies 4

 

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

thanks @David Ruess for your advice!

Harold Ritter
Cisco Employee
Cisco Employee

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Thanks a lot @Harold Ritter for your kind advice!

Review Cisco Networking for a $25 gift card