Skip to content

Incorrect nexthop when importing a route with a different VNI (L2VNI or L3VNI) #14259

@vincentbernat

Description

@vincentbernat

Describe the bug

When importing several RT (different L3VNI for example) inside a VRF, the corresponding routes are installed with the nexthop of the L3VNI associated to the VRF instead of the nexthop of the VNI associated with the route.

  • Did you check if this is a duplicate issue?
  • Did you test it on the latest FRRouting/frr master branch?

This does not happen exactly on master because since b991a37, the route is considered inactive, but still with the wrong nexthop. This is fully reproducible with 8.5.2.

To Reproduce

Two hosts are directly connected to each other and establish a BGP session with L2VPN EVPN family only.

Host A:

vrf VRFA
 vni 80001
exit-vrf
!
vrf VRFB
 vni 80002
exit-vrf
!
router bgp 64600
 bgp router-id 1.1.1.1
 no bgp default ipv4-unicast
 bgp disable-ebgp-connected-route-check
 neighbor BGP peer-group
 neighbor BGP remote-as 64600
 neighbor 203.0.113.2 peer-group BGP
 !
 address-family ipv4 unicast
  neighbor BGP activate
  neighbor BGP soft-reconfiguration inbound
 exit-address-family
 !
 address-family l2vpn evpn
  neighbor BGP activate
  neighbor BGP soft-reconfiguration inbound
  advertise-all-vni
 exit-address-family
exit
!
router bgp 64600 vrf VRFA
 bgp router-id 1.1.1.1
 !
 address-family ipv4 unicast
  redistribute connected
 exit-address-family
 !
 address-family l2vpn evpn
  advertise ipv4 unicast
  route-target import 64600:80001
  route-target import 64600:80002
  route-target export 64600:80001
 exit-address-family
exit
!
router bgp 64600 vrf VRFB
 bgp router-id 1.1.1.1
 !
 address-family ipv4 unicast
  redistribute connected
 exit-address-family
 !
 address-family l2vpn evpn
  advertise ipv4 unicast
  route-target import 64600:80001
  route-target import 64600:80002
  route-target export 64600:80002
 exit-address-family
exit

Host B has the exact same configuration except the router ID and the neighbor address.

On host A, we have 192.0.2.46/28 in VRFA (containing a bridge with the address and a VXLAN interface enslaved). On host B, we have 192.0.2.62/28 in VRFB (containing a bridge with the address and a VXLAN interface enslaved). You can see the full setup here: https://github.com/vincentbernat/network-lab/blob/master/lab-frr-evpn-vrf/setup.

On host A, I see:

R1# show ip route vrf VRFA 192.0.2.48/28
Routing entry for 192.0.2.48/28
  Known via "bgp", distance 200, metric 0, vrf VRFA, best
  Last update 00:06:08 ago
  * 203.0.113.2, via bridgeA onlink, weight 1

I would have expected to use bridgeB as the nexthop, because 192.0.2.48/28 has VNI 80002:

R1# show ip bgp vrf VRFA 192.0.2.48/28
BGP routing table entry for 192.0.2.48/28, version 4
Paths: (1 available, best #1, vrf VRFA)
  Not advertised to any peer
  Imported from 1.1.1.2:3:[5]:[0]:[28]:[192.0.2.48], VNI 80002
  Local
    203.0.113.2(R2) from R2(203.0.113.2) (1.1.1.2) announce-nh-self
      Origin incomplete, metric 0, localpref 100, valid, internal, bestpath-from-AS Local, best (First path received
)
      Extended Community: RT:64600:80002 ET:8 Rmac:50:54:33:00:00:04
      Last update: Tue Aug 22 18:16:10 2023

This also happens for L2VNI (but I don't have a minimal reproduction). I am not sure if this is expected to work (but in this case, I don't see a use for import/export RT).

Versions

  • OS Version: Debian unstable
  • Kernel: 6.4.11
  • FRR Version: 8.5.2 (same with master but the route is "inactive")

cc @ton31337 (not the bug I talked about you, this one is gone in 8.5.1, so I didn't investigate).

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageNeeds further investigation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions