cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
894
Views
0
Helpful
5
Replies

BGP Path Selection

aprasad11
Level 1
Level 1

Hi,

I would like to know if i have two EBGP peering to two different AS number.

If i am advertising route 202.202.0.0/24 and 202.202.1.0/24 to ISP A and 202.202.0.0/23 to ISP B  which ISP will be chosen for return traffic.

In this case In the internet which route will be chosen,  the more specific route via ISP A who has a lot of prepends or route that has a better BGP attribute e.g better AS path etc.

2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

The most specific prefixes are always used.

So in your example  the BGP attributes don't come into it.

Jon

View solution in original post

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi

It depends of the metric received, below you will find how BGP prefers a path over other:

https://www.noction.com/blog/bgp_bestpath_selection_algorithm

In the case of AS-Path attribute imagine you are receiving the route 1.1.1.1/32 via both ISP but with the following AS Path list:

ISP1  100  100 100
ISP 2  200  200 200 200 200

The router will prefer the path through ISP1, Comparing AS-Paths, the shortest AS-Path is always preferred. 

AS-Path also can be used to keep symmetric traffic. For example: Local-Preference (IN) could be used to know the best path to reach a destination and AS-Path (OUT) to prevent receive the traffic back through the backup path. 

Remember, if you are going to advertise a subnet to other BGP peer you need to include the specific (real) subnet mask, you have 2 - /24 subnets or one /23 subnet. 

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. <<

View solution in original post

5 Replies 5

Jon Marshall
Hall of Fame
Hall of Fame

The most specific prefixes are always used.

So in your example  the BGP attributes don't come into it.

Jon

Thanks Jon.. Yes you are correct i had also simulated this ..

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi

It depends of the metric received, below you will find how BGP prefers a path over other:

https://www.noction.com/blog/bgp_bestpath_selection_algorithm

In the case of AS-Path attribute imagine you are receiving the route 1.1.1.1/32 via both ISP but with the following AS Path list:

ISP1  100  100 100
ISP 2  200  200 200 200 200

The router will prefer the path through ISP1, Comparing AS-Paths, the shortest AS-Path is always preferred. 

AS-Path also can be used to keep symmetric traffic. For example: Local-Preference (IN) could be used to know the best path to reach a destination and AS-Path (OUT) to prevent receive the traffic back through the backup path. 

Remember, if you are going to advertise a subnet to other BGP peer you need to include the specific (real) subnet mask, you have 2 - /24 subnets or one /23 subnet. 

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. <<

Thanks For Your reply Julio,

Basically i have specific routes advertising via ISP A and a summarized aggregate advertising via ISP B. 

In my case the specific route is chosen first.

It was a pleasure my friend.

Have a good day!

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<