BGP ECMP is not working in my scenario

Hi Team,

I am trying to setup BGP ECMP in my test scenario before implementing it in production scenario. I really failed to understand why ECMP is not being setup in my scenario? Can someone pls help? Here is my scenario and config

R1 Config

set interfaces ethernet eth0 address '10.10.20.10/24'
set interfaces ethernet eth0 hw-id '00:0c:29:d4:6e:9e'
set interfaces ethernet eth1 address '10.10.30.10/24'
set interfaces ethernet eth1 hw-id '00:0c:29:d4:6e:a8'
set interfaces ethernet eth2 address '10.10.40.10/24'
set interfaces ethernet eth2 hw-id '00:0c:29:d4:6e:b2'
set interfaces ethernet eth3 address '10.44.44.10/24'
set interfaces ethernet eth3 hw-id '00:0c:29:d4:6e:bc'
set interfaces loopback lo
set policy route-map AS65004 rule 10 action 'permit'
set policy route-map AS65004 rule 10 set as-path-prepend '65004'
set protocols bgp 65001 address-family ipv4-unicast maximum-paths ebgp '3'
set protocols bgp 65001 address-family ipv4-unicast network 10.44.44.0/24
set protocols bgp 65001 neighbor 10.10.20.20 remote-as '65002'
set protocols bgp 65001 neighbor 10.10.20.20 update-source '10.10.20.10'
set protocols bgp 65001 neighbor 10.10.30.20 remote-as '65003'
set protocols bgp 65001 neighbor 10.10.30.20 update-source '10.10.30.10'
set protocols bgp 65001 neighbor 10.10.40.20 remote-as '65005'
set protocols bgp 65001 neighbor 10.10.40.20 update-source '10.10.40.10'

R2 Config

set interfaces ethernet eth0 address '10.10.20.20/24'
set interfaces ethernet eth0 hw-id '00:0c:29:1a:64:0f'
set interfaces ethernet eth1 address '192.168.20.20/24'
set interfaces ethernet eth1 hw-id '00:0c:29:1a:64:19'
set interfaces loopback lo
set protocols bgp 65002 neighbor 10.10.20.10 remote-as '65001'
set protocols bgp 65002 neighbor 10.10.20.10 update-source '10.10.20.20'
set protocols bgp 65002 neighbor 192.168.20.10 remote-as '65004'
set protocols bgp 65002 neighbor 192.168.20.10 update-source '192.168.20.20'

R3 Config

set interfaces ethernet eth0 address '10.10.30.20/24'
set interfaces ethernet eth0 hw-id '00:0c:29:b5:16:c7'
set interfaces ethernet eth1 address '192.168.30.20/24'
set interfaces ethernet eth1 hw-id '00:0c:29:b5:16:d1'
set interfaces loopback lo
set protocols bgp 65003 neighbor 10.10.30.10 remote-as '65001'
set protocols bgp 65003 neighbor 10.10.30.10 update-source '10.10.30.20'
set protocols bgp 65003 neighbor 192.168.30.10 remote-as '65004'
set protocols bgp 65003 neighbor 192.168.30.10 update-source '192.168.30.20'

R4 config

set interfaces ethernet eth0 address '10.10.40.20/24'
set interfaces ethernet eth0 hw-id '00:0c:29:ef:bb:2c'
set interfaces ethernet eth1 address '192.168.40.20/24'
set interfaces ethernet eth1 hw-id '00:0c:29:ef:bb:36'
set interfaces loopback lo
set protocols bgp 65005 neighbor 10.10.40.10 remote-as '65001'
set protocols bgp 65005 neighbor 10.10.40.10 update-source '10.10.40.20'
set protocols bgp 65005 neighbor 192.168.40.10 remote-as '65004'
set protocols bgp 65005 neighbor 192.168.40.10 update-source '192.168.40.20'

R5 Config

set interfaces ethernet eth0 address '192.168.20.10/24'
set interfaces ethernet eth0 hw-id '00:0c:29:e3:b7:c7'
set interfaces ethernet eth1 address '192.168.30.10/24'
set interfaces ethernet eth1 hw-id '00:0c:29:e3:b7:d1'
set interfaces ethernet eth2 address '192.168.40.10/24'
set interfaces ethernet eth2 hw-id '00:0c:29:e3:b7:db'
set interfaces ethernet eth3 address '172.28.7.10/24'
set interfaces ethernet eth3 hw-id '00:0c:29:e3:b7:e5'
set interfaces loopback lo
set policy route-map AS65001 rule 10 action 'permit'
set policy route-map AS65001 rule 10 set as-path-prepend '65001'
set protocols bgp 65004 address-family ipv4-unicast maximum-paths ebgp '3'
set protocols bgp 65004 address-family ipv4-unicast network 172.28.7.0/24
set protocols bgp 65004 neighbor 192.168.20.20 remote-as '65002'
set protocols bgp 65004 neighbor 192.168.20.20 update-source '192.168.20.10'
set protocols bgp 65004 neighbor 192.168.30.20 remote-as '65003'
set protocols bgp 65004 neighbor 192.168.30.20 update-source '192.168.30.10'
set protocols bgp 65004 neighbor 192.168.40.20 remote-as '65005'
set protocols bgp 65004 neighbor 192.168.40.20 update-source '192.168.40.10'

R1 Routing Table


   vyos@R1# run show ip bgp
BGP table version is 3, local router ID is 10.44.44.10, vrf id 0
Default local pref 100, local AS 65001
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.44.44.0/24    0.0.0.0                  0         32768 i
*  172.28.7.0/24    10.10.40.20                            0 65005 65004 i
*                   10.10.30.20                            0 65003 65004 i
*>                  10.10.20.20                            0 65002 65004 i

R5 Routing Table

vyos@R5# run show ip bgp
BGP table version is 2, local router ID is 192.168.40.10, vrf id 0
Default local pref 100, local AS 65004
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  10.44.44.0/24    192.168.40.20                          0 65005 65001 i
*>                  192.168.20.20                          0 65002 65001 i
*                   192.168.30.20                          0 65003 65001 i
*> 172.28.7.0/24    0.0.0.0                  0         32768 i

**********************
vyos@R5# run show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

B>* 10.44.44.0/24 [20/0] via 192.168.20.20, eth0, weight 1, 02:21:41
C>* 172.28.7.0/24 is directly connected, eth3, 02:39:34
C>* 192.168.20.0/24 is directly connected, eth0, 02:34:18
C>* 192.168.30.0/24 is directly connected, eth1, 02:39:35
C>* 192.168.40.0/24 is directly connected, eth2, 02:39:34

Hi,

BGP route selection algorithm states:

Multi-path checkIf multi-pathing is enabled, then check whether the routes not yet distinguished in preference may be considered equal. If bgp bestpath as-path multipath-relax is set, all such routes are considered equal, otherwise routes received via iBGP with identical AS_PATHs or routes received from eBGP neighbours in the same AS are considered equal.

You should specify set protocols bgp ASN parameters bestpath as-path multipath-relax

1 Like

I guess I now started seeing Muti-path

On R1
set protocols bgp 65001 parameters bestpath as-path multipath-relax

On R5

set protocols bgp 65004 parameters bestpath as-path multipath-relax

However still on R1 and R5 I see best path selected

vyos@R5# run show ip bgp
BGP table version is 3, local router ID is 192.168.40.10, vrf id 0
Default local pref 100, local AS 65004
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*= 10.44.44.0/24    192.168.40.20                          0 65005 65001 i
*>                  192.168.20.20                          0 65002 65001 i
*=                  192.168.30.20                          0 65003 65001 i
*> 172.28.7.0/24    0.0.0.0                  0         32768 i

on R1

vyos@R1# run show ip bgp
BGP table version is 4, local router ID is 10.44.44.10, vrf id 0
Default local pref 100, local AS 65001
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.44.44.0/24    0.0.0.0                  0         32768 i
*= 172.28.7.0/24    10.10.40.20                            0 65005 65004 i
*=                  10.10.30.20                            0 65003 65004 i
*>                  10.10.20.20                            0 65002 65004 i

But with below version:

vyos@R3# run show v
version  vpn      vrrp     
[edit]
vyos@R1# run show version 
Version:      VyOS 1.1.8
Description:  VyOS 1.1.8 (helium)
Copyright:    2017 VyOS maintainers and contributors
Built by:     maintainers@vyos.net
Built on:     Sat Nov 11 13:44:36 UTC 2017
Build ID:     1711111344-b483efc
System type:  x86 64-bit
Boot via:     image
Hypervisor:   VMware
HW model:     VMware Virtual Platform
HW S/N:       VMware-56 4d 77 01 7d 9b e3 84-8b 1f 5c a5 af d4 93 3c
HW UUID:      564D7701-7D9B-E384-8B1F-5CA5AFD4933C
Uptime:       10:18:22 up 44 min,  1 user,  load average: 0.00, 0.01, 0.02

[edit]
vyos@R1# 

vyos@R1# set protocols bgp 65005 parameters bestpath as-path 
Possible completions:
   confed       Compare AS-path lengths including confederation sets & sequences
   ignore       Ignore AS-path length in selecting a route

      
[edit]

we can't get the option: multipath-relax.
is it not support at this version?

1.1.8 is outdated and not sure - Instead why not upgrade to 1.3 which is more stable

Yes, when switch to 1.3. the muti-path can be shown at the routing table.
But, it’s seem like not take effect. when i curl from a client to another side, but only one of the interface can be get the packet, another is nothing.
S>* 0.0.0.0/0 [210/0] via 192.168.2.1, eth0, weight 1, 06:04:15
C>* 192.168.2.0/24 is directly connected, eth0, 06:04:15
C>* 192.168.5.0/24 is directly connected, eth1, 05:58:37
B>* 192.168.8.0/24 [20/0] via 192.168.10.2, eth2, weight 1, 04:30:33

  •                   via 192.168.12.2, eth3, weight 1, 04:30:33
    

C>* 192.168.10.0/24 is directly connected, eth2, 05:58:37
C>* 192.168.12.0/24 is directly connected, eth3, 05:58:37
root@AR1:~#

is that something i missed?

when with different client, the ECMP can be shown as normal.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.