OcNOS-SP : Layer 3 Guide : Layer 3 Unicast Configuration Guide : BGP : 6BGP AS-PATH Multipath-relax
6BGP AS-PATH Multipath-relax
BGP will not load balance across multiple paths by default. We can configure it to do so with the max-paths ebgp <no-of-multipaths> command. The criterion of this command is that all attributes must match (Weight, Local preference, AS Path, etc). This is acceptable if we are multi-homed to a single AS, but what if we are multi-homed to different AS.
BGP AS PATH multipath relax effectively allows for ECMP to be done across different neighboring ASN’s.
Topology
Below topology explains about BGP AS PATH multipath relax functionality.
Figure 1-34: BGP AS-PATH Multipath-relax Topology
Configuration
R1
 
#configure terminal
Enter the Configure mode.
(config)#interface lo
Enter Interface loopback
(config-if)#ip address 100.1.1.1/24 secondary
Configure IP address for interface
(config-if)#exit
Exit interface mode
(config)#interface ge47
Enter Interface loopback
(config-if)#ip address 47.47.47.1/24
Configure IP address for interface
(config-if)#exit
Exit from interface mode and enter the Configure mode
(config)#router bgp 1
Assign the ASN value (1) to the BGP router
(config-router)#neighbor 47.47.47.2 remote-as 2
Configure eBGP neighbor.
(config-router)#address-family ipv4 unicast
Enter address-family ipv4 unicast mode
(config-router-af)#neighbor 47.47.47.2 activate
Activate neighbor
(config-router-af)#network 100.1.1.0/24
Advertise the loopback network into BGP.
(config-router-af)#exit-address-family
Exit address-family config mode
(config-router)#commit
Commit the candidate configuration to the running configuration.
R2
 
#configure terminal
Enter the Configure mode.
(config)#interface ge33
Enter interface mode
(config-if)#ip address 33.33.33.2/24
Configure IP address for interface
(config-if)#exit
Exit from interface mode and enter the Configure mode
(config)#interface ge47
Enter interface mode
(config-if)#ip address 47.47.47.2/24
Configure IP address for interface.
(config-if)#exit
Exit from interface mode and enter the Configure mode
(config)#router bgp 2
Assign the ASN value (2) to the BGP router.
(config-router)#neighbor 33.33.33.3 remote-as 3
Configure eBGP neighbor.
(config-router)#neighbor 47.47.47.1 remote-as 1
Configure eBGP neighbor.
(config-router)#address-family ipv4 unicast
Enter the address family IPv4 unicast mode
(config-router-af)# neighbor 33.33.33.3 activate
Activate the neighbor
config-router-af)# neighbor 47.47.47.1 activate
Activate the neighbor
(config-router-af)# max-paths ebgp 8
Configure eBGP Multipath.
(config-router-af)#exit
Exit from address family mode and enter the Router configure mode
(config-router)# bgp bestpath as-path multipath-relax
Configure BGP AS PATH Multipath relax.
(config-router-af)#exit-address-family
Exit address-family mode
(config-router)#commit
Commit the candidate configuration to the running configuration.
R3
 
#configure terminal
Enter the Configure mode.
(config)#interface lo
Enter Interface loopback.
(config-if)#ip address 100.1.1.1/24 secondary
Configure IP address for interface.
(config-if)#exit
Exit from interface mode and enter the Configure mode.
(config)#interface ge33
Enter Interface loopback.
(config-if)#ip address 33.33.33.3/24
Configure IP address for interface.
(config-if)#exit
Exit from interface mode and enter the Configure mode.
(config)#router bgp 3
Assign the ASN value (3) to the BGP router.
(config-router)#neighbor 33.33.33.2 remote-
 
as 2
Configure eBGP neighbor.
(config-router)#address-family ipv4 unicast
Enter address-family ipv4 unicast mode
(config-router-af)# neighbor 33.33.33.2 activate
Activate the neighbor
(config-router-af)#network 100.1.1.0/24
Advertise the loopback network into BGP.
(config-router-af)#exit-address-family
Exit from router BGP and address-family config mode
(config-router)#commit
Commit the candidate configuration to the running configuration.
Validation
R2#show running-config bgp
!
router bgp 2
bgp bestpath as-path multipath-relax max-paths ebgp 8
neighbor 33.33.33.3 remote-as 3
neighbor 47.47.47.1 remote-as 1
!
address-family ipv4 unicast
neighbor 33.33.33.3 activate
neighbor 47.47.47.1 activate
max-paths ebgp 8
bgp bestpath as-path
multipath-relax
 
exit-address-family
!
R2#show ip bgp 100.1.1.0
BGP routing table entry for 100.1.1.0/24
Paths: (2 available, best #1, table Default-IP-Routing-Table) Advertised to non peer-group peers:
47.47.47.1
3
33.33.33.3 from 33.33.33.3 (33.33.33.3)
Origin IGP, metric 0, localpref 100, valid, external, multipath- candidate, installed, best
Last update: Tue Feb 23 03:13:14 2016
1
47.47.47.1 from 47.47.47.1 (62.57.1.1)
Origin IGP, metric 0, localpref 100, valid, external, multipath-
candidate, installed
Last update: Tue Feb 23 03:13:15 2016
 
R2#show ip bgp summary
BGP router identifier 192.168.52.3, local AS number 2 BGP table version is 2
2 BGP AS-PATH entries
 
0 BGP community entries
8 Configured ebgp ECMP multipath: Currently set at 8
1 Configured ibgp ECMP multipath: Currently set at 1
1 Configured eibgp ECMP multipath: Currently set at 1
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/ Down State/PfxRcd
33.33.33.3
00:01:10 1
47.47.47.1
00:06:33 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
R2#show ip bgp
BGP table version is 2, local router ID is 192.168.52.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
l - labeled, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
*> 100.1.1.0/24 47.47.47.1 0 100 0 1 i
* 33.33.33.3 0 100 0 3 i
 
Total number of prefixes 1
Last modified date: 10/16/2023