BGP – How to configure basic Multipath/Load balancing

As you may know BGP HAS to pick a best route, and that is the route that will be put into our global routing table.

Recall that our IGPs have a maximum-paths command that state how many paths can be in the routing table?
BGP supports the “maximum-paths” command, however it behaves differently than it behaves on OSPF or EIGRP.

Be aware that BGP Multipath is only useful for traffic locally on the router, or leaving the routing.
Multipath is in no way “passed” to other routers/neighbors. BGP multipath will allow multiple paths
to a prefix, but it will still choose a “best path” it just won’t exclusively use that best path.

As far as I know BGP multipath is only useful if you are peering with an ISP on two links.
This way you can influence outbound routing from your autonomous system (AS) into the ISP’s AS.

These BGP attributes have to match from the routes or else we won’t be able to load balance them.

  • Next Hop Reachable
  • Weight
  • Local Preference
  • Locally Originated Routes
  • AS Path
  • Origin Code
  • Med
  • Negihbor Type (eBGP or iBGP)
  • IGP Metrix to next-hop

If all of these match, then we can continue to configure Multipath.
Here is our topology to test with…

 

 

AS1 = R1
AS2 = R2,3,4
We are AS 1 and we peer with our ISP (AS2) via eBGP.
We want to take advantage of a second link to the ISP we just turned up, we want to load balance!
Now I checked my “show ip bgp” command’s output and verified that all my attributes matched, so I can continue to configure multipath.
Here is what R1’s current routing table looks like…

 

BGP installed only one path per prefix, the best path, as it should.
Our BGP table on R1 looks like this…

Again, nothing crazy, BGP chose a best path for the prefixes, and only installed that into the routing table.
Now I will configure multipath.

Enable
Configure Terminal
Router BGP 1
maximum-paths eibgp 2

Let’s break down the command…
First we told BGP we want maximum-paths, then we told it we want it for e & iBGP peers,
then we told it how many we would allow installed in the routing table.
Once we run the commands, BGP will alert us to tell us this might cause a routing loop.

Also be aware that the maximum-paths command is not tab completed, it’s hidden.
Now let’s check the routing table on R1 after we enabled multipath

Notice how now BGP has installed two paths to get to each prefix, and they have the same administrative distance,
so they will be load balanced 50/50.

 

Let’s check the BGP table, you will notice that now we have the best path “>” AND now we have a “m” on the second path.
This means we are utilizing multipath.

That’s it! In a later post I will talk about how we can influence and ignore some attributes to allow for multipath!