cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
20127
Views
21
Helpful
11
Replies

bgp bestpath as-path multipath-relax

Ibrahim Jamil
Level 6
Level 6

Hello Guys

 

 

what the below hidden command does exactly ? how it works

 

bgp bestpath as-path multipath-relax

 

 

Thanks

 

 

11 Replies 11

Harold Ritter
Cisco Employee
Cisco Employee

Hi Ibrahim,

 

By default, IOS does not allow you to load balance between multiple paths received from different AS numbers. This commands changes this default behavior. I have seen some customers using it to load balance between two default routes (0/0) received from two upstream ISPs.

 

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

Hello Harold

 

 

this is to load share out bound traffic no inbound , is that true

 

 

thanks

 

 

 

Correct.

If it is doing only to outbound traffic, Then what is the process to do for incoming traffic? 


@Joseph W. Doherty wrote:
Correct.

 

That's often can become rather involved, i.e. discussions with your providers. Sometimes it might be as simple as how you advertise certain prefixes with AS prepends or, for complex, you might have community strings that trigger certain routing polices on your provider's equipment.

Hi Harold Ritter,

Thank You for your reply, I am studying for CCIE R&S lab, i have created a big network in my own lab, where i faced this issue, Can you please suggest the solutions, I will be very thankful to your.

Please suggest the solution.

Regards
Siba

Hi Harold Ritter,

If it is doing only to outbound traffic, Then what is the process to do for incoming traffic?

Regards
Siba

Vick28719
Level 1
Level 1

Hi Ibrahim 

 

This is also applicable in case of DC fabric, ( leaf spine architecture ). 

In case one have different AS number at Spine and Leaf layer, even when you have multipath ; add path features enabled. Only one path is installed in routing table. As the router sees the AS - Path different on the 2 routes recieved ( Spine 1 & Spine 2 ) 

To enable BGP to install multiple path, all values must be equal. ( including AS path / length  ) so if we have 2 different AS path, it does not consider them equal 

 

This command allows BGP to deviate from standard rules, and install both prefixes even when they are received from different AS path 

 

Hope that helps 

Deepak Kumar
VIP Alumni
VIP Alumni

Hi,

By default, there is no load balancing in IOS with BGP but this command will enable the Load balancing between two different routes.

 

https://ccieblog.co.uk/bgp/bgp-unequal-load-cost-sharing

Regards,
Deepak Kumar,
Don't forget to vote and accept the solution if this comment will help you!

ankit.prasad
Level 1
Level 1

To answer your question in simple words, the command is used to enable Load sharing in BGP. The command is used in conjunction with 'maximum-paths' command.

To understand this you need to keep just 2 things in mind, first BGP calculates best path based on the attributes and second by default load sharing or someone would call it load balancing is disabled in BGP. So, here is how it works :-

 

Scenario :

We have a router (CE) which is connected to 2 PEs (let's call it PE1 and PE2). Both of these PEs are advertising routes to a particular destination (eg. 1.1.1.1/32).

 

1. Now if you run 'show ip route' it will show the best path i.e., from PE1, however when you 'll check 'show ip bgp 1.1.1.1' it will should you 2 routes, one which you're learning from PE1 will show as best.

2. What we want here is to use both the paths that is, if traffic is sent to 1.1.1.1 from CE then the packets should be load shared between PE 1 and PE 2.

3. First we need to enable multipath in BGP by following command :-

#router bgp <AS No.>

#maximum-paths 4 <could range from 1-32>

This command enables BGP to use upto 4 paths for the same destination.

4. As we know that in BGP for preferring a route over the other we have several attributes. In this scenario we have same Weight, local preference, originate and no. of AS path hop and usually router id becomes the tie breaker. So when we use command :-

bgp bestpath as-path multipath-relax

 we can see that both the routes in BGP as well as in the routing table appears as best.

 

Just use the above scenario and compare the results of show ip bgp and show ip route.

Hi All,

 

Actually I have a same question but for a different Topology.

I have two routers connecting to different Service Providers (Router A to Service provider A1 and Router B to Service Provider B1).

We are using iBGP between A and B and eBGP between A to A1 and B to B1.

Can I use ''bgp bestpath as-path multipath-relax'' command to load balance/share outbound traffic between these two service providers in different AS'es ?

 

Where all this command be applied ? in eBGP as well as iBGP ? (we are using VRF).

 

 

Regards

NAVAR

 

 

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card