Redundancy and Load Balancing
BGP Load Balance Command References
admin@XorPlus# set protocols bgp multipath disable [true/false]
Note: This command is to enable/disable Load Balance when it have multiple connections to the same destination and all the BGP route entry have the same AS-path values.
admin@XorPlus# set protocols bgp multipath path-relax [true/false]
Note: This command is to enable/disable path-relax, when it have multiple connections to the same destination and they have the different AS-path, if you enable path-relax,they also could form Load Balance.
Under normal conditions, when a BGP speaker receives identical paths for a prefix from an adjacent AS, only one path will be selected as the best path (normally the one with the lowest BGP ROUTER_ID value) and will be installed in the routing table. If BGP multipath is enabled, multiple paths can be installed in the IP routing table. By default, just all the BGP routes have the same AS-paths, they can form Load Balance, but if you enable path-relax, the BGP route have the different AS-paths, they also can form Load Balance.
Configure Example 1: Redundancy
When a BGP speaker receives identical paths for a prefix from an adjacent AS, only one path will be selected as the best path and will be installed in the routing table, When the primary failed, the backup one will be selected as the best path and will be installed in the routing table.
Figure 3-1
Step 1: Switch A, Switch C configure EBGP, Switch B, Switch D configure EBGP, Switch C. Switch D configure IBGP, SwitchC, Switch E configure EBGP, Switch D, Switch E configure EBGP, Switch E, Switch F configure EBGP, SwitchA, Switch B in AS 10, Switch C, Switch D in AS 9, Switch E in as 6, Switch F in AS 100
Switch A:
admin@XorPlus# set protocols bgp bgp-id 33.33.33.33 admin@XorPlus# set protocols bgp local-as 10 admin@XorPlus# set protocols bgp peer 5005::1 local-ip 5005::2" admin@XorPlus# set protocols bgp peer 5005::1 as 9 admin@XorPlus# set protocols bgp peer 5005::1 ipv6-unicast true
Switch B:
admin@XorPlus# set protocols bgp bgp-id 44.44.44.44 admin@XorPlus# set protocols bgp local-as 10 admin@XorPlus# set protocols bgp peer 2002::1 local-ip 2002::2" admin@XorPlus# set protocols bgp peer 2002::1 as 9 admin@XorPlus# set protocols bgp peer 2002::1 ipv6-unicast true
Switch C:
admin@XorPlus# set protocols bgp bgp-id 9.9.9.9 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 3003::1 local-ip "3003::2" admin@XorPlus# set protocols bgp peer 3003::1 as "6" admin@XorPlus# set protocols bgp peer 3003::1 ipv6-unicast true admin@XorPlus# set protocols bgp peer 5005::2 local-ip "5005::1" admin@XorPlus# set protocols bgp peer 5005::2 as "10" admin@XorPlus# set protocols bgp peer 5005::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 6006::2 local-ip "6006::1" admin@XorPlus# set protocols bgp peer 6006::2 as "9" admin@XorPlus# set protocols bgp peer 6006::2 next-hop-self true admin@XorPlus# set protocols bgp peer 6006::2 ipv6-unicast true
Switch D:
admin@XorPlus# set protocols bgp bgp-id 26.26.26.26 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 1001::1 local-ip "1001::2" admin@XorPlus# set protocols bgp peer 1001::1 as "6" admin@XorPlus# set protocols bgp peer 1001::1 ipv6-unicast true admin@XorPlus# set protocols bgp peer 2002::2 local-ip "2002::1" admin@XorPlus# set protocols bgp peer 2002::2 as "10" admin@XorPlus# set protocols bgp peer 2002::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 6006::1 local-ip "6006::2" admin@XorPlus# set protocols bgp peer 6006::1 as "9" admin@XorPlus# set protocols bgp peer 6006::1 next-hop-self true admin@XorPlus# set protocols bgp peer 6006::1 ipv6-unicast true
Switch E:
admin@XorPlus# set protocols bgp bgp-id 6.6.6.6 admin@XorPlus# set protocols bgp local-as "6" admin@XorPlus# set protocols bgp peer 1001::2 local-ip "1001::1" admin@XorPlus# set protocols bgp peer 1001::2 as "9" admin@XorPlus# set protocols bgp peer 1001::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 3003::2 local-ip "3003::1" admin@XorPlus# set protocols bgp peer 3003::2 as "9" admin@XorPlus# set protocols bgp peer 3003::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 4004::2 local-ip "4004::1" admin@XorPlus# set protocols bgp peer 4004::2 as "100" admin@XorPlus# set protocols bgp peer 4004::2 ipv6-unicast true
Switch F:
admin@XorPlus# set protocols bgp bgp-id 100.100.100.100 admin@XorPlus# set protocols bgp local-as 100 admin@XorPlus# set protocols bgp peer 4004::1 local-ip "4004::2" admin@XorPlus# set protocols bgp peer 4004::1 as 6 admin@XorPlus# set protocols bgp peer 4004::1 ipv6-unicast true
Step 2: Switch A and Switch B distribute BGP route entry 9999::/64,then check the BGP route table on Switch C, Switch D, Switch E
Switch C BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 5005::2 33.33.33.33 10 i * 9999::/64 6006::2 26.26.26.26 10 i
Switch D BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ * 9999::/64 6006::1 9.9.9.9 10 i *> 9999::/64 2002::2 44.44.44.44 10 i
Switch E BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 3003::2 9.9.9.9 9 10 i * 9999::/64 1001::2 26.26.26.26 9 10 i
Step 3: The primary link down, then the BGP route entry from the backup link will be the best route ,then check the BGP route table on Switch E
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 1001::2 26.26.26.26 9 10 i
Configuration Example 2: Load Balance (BGP route have the same AS-path)
When a BGP speaker receives identical paths for a prefix from an adjacent AS, if BGP multipath is enabled, multiple paths can be installed in the IP routing table.
Figure 3-2
Step 1:SwitchA SwitchC configure EBGP,SwitchB SwitchD configure EBGP,SwitchC SwitchD cofnigure IBGP,SwitchC SwitchE configure EBGP, SwitchD SwitchE configure EBGP,SwitchE SwitchF configure EBGP,SwitchA SwitchB in AS 10,SwitchC SwitchD in AS 9,SwitchE in as 6,SwitchF in AS 100
Switch A:
admin@XorPlus# set protocols bgp bgp-id 33.33.33.33 admin@XorPlus# set protocols bgp local-as 10 admin@XorPlus# set protocols bgp peer 5005::1 local-ip 5005::2" admin@XorPlus# set protocols bgp peer 5005::1 as 9 admin@XorPlus# set protocols bgp peer 5005::1 ipv6-unicast true
Switch B:
admin@XorPlus# set protocols bgp bgp-id 44.44.44.44 admin@XorPlus# set protocols bgp local-as 10 admin@XorPlus# set protocols bgp peer 2002::1 local-ip 2002::2" admin@XorPlus# set protocols bgp peer 2002::1 as 9 admin@XorPlus# set protocols bgp peer 2002::1 ipv6-unicast true
Switch C:
admin@XorPlus# set protocols bgp bgp-id 9.9.9.9 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 3003::1 local-ip "3003::2" admin@XorPlus# set protocols bgp peer 3003::1 as "6" admin@XorPlus# set protocols bgp peer 3003::1 ipv6-unicast true admin@XorPlus# set protocols bgp peer 5005::2 local-ip "5005::1" admin@XorPlus# set protocols bgp peer 5005::2 as "10" admin@XorPlus# set protocols bgp peer 5005::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 6006::2 local-ip "6006::1" admin@XorPlus# set protocols bgp peer 6006::2 as "9" admin@XorPlus# set protocols bgp peer 6006::2 next-hop-self true admin@XorPlus# set protocols bgp peer 6006::2 ipv6-unicast true
Switch D:
admin@XorPlus# set protocols bgp bgp-id 26.26.26.26 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 1001::1 local-ip "1001::2" admin@XorPlus# set protocols bgp peer 1001::1 as "6" admin@XorPlus# set protocols bgp peer 1001::1 ipv6-unicast true admin@XorPlus# set protocols bgp peer 2002::2 local-ip "2002::1" admin@XorPlus# set protocols bgp peer 2002::2 as "10" admin@XorPlus# set protocols bgp peer 2002::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 6006::1 local-ip "6006::2" admin@XorPlus# set protocols bgp peer 6006::1 as "9" admin@XorPlus# set protocols bgp peer 6006::1 next-hop-self true admin@XorPlus# set protocols bgp peer 6006::1 ipv6-unicast true
Switch E:
admin@XorPlus# set protocols bgp bgp-id 6.6.6.6 admin@XorPlus# set protocols bgp local-as "6" admin@XorPlus# set protocols bgp peer 1001::2 local-ip "1001::1" admin@XorPlus# set protocols bgp peer 1001::2 as "9" admin@XorPlus# set protocols bgp peer 1001::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 3003::2 local-ip "3003::1" admin@XorPlus# set protocols bgp peer 3003::2 as "9" admin@XorPlus# set protocols bgp peer 3003::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 4004::2 local-ip "4004::1" admin@XorPlus# set protocols bgp peer 4004::2 as "100" admin@XorPlus# set protocols bgp peer 4004::2 ipv6-unicast true
Switch F:
admin@XorPlus# set protocols bgp bgp-id 100.100.100.100 admin@XorPlus# set protocols bgp local-as 100 admin@XorPlus# set protocols bgp peer 4004::1 local-ip "4004::2" admin@XorPlus# set protocols bgp peer 4004::1 as 6 admin@XorPlus# set protocols bgp peer 4004::1 ipv6-unicast true
Step 2: SwitchA and SwitchB distribute BGP route entry 9999::/64, then check the BGP route table on Switch C, Switch D, SwitchE.
Switch C BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 5005::2 33.33.33.33 10 i * 9999::/64 6006::2 26.26.26.26 10 i
Switch D BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ * 9999::/64 6006::1 9.9.9.9 10 i *> 9999::/64 2002::2 44.44.44.44 10 i
Switch E BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 3003::2 9.9.9.9 9 10 i * 9999::/64 1001::2 26.26.26.26 9 10 i
Step 3: Enable Multipath on Switch E, then check BGP route table, it will form Load Balance, as the two BGP route entry have the same AS-path
admin@XorPlus#set protocols bgp multipath disable false
Switch E BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 1001::2 26.26.26.26 9 10 i *> 9999::/64 3003::2 9.9.9.9 9 10 i admin@XorPlus# run show route forward-route ipv6 all Destination NetMask NextHopMac Port --------------------------------------- --------------------------------------- ----------------- --------- 2001:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 4004:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 1001:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 3003:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 9999:: ffff:ffff:ffff:ffff:: C8:0A:A9:AE:0A:66 te-1/1/46 9999:: ffff:ffff:ffff:ffff:: C8:0A:A9:04:49:28 te-1/1/48
Configuration Example 3: Load Balance (BGP route have different AS-path)
When a BGP speaker receives identical paths for a prefix from an adjacent AS, if BGP multipath is enabled, multiple paths can be installed in the IP routing table:
Figure 3-3
Step 1: Switch A, Switch C configure EBGP, Switch B, Switch D configure EBGP, Switch C, Switch D configure IBGP, Switch C, Switch E configure EBGP, Switch D, Switch E configure EBGP, Switch E, Switch F configure EBGP, Switch A in AS 10, Switch B in AS 12, Switch C, Switch D in AS 9, Switch E in AS 6, Switch F in AS 100
Switch A:
admin@XorPlus# set protocols bgp bgp-id 33.33.33.33 admin@XorPlus# set protocols bgp local-as 10 admin@XorPlus# set protocols bgp peer 5005::1 local-ip 5005::2" admin@XorPlus# set protocols bgp peer 5005::1 as 9 admin@XorPlus# set protocols bgp peer 5005::1 ipv6-unicast true
Switch B:
admin@XorPlus# set protocols bgp bgp-id 44.44.44.44 admin@XorPlus# set protocols bgp local-as 12 admin@XorPlus# set protocols bgp peer 2002::1 local-ip 2002::2" admin@XorPlus# set protocols bgp peer 2002::1 as 9 admin@XorPlus# set protocols bgp peer 2002::1 ipv6-unicast true
Switch C:
admin@XorPlus# set protocols bgp bgp-id 9.9.9.9 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 3003::1 local-ip "3003::2" admin@XorPlus# set protocols bgp peer 3003::1 as "6" admin@XorPlus# set protocols bgp peer 3003::1 ipv6-unicast true admin@XorPlus# set protocols bgp peer 5005::2 local-ip "5005::1" admin@XorPlus# set protocols bgp peer 5005::2 as "10" admin@XorPlus# set protocols bgp peer 5005::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 6006::2 local-ip "6006::1" admin@XorPlus# set protocols bgp peer 6006::2 as "9" admin@XorPlus# set protocols bgp peer 6006::2 next-hop-self true admin@XorPlus# set protocols bgp peer 6006::2 ipv6-unicast true
Switch D:
admin@XorPlus# set protocols bgp bgp-id 26.26.26.26 admin@XorPlus# set protocols bgp local-as "9" admin@XorPlus# set protocols bgp peer 1001::1 local-ip "1001::2" admin@XorPlus# set protocols bgp peer 1001::1 as "6" admin@XorPlus# set protocols bgp peer 1001::1 ipv6-unicast true admin@XorPlus# set protocols bgp peer 2002::2 local-ip "2002::1" admin@XorPlus# set protocols bgp peer 2002::2 as "12" admin@XorPlus# set protocols bgp peer 2002::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 6006::1 local-ip "6006::2" admin@XorPlus# set protocols bgp peer 6006::1 as "9" admin@XorPlus# set protocols bgp peer 6006::1 next-hop-self true admin@XorPlus# set protocols bgp peer 6006::1 ipv6-unicast true
Switch E:
admin@XorPlus# set protocols bgp bgp-id 6.6.6.6 admin@XorPlus# set protocols bgp local-as "6" admin@XorPlus# set protocols bgp peer 1001::2 local-ip "1001::1" admin@XorPlus# set protocols bgp peer 1001::2 as "9" admin@XorPlus# set protocols bgp peer 1001::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 3003::2 local-ip "3003::1" admin@XorPlus# set protocols bgp peer 3003::2 as "9" admin@XorPlus# set protocols bgp peer 3003::2 ipv6-unicast true admin@XorPlus# set protocols bgp peer 4004::2 local-ip "4004::1" admin@XorPlus# set protocols bgp peer 4004::2 as "100" admin@XorPlus# set protocols bgp peer 4004::2 ipv6-unicast true
Switch F:
admin@XorPlus# set protocols bgp bgp-id 100.100.100.100 admin@XorPlus# set protocols bgp local-as 100 admin@XorPlus# set protocols bgp peer 4004::1 local-ip "4004::2" admin@XorPlus# set protocols bgp peer 4004::1 as 6 admin@XorPlus# set protocols bgp peer 4004::1 ipv6-unicast true
Step 2: Switch A, Switch B distribute BGP route entry 9999::/64,then check the BGP route table on Switch C, Switch D, Switch E
Switch C BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ * 9999::/64 6006::2 26.26.26.26 12 i *> 9999::/64 5005::2 33.33.33.33 10 i
Switch D BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ * 9999::/64 6006::1 9.9.9.9 10 i *> 9999::/64 2002::2 44.44.44.44 12 i
Switch E BGP route table:
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 3003::2 9.9.9.9 9 10 i * 9999::/64 1001::2 26.26.26.26 9 12 i
Step 3: Enable Multipath and enable path-relax on Switch E (as the two BGP route have different AS-path, if it want to form Load Balance, it must enable path-relax and enable multipath at the same time), then check theBGP route table on Switch E, it will form Load Balance.
admin@XorPlus# set protocols bgp multipath disable false admin@XorPlus# set protocols bgp multipath path-relax true admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 1001::2 26.26.26.26 9 12 i *> 9999::/64 3003::2 9.9.9.9 9 10 i admin@XorPlus# run show route forward-route ipv6 all Destination NetMask NextHopMac Port --------------------------------------- --------------------------------------- ----------------- --------- 2001:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 4004:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 1001:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 3003:: ffff:ffff:ffff:ffff:: 04:7D:7B:62:93:FF connected 9999:: ffff:ffff:ffff:ffff:: C8:0A:A9:AE:0A:66 te-1/1/46 9999:: ffff:ffff:ffff:ffff:: C8:0A:A9:04:49:28 te-1/1/48
Step 4: Check the BGP route table on Switch F, the BGP route entry was gotten from Switch E, and it’s the first one that arrived at Switch E
admin@XorPlus# run show bgp routes ipv6 Status Codes: * valid route, > best route Origin Codes: i IGP, e EGP, ? incomplete Prefix Nexthop Peer AS Path ---------------------------- ------------------------ --------------- ------------ *> 9999::/64 4004::1 6.6.6.6 6 9 12 i
Copyright © 2025 Pica8 Inc. All Rights Reserved.