Route-Distinguisher (RD) allocation independent of Route-Target (RT)

Provisioning in EFA pre-2.5.0

EFA auto allocates VRF RT in the format xx:yy.

EFA auto allocates VRF RD in the format <router-id>:<lowest-yy-of-rt-in-a-given-vrf>.

If users have not provided explicit RT values, then EFA uniquely allocates the RT values for each VRF. Since RD allocation is based on the RT value, EFA uniquely allocates the RD value for each VRF.

But if users provide RT values (in the format xx:yy and yy is common across multiple VRFs), then the RD which is derived based on the yy (<router-id>:<lowest-yy-of-rt>), cannot be unique across the VRFs and hence results in the failure indicating multiple VRFs cannot have common RD.

efa tenant vrf create --tenant "ten1" --name "ten1vrf1" --routing-type "distributed" --rt-type export --rt 65010:1 --rt-type import --rt 65010:2 --max-path 8 --redistribute connected 

efa tenant vrf create --tenant "ten1" --name "ten1vrf2" --routing-type "distributed" --rt-type export --rt 65010:2 --rt-type import --rt 65010:1 --max-path 8 --redistribute connected 

efa tenant epg create --tenant "ten1" --name "ten1epg1" --type extension --switchport-mode trunk --single-homed-bfd-session-type auto --po ten1po1 --vrf ten1vrf1 --ctag-range 25 --l3-vni 32821 --anycast-ip 25:10.0.21.1/24 --ctag-description "25:Tenant L3 Extended VLAN" --l2-vni 25:32770 --suppress-arp 25:true --suppress-nd 25:false 

efa tenant epg create --tenant "ten1" --name "ten1epg2" --type extension --switchport-mode trunk --single-homed-bfd-session-type auto --po ten1po1 --vrf ten1vrf2 --ctag-range 26 --l3-vni 32823 --anycast-ip 26:11.0.21.1/24 --ctag-description "26:Tenant L3 Extended VLAN" --l2-vni 26:32771 --suppress-arp 26:true --suppress-nd 26:false 

Device: 10.20.246.15 
Network Policy Error: Vrf ten1vrf2 creation failed due to netconf rpc [error] '% Error: This RD is already configured for another VRF', 
Device: 10.20.246.16 
Network Policy Error: Vrf ten1vrf2  creation failed due to netconf rpc [error] '% Error: This RD is already configured for another VRF',

Provisioning in EFA 2.5.0 or above

EFA auto allocates VRF RT in the format xx:yy

EFA auto allocates VRF RD in the format <router-id>:<unique-number-per-vrf-independent-of-rt>

Since RD value has no relation to yy value of RT anymore, and since EFA auto allocates the unique-number-per-vrf which is appended to the router-id, the uniqueness of RD is always guaranteed.

efa tenant vrf create --tenant "ten1" --name "ten1vrf1" --routing-type "distributed" --rt-type export --rt 65010:1 --rt-type import --rt 65010:2 --max-path 8 --redistribute connected 

efa tenant vrf create --tenant "ten1" --name "ten1vrf2" --routing-type "distributed" --rt-type export --rt 65010:2 --rt-type import --rt 65010:1 --max-path 8 --redistribute connected 

efa tenant epg create --tenant "ten1" --name "ten1epg1" --type extension --switchport-mode trunk --single-homed-bfd-session-type auto --po ten1po1 --vrf ten1vrf1 --ctag-range 25 --l3-vni 32821 --anycast-ip 25:10.0.21.1/24 --ctag-description "25:Tenant L3 Extended VLAN" --l2-vni 25:32770 --suppress-arp 25:true --suppress-nd 25:false 

efa tenant epg create --tenant "ten1" --name "ten1epg2" --type extension --switchport-mode trunk --single-homed-bfd-session-type auto --po ten1po1 --vrf ten1vrf2 --ctag-range 26 --l3-vni 32823 --anycast-ip 26:11.0.21.1/24 --ctag-description "26:Tenant L3 Extended VLAN" --l2-vni 26:32771 --suppress-arp 26:true --suppress-nd 26:false

Switch Config in EFA 2.5.0 or above

Rack1-Device1# show running-config vrf
vrf ten1vrf1
rd 172.31.254.40:1
evpn irb ve 8192
address-family ipv4 unicast
  route-target export 65010:1 evpn
  route-target import 65010:2 evpn
!
address-family ipv6 unicast
  route-target export 65010:1 evpn
  route-target import 65010:2 evpn
!
!
vrf ten1vrf2
rd 172.31.254.40:2
evpn irb ve 8190
address-family ipv4 unicast
  route-target export 65010:2 evpn
  route-target import 65010:1 evpn
!
address-family ipv6 unicast
  route-target export 65010:2 evpn
  route-target import 65010:1 evpn
!
Rack1-Device2# show running-config vrf
vrf ten1vrf1
rd 172.31.254.209:1
evpn irb ve 8192
address-family ipv4 unicast
  route-target export 65010:1 evpn
  route-target import 65010:2 evpn
!
address-family ipv6 unicast
  route-target export 65010:1 evpn
  route-target import 65010:2 evpn
!
!
vrf ten1vrf2
rd 172.31.254.209:2
evpn irb ve 8190
address-family ipv4 unicast
  route-target export 65010:2 evpn
  route-target import 65010:1 evpn
!
address-family ipv6 unicast
  route-target export 65010:2 evpn
  route-target import 65010:1 evpn
!