OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : BGP : Multipath eiBGP
Multipath eiBGP
Use this command to set the number of equal-cost multi-path (ECMP) routes for both eBGP and iBGP. This feature allows to configure multipath load balancing with both external BGP (eBGP) and internal BGP (iBGP) paths in Border Gateway Protocol.
When enabled, this feature can perform load balancing on eBGP and/or iBGP paths. With multiple eBGP and iBGP paths, selection is per all paths sorted according to BGP rules and hence either of all eBGP or iBGP or both will be marked as candidates for multipath programming i.e., it is possible either all eBGP paths or all iBGP paths or both eBGP and iBGP are programmed as multipaths.
Exceptions during path selections when eiBGP is enabled:
AS Path length check is ignored.
Origin Check is ignored.
Peer type check is ignored.
IGP Metric check is ignored.
Topology
Figure 1-33: Multipath eiBGP topology
Configuration
RTR1
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter Interface mode
(config-if)# ip address 41.41.41.41/32 sec-ondary
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe27
Enter Interface mode
(config-if)# ip address 21.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe1
Enter Interface mode
(config-if)# ip address 22.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe7
Enter Interface mode
(config-if)# ip address 23.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe20
Enter Interface mode
(config-if)# ip address 100.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)# router bgp 100
Enter Router BGP mode
(config-router)# neighbor 21.1.1.2 remote-as 200
Define BGP neighbors. 21.1.1.2 is the IP address of the neighbor (RTR2) and 200 is the neighbors AS number
(config-router)# neighbor 22.1.1.2 remote-as 300
Define BGP neighbors. 22.1.1.2 is the IP address of the neighbor (RTR3) and 300 is the neighbors AS number
(config-router)# neighbor 23.1.1.2 remote-as 100
Define BGP neighbors. 23.1.1.2 is the IP address of the neighbor (RTR4) and 100 is the neighbors AS number
(config-router)# address-family ipv4 unicast
Enter into BGP address family IPv4
(config-router-af)#max-paths eibgp 4
Configure eiBGP max-paths (4).
(config-router-af)#redistribute connected
Redistribute connected routes into BGP
(config-router-af)#neighbor 21.1.1.2 acti-vate
Activate the neighbor
(config-router-af)#neighbor 22.1.1.2 acti-vate
Activate the neighbor
(config-router-af)#neighbor 23.1.1.2 acti-vate
Activate the neighbor
(config-router-af)# commit
Commit the configurations
(config-router-af)# end
Return to privilege mode
RTR2
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter Interface mode
(config-if)# ip address 45.45.45.45/32 sec-ondary
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe7
Enter Interface mode
(config-if)# ip address 21.1.1.2/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe6
Enter Interface mode
(config-if)# ip address 111.1.1.11/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)# router bgp 200
Enter Router BGP mode
(config-router)# neighbor 21.1.1.1 remote-as 100
Define BGP neighbors. 21.1.1.1 is the IP address of the neighbor (RTR1) and 100 is the neighbors AS number
(config-router)# address-family ipv4 unicast
Enter into BGP address family IPv4
(config-router-af)#redistribute connected
Redistribute connected routes
(config-router-af)#neighbor 21.1.1.1 acti-vate
Activate the neighbor
(config-router-af)# commit
Commit the configurations
(config-router-af)# end
Return to privilege mode
RTR3
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter Interface mode
(config-if)# ip address 42.42.42.42/32 sec-ondary
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe0
Enter Interface mode
(config-if)# ip address 111.1.1.42/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe1
Enter Interface mode
(config-if)# ip address 22.1.1.2/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)# router bgp 300
Enter Router BGP mode
(config-router)# neighbor 22.1.1.1 remote-as 100
Define BGP neighbors. 22.1.1.1 is the IP address of the neighbor (RTR1) and 100 is the neighbors AS number
(config-router)# address-family ipv4 unicast
Enter into BGP address family IPv4
(config-router-af)#redistribute connected
Redistribute connected routes
(config-router-af)#neighbor 22.1.1.1 acti-vate
Activate the neighbor
(config-router-af)# commit
Commit the configurations
(config-router-af)# end
Return to privilege mode
RTR4
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter Interface mode
(config-if)# ip address 43.43.43.43/32 sec-ondary
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe7
Enter Interface mode
(config-if)# ip address 23.1.1.2/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#interface xe18
Enter Interface mode
(config-if)# ip address 111.1.1.43/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)# router bgp 100
Enter Router BGP mode
(config-router)# neighbor 23.1.1.1 remote-as 100
Define BGP neighbors. 23.1.1.1 is the IP address of the neighbor (RTR1) and 100 is the neighbors AS number
(config-router)# address-family ipv4 unicast
Enter into BGP address family IPv4
(config-router-af)#redistribute connected
Redistribute connected routes
(config-router-af)#neighbor 23.1.1.1 acti-vate
Activate the neighbor
(config-router-af)# commit
Commit the configurations
(config-router-af)# end
Return to privilege mode
Validation
RTR1
 
# sh ip bgp summary
BGP router identifier 15.1.1.2, local AS number 100
BGP table version is 4
3 BGP AS-PATH entries
0 BGP community entries
4 Configured ebgp ECMP multipath: Currently set at 4
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
21.1.1.2 4 200 13 16 4 0 0 00:04:28 3
22.1.1.2 4 300 10 14 4 0 0 00:03:05 4
23.1.1.2 4 100 7 9 4 0 0 00:01:49 4
 
Total number of neighbors 3
 
Total number of Established sessions 3
 
#sh ip route
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
* - candidate default
 
IP Route Table for VRF "default"
B 11.1.1.0/24 [200/0] via 23.1.1.2, xe7, 00:11:26
B 11.11.11.11/32 [20/0] via 21.1.1.2, xe27, 00:10:14
B 17.1.1.0/24 [20/0] via 22.1.1.2, xe1, 00:10:54
C 21.1.1.0/24 is directly connected, xe27, 00:47:36
C 22.1.1.0/24 is directly connected, xe1, 00:49:33
C 23.1.1.0/24 is directly connected, xe7, 00:49:11
C 41.41.41.41/32 is directly connected, lo, 01:30:34
B 42.42.42.42/32 [20/0] via 22.1.1.2, xe1, 00:10:54
B 43.43.43.43/32 [200/0] via 23.1.1.2, xe7, 00:11:26
B 45.45.45.45/32 [20/0] via 21.1.1.2, xe27, 00:10:56
C 100.1.1.0/24 is directly connected, xe20, 00:08:31
B 111.1.1.0/24 [200/0] via 23.1.1.2, xe7, 00:11:26
[200/0] via 22.1.1.2, xe1,
[200/0] Via 21.1.1.2, xe27
C 127.0.0.0/8 is directly connected, lo, 01:39:19
 
Gateway of last resort is not set
 
#sh interface counters rate mbps
-------------------------------------------------------------------------
 
Interface
 
Rx mbps
 
Rx pps
 
Tx mbps
 
Tx pps
 
-------------------------------------------------------------------------
xe1 0.00 0 264.30 22024
xe7 0.00 0 254.86 21238
xe20 822.35 68529 0.02 3
xe27 0.00 0 215.04 17920
Last modified date: 10/16/2023