06-02-2017 03:54 AM - edited 03-05-2019 08:38 AM
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.
Solved! Go to Solution.
06-02-2017 04:22 AM
The most specific prefixes are always used.
So in your example the BGP attributes don't come into it.
Jon
06-02-2017 04:30 AM
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
:-)
06-02-2017 04:22 AM
The most specific prefixes are always used.
So in your example the BGP attributes don't come into it.
Jon
06-03-2017 03:04 PM
Thanks Jon.. Yes you are correct i had also simulated this ..
06-02-2017 04:30 AM
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
:-)
06-03-2017 03:08 PM
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.
06-03-2017 03:14 PM
It was a pleasure my friend.
Have a good day!
:-)
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