Page MenuHomeVyOS Platform

bgp: EVPN route-target not honored
Closed, ResolvedPublicBUG

Description

The set route target does not seem to be used.

Sample config that will reproduce this behavior:

set interfaces bridge br0 enable-vlan
set interfaces bridge br0 member interface eth1.70
set interfaces bridge br0 member interface vxlan1
set interfaces dummy dum0 address '1.1.1.1/32'
set interfaces dummy dum2 address '10.0.255.1/32'
set interfaces ethernet eth1 address '192.168.10.2/31'
set interfaces ethernet eth1 vif 70
set interfaces ethernet eth2 address 'dhcp'
set interfaces loopback lo address '172.16.1.1/32'
set interfaces vxlan vxlan1 ip enable-arp-accept
set interfaces vxlan vxlan1 ip enable-arp-announce
set interfaces vxlan vxlan1 port '4789'
set interfaces vxlan vxlan1 source-address '10.0.255.1'
set interfaces vxlan vxlan1 source-interface 'dum2'
set interfaces vxlan vxlan1 vni '100070'
set protocols bgp address-family ipv4-unicast network 1.1.1.0/24
set protocols bgp address-family ipv4-unicast network 10.0.255.1/32
set protocols bgp address-family l2vpn-evpn advertise ipv4 unicast
set protocols bgp address-family l2vpn-evpn advertise-all-vni
set protocols bgp address-family l2vpn-evpn flooding
set protocols bgp address-family l2vpn-evpn vni 100070 advertise-default-gw
set protocols bgp address-family l2vpn-evpn vni 100070 rd '64999:100070'
set protocols bgp address-family l2vpn-evpn vni 100070 route-target both 70:100070
set protocols bgp neighbor 2.2.2.2 address-family l2vpn-evpn
set protocols bgp neighbor 2.2.2.2 bfd
set protocols bgp neighbor 2.2.2.2 ebgp-multihop '3'
set protocols bgp neighbor 2.2.2.2 remote-as '65001'
set protocols bgp neighbor 2.2.2.2 update-source '1.1.1.1'
set protocols bgp neighbor 192.168.10.3 address-family ipv4-unicast
set protocols bgp neighbor 192.168.10.3 bfd
set protocols bgp neighbor 192.168.10.3 remote-as '65001'
set protocols bgp system-as '65000'

The expected route-target would be 70:100070. But the real route-target is 15645:100070

vyos@vyos:~$ show bgp l2vpn evpn
BGP table version is 2, local router ID is 172.16.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
EVPN type-1 prefix: [1]:[EthTag]:[ESI]:[IPlen]:[VTEP-IP]:[Frag-id]
EVPN type-2 prefix: [2]:[EthTag]:[MAClen]:[MAC]:[IPlen]:[IP]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-4 prefix: [4]:[ESI]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[EthTag]:[IPlen]:[IP]

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 64999:100070
*> [3]:[0]:[32]:[10.0.255.1]
                    10.0.255.1                         32768 i
                    ET:8 RT:15645:100070

Displayed 1 out of 1 total prefixes

VyOS version info:

vyos@vyos:~$ sh ver
Version:          VyOS 1.4-rolling-202302080317
Release train:    current

Built by:         [email protected]
Built on:         Wed 08 Feb 2023 03:17 UTC
Build UUID:       ce4d9361-2f83-44a1-88f4-488f1aa20f02
Build commit ID:  8cade9112a16ed

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    4773b4b6-6bb8-46aa-85b9-4e4cf6d533ad

Copyright:        VyOS maintainers and contributors
vyos@vyos:~$

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.4-rolling-202302080317
Why the issue appeared?
Design mistake
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)

Event Timeline

set protocols bgp address-family l2vpn-evpn vni 100070 route-target both 70:100070

Should return an error, as this is not implemented.

Everything works as expected when route-target import/export 70:100070 is used!

c-po renamed this task from Route Target not honoured to bgp: EVPN route-target not honored.Apr 17 2023, 8:48 PM
c-po claimed this task.

Your CLI config is valid in general but FRR will refuse it with the error message: This command is only supported under EVPN VRF

I've seen this message a couple of times and it originates from a C macro #define EVPN_ENABLED(bgp) (bgp)->advertise_all_vni

So one must first enable advertise-all-vni before that command can be used

c-po changed the task status from Open to Needs testing.Apr 27 2023, 8:35 PM
c-po triaged this task as Normal priority.
c-po changed Difficulty level from Unknown (require assessment) to Normal (likely a few hours).
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.