maximum-paths
This command defines the maximum number of BGP paths to forward packets. This is used to configure BGP multipath, which allows multiple BGP routes to be used simultaneously to reach the same destination. The BGP routing protocol learns and adds multiple routing rules for the same destination, from several BGP neighbors. The benefits of BGP multipath include traffic load-balancing between multiple paths and redundancy in case of path failure.
By default, BGP installs a single route rule (the best one received from the BGP peers) per destination. It is possible to configure BGP to install multiple paths (learned routes from several bgp peers) in the local routing table for multipath load sharing (load balancing sent traffic between multiple next hops),
Syntax
maximum-paths <max paths>
or
maximum-paths ibgp <max paths>
Command |
Description |
---|---|
maximum-paths <max paths> |
Defines maximum paths for external BGP (eBGP). |
maximum-paths ibgp <max paths> |
Defines maximum internal paths (iBGP). |
Command Mode
Privileged User
Example
This example configures the maximum number of paths to 2:
(config-data)# router bgp 1
(conf-router)# maximum-paths 2
(conf-router)# maximum-paths ibgp 2
(conf-router)# neighbor 10.31.4.61 remote-as 1 (conf-router)# neighbor 100.100.100.2 remote-as 1 (conf-router)# exit
(config-data)# exit
If BGP learns the same route (for above example, with destination 11.11.0.0) from both BGP neighbors, it adds both to the routing table, which is displayed in this show output:
CLI# show data ip route
B 11.11.0.0/16 [20/0] via 10.31.4.61, GigabitEthernet 0/0, 00:00:15
via 100.100.100.2, GigabitEthernet 0/0.1000, 00:00:15