FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.19k stars 1.23k forks source link

Inconsistency in auto-derived RT value of EVPN show commands. #5605

Open rohitgeek opened 4 years ago

rohitgeek commented 4 years ago

FRR version: 7.0 Topology: [R1]----ebgp----[R2]

For an RT-5 prefix received from an EBGP peer, FRR shows different RT values in the output of different commands. R1 is the advertising prefix 10.1.1.1 to router R2(which has 3 tenant VRFs.) Please refer below outputs for more details:

"sh bgp l2vpn evpn vni" shows that vrf RED imports prefixes with RT value 300:100

R2# sh bgp l2vpn evpn vni                                                  
Advertise Gateway Macip: Disabled
Advertise All VNI flag: Enabled
BUM flooding: Head-end replication
Number of L2 VNIs: 0
Number of L3 VNIs: 3
Flags: * - Kernel
  VNI        Type RD                    Import RT                 Export RT                 Tenant VRF
* 300        L3   24.4.0.1:2            300:300                   300:300                  GREEN
* 200        L3   24.0.0.1:3            300:200                   300:200                  BLUE
* 100        L3   23.0.0.1:4            300:100                   300:100                  RED
R2#

"sh bgp l2vpn evpn vrf-import-rt" shows that vrf RED imports prefixes with RT value 0:100

R2# sh bgp l2vpn evpn vrf-import-rt
Route-target: 0:100                                                             
List of VRFs importing routes with this route-target:
  RED
Route-target: 0:200
List of VRFs importing routes with this route-target:
  BLUE
Route-target: 0:300
List of VRFs importing routes with this route-target:
  GREEN
R2#

"sh bgp l2vpn evpn 10.1.1.1" shows that prefix 10.1.1.1 is received from peer router with RT value 100:100, yet it's imported in vrf RED.

R2# sh bgp l2vpn evpn 10.1.1.1
BGP routing table entry for 11.0.0.2:2:[5]:[0]:[32]:[10.1.1.1]
Paths: (1 available, best #1)
  Advertised to non peer-group peers:
  12.0.0.2
  Route [5]:[0]:[32]:[10.1.1.1] VNI 100
  100
    120.0.0.2 from 12.0.0.2 (12.0.0.2)
      Origin incomplete, metric 0, Default local pref 100, valid, external, best
      Extended Community: RT:100:100 ET:8 Rmac:62:e1:05:9c:fa:b4                
      Last update: Mon Nov 25 22:56:31 2019
R2# 

To summarise this issue, R2 receives prefix 10.1.1.1 with RT value 100:100, VNI 100 is mapped to RT value 300:100, and evpn vrf-import-rt value shows 0:100. Yet the prefix is installed in tenant vrf on R2.

Please let me know if you need any further information from my end.

Regards,

chiragshah6 commented 4 years ago

@rohitgeek Auto-derived RT is derived from AS:VNI-ID. In the above outputs import RT is relevant as *:VNI-ID.The evpn routes with any aspath and tenant vni-id configured on the VTEP. In your case tenant vni id 100 is configured which matches to the prefix route 10.1.1.1 extended community Route-target value 100.

It is more of show command issue where it can be displayed (interpreted) as *:VNI-ID.

rohitgeek commented 4 years ago

@chiragshah6 : I agree with you. We may show "*" symbol for import RT(auto) values. For example:

FRR# sh bgp l2vpn evpn vni                                                  
Advertise Gateway Macip: Disabled
Advertise All VNI flag: Enabled
BUM flooding: Head-end replication
Number of L2 VNIs: 0
Number of L3 VNIs: 3
Flags: * - Kernel
  VNI        Type RD                    Import RT                 Export RT                 Tenant VRF
* 300        L3   24.4.0.1:2              *:300                   300:300                  GREEN
* 200        L3   24.0.0.1:3              *:200                   300:200                  BLUE
* 100        L3   23.0.0.1:4              *:100                   300:100                  RED
FRR#

---------

FRR# sh bgp l2vpn evpn vrf-import-rt
Route-target: *:100                                                             
List of VRFs importing routes with this route-target:
  RED
Route-target: *:200
List of VRFs importing routes with this route-target:
  BLUE
Route-target: *:300
List of VRFs importing routes with this route-target:
  GREEN
FRR#
chiragshah6 commented 4 years ago

@rohitgeek If you or folks at vmware has bandwidth to take up the work, I am fine with it. Just to note Flags: * - Kernel might need a second look when * is added for the import RTs.

Tagging @srimohans as well on it for evpn item.

Darwin4053 commented 2 weeks ago

Is this issue still open or closed?

ton31337 commented 2 weeks ago

I see it's still open (minor, just for visibility).