VXLAN Journey - Part 11 - Multi-Site VXLAN Anycast Border Gateway Mac-Vrf (L2VNI) extension
In part - 10 we have configured Ip-Vrf (l3vni) extension between our data-centers using anycast border-gateways. Now we will configure Mac-Vrf (l2vni) extesion between our data-centers.
What is multi-site? When we connect two different dc-fabrics (different BGP ASN) together with eBGP l2vpn-evpn - we call it vxlan multi-site extension.
What is l2vni extension? If vlan - A, under vrf - X, from Site - 1 can communicate over the border-gateways with vlan - A, under vrf - X from Site - 2; we call it l2vni/mac-vrf extension over multisite. The common thing in the extension is that communicating vlans are the same.
Our topology looks like below -
01 - Network Topology
We are going to extend l2vni - 10010 (vlan 101) so that Vlan-101-Pc-01 and Vlan-101-Pc-02 can communicate with each other using the border-gateways.
For Spine, Leaf and Border-Gateway configurations have a look in the previous blogs. We will only show new configurations required of l2vni extension over two different data-center fabrics. Also we are only showing the relevant Leaf switches which has an end-host relevant for our extension. Other Leaf switches are still there; they are not just relevant for this blog.
MAC-VRF/L2VNI Extension Configuration
Dc-01-Border-Gateway-03 & Dc-01-Border-Gateway-04 Configuration
!!! Associate l2vni with the vlan.
vlan 101
vn-segment 100101
!!! Allow l2vni under nve interface and enable BUM traffic forwarding.
interface nve1
member vni 100101
multisite ingress-replication
ingress-replication protocol bgp
!!! Generate RD and RT for l2vni.
evpn
vni 100101 l2
rd auto
route-target import auto
route-target export auto
Dc-02-Border-Gateway-03 & Dc-02-Border-Gateway-04 Configuration
!!! Associate l2vni with the vlan.
vlan 101
vn-segment 100101
!!! Allow l2vni under nve interface and enable BUM traffic forwarding.
interface nve1
member vni 100101
multisite ingress-replication
ingress-replication protocol bgp
!!! Generate RD and RT for l2vni.
evpn
vni 100101 l2
rd auto
route-target import auto
route-target export auto
Designated Forwarder and Route-Type 4
For l2vni's bum traffic forwarding anycast border-gateways introduce something new called designated forwarder (DF). For the election of designated forwarder needs a new evpn route-type - Route-Type 4 (Ethernet Segment Route).
Let's have a look at the route-type 4 originated by Dc-01-Border-Gateway-03 -
Dc-01-Border-Gateway-03# show bgp l2vpn evpn route-type 4
BGP routing table information for VRF default, address family L2VPN EVPN
Route Distinguisher: 10.81.0.3:27001 (ES [0300.00fa.56ea.0100.0309 0])
!!! [4] - route-type 4.
!!! [03] - ESI type mac based.
!!! [00.00fa.56ea.01] - ESI system mac for site-id and rt where fa.56ea.01 (4200000001 - BGP asn/site-id).
!!! [00.0309] - ESI local discriminator.
!!! [10.81.1.3] - Sender Bgw pip for DF election process.
BGP routing table entry for [4]:[0300.00fa.56ea.0100.0309]:[32]:[10.81.1.3]/136, version 8
Paths: (1 available, best #1)
Flags: (0x000002) (high32 00000000) on xmit-list, is not in l2rib/evpn
Advertised path-id 1
Path type: local, path is valid, is best path, no labeled nexthop, is extd
AS-Path: NONE, path locally originated
10.81.1.3 (metric 0) from 0.0.0.0 (10.81.0.3)
Origin IGP, MED not set, localpref 100, weight 32768
Extcommunity: ENCAP:8 RT:0000.fa56.ea01
Path-id 1 advertised to peers:
!!! Type-4 routes announced to site-internal Spines and site-external BGWs.
10.81.0.1 10.81.0.2 10.82.0.3 10.82.0.4
BGWs advertise type-4 routes to all site-internal and site-external BGP EVPN peers. But site-external peers will not import this route because the RT will not match. Our Dc-01 has type-4 RT - 0000.fa56.ea01 and Dc-02 has type-4 RT 0000.fa56.ea02. Site-internal border-gateways will use the pip address carried in the route for DF election.
What is a DF (designated forwarder) actually? DF is used for l2vni's BUM traffic forwarding between border-gateways. It is not used for unicast packet forwarding.
The DF election happens between site-internal BGWs only. For a single l2vni; only one of the site-internal BGWs will be DF and forward BUM traffic across multi-site. Other site-internal bgws (non-df) will not forward BUM traffic across sites. The DF selection algorithms is given below -
1. Each site-internal Bgw run it own individual DF selection algorithm.
2. From the type-4 routes a BGW switch creates a ordinal list by sorting the loopback 1 (pip) address from lowest to highest. For Dc-01 it looks like below -
Dc-01-Border-Gateway-03 loopback 1 - 10.81.1.3
Dc-01-Border-Gateway-03 loopback 1 - 10.81.1.4
The ordinal list - 10.81.1.3, 10.81.1.4 {I=0, I=1}
3. Do a modulus operation - vlan_id % number_of_site-internal_bgws. For vlan 101 it will be like - 101 % 2 = 1. This result of modulus operation is the value of I.
4. The site-internal bgw which "I" value matches the result of modulus operation will be the DF for that vlan/l2vni. For example, Dc-01-Border-Gateway-04 (10.81.1.4, I=1) will be the DF for vlan 101/l2vni 100101.
We can verify which Bgw is the DF for a vlan/l2vni by typing below command -
Dc-01-Border-Gateway-04# show nve ethernet-segment
!!! ESI of Dc-01-Border-Gateway-04.
ESI: 0300.00fa.56ea.0100.0309
Parent interface: nve1
ES State: Up
Port-channel state: N/A
NVE Interface: nve1
NVE State: Up
Host Learning Mode: control-plane
Active Vlans: 1,100-101
!!! For which vlans Dc-01-Border-Gateway-04 is the DF.
DF Vlans: 1,101
Active VNIs: 100000,100101
DF BDs:
DF VNIs:
CC failed for VLANs:
VLAN CC timer: no-timer
Number of ES members: 2
My ordinal: 1
DF timer start time: 00:00:00
DF timer expiry: 07:21:17
Config State: N/A
!!! Site-local Bgws loopback 1 address used in DF selection algorithm.
DF List: 10.81.1.3 10.81.1.4
ES route added to L2RIB: True
EAD/ES routes added to L2RIB: False
EAD/EVI route timer age: not running
EAD/EVI timer duration: N/A
ESI type: Ether-segment
!!! DF is elected using modulus algorithm.
ESI DF election mode: Modulo
The bum traffic from the originating site-local leaf is forwarded like below -
02 - BUM traffic forwarding from site-local vtep to site-remote vtep
An originating site-local vtep has no knowledge about who is the DF-Bgw in the local site. It will forward the packet to all the site-local Bgws PIP (route-type 3 - IMET). Then site-local bgw who is DF only forwards the packets to remote-bgws. Other site-local bgws who received the packet; they silently discards the packet. The same process is repeated when the bum packet is received by remote-site's bgws. Only the border-gateways that are DF - forwards the bum packets. We are sending duplicate bum packets to the border-gateways which are discarded by the non-df bgws. We can optimize this behavior to some extend if we are using ARP-Suppression.
L2VNI extension verification
Vlan-101-Pc-01 (10.91.101.11/50:da:22:00:39:00) is connected with Dc-01-Leaf-07 and Dc-01-Leaf-08 using a vpc port-channel. And Vlan-101-Pc-02 (10.91.102.12/50:1e:d1:00:3a:00) is connected with Dc-02-Leaf-06.
Let's have a look at the relevant route-types for Vlan-101-Pc-02 form a site-local Bgw -
!!! Displaying routes with Vlan-101-Pc-02's mac-address.
Dc-02-Border-Gateway-04# show bgp l2vpn evpn 50:1e:d1:00:3a:00
BGP routing table information for VRF default, address family L2VPN EVPN
!!! Installed route in local rib type-2 mac.
Route Distinguisher: 10.82.0.4:32868 (L2VNI 100101)
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[0]:[0.0.0.0]/216, version 311
Paths: (1 available, best #1)
Flags: (0x000212) (high32 0x000400) on xmit-list, is in l2rib/evpn, is not in HW
Advertised path-id 1
Path type: internal, path is valid, is best path, no labeled nexthop, in rib
Imported from 10.82.0.6:32868:[2]:[0]:[0]:[48]:[501e.d100.3a00]:[0]:[0.0.0.0]/216
AS-Path: NONE, path sourced internal to AS
10.82.1.6 (metric 81) from 10.82.0.1 (10.82.0.1)
Origin IGP, MED not set, localpref 100, weight 0
Received label 100101
Extcommunity: RT:23456:100101 ENCAP:8
Originator: 10.82.0.6 Cluster list: 10.82.0.1
Path-id 1 (dual) advertised to peers:
!!! Announcing to routes to site-remote bgws.
10.81.0.3 10.81.0.4
!!! Installed route in local rib type-2 mac+ip.
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272, version 314
Paths: (1 available, best #1)
Flags: (0x000212) (high32 0x000400) on xmit-list, is in l2rib/evpn, is not in HW
Advertised path-id 1
Path type: internal, path is valid, is best path, no labeled nexthop, in rib
Imported from 10.82.0.6:32868:[2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272
AS-Path: NONE, path sourced internal to AS
10.82.1.6 (metric 81) from 10.82.0.1 (10.82.0.1)
Origin IGP, MED not set, localpref 100, weight 0
Received label 100101 100000
Extcommunity: RT:23456:100000 RT:23456:100101 ENCAP:8 Router MAC:5000.3300.1b08
Originator: 10.82.0.6 Cluster list: 10.82.0.1
Path-id 1 (dual) advertised to peers:
!!! Announcing to routes to site-remote bgws.
10.81.0.3 10.81.0.4
Route Distinguisher: 10.82.0.6:32868
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[0]:[0.0.0.0]/216, version 310
Paths: (2 available, best #1)
Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
Advertised path-id 1
!!! type-2 mac originated from Dc-02-Leaf-06 reflected by Dc-02-Spine-01.
Path type: internal, path is valid, is best path, no labeled nexthop
Imported to 1 destination(s)
Imported paths list: L2-100101
AS-Path: NONE, path sourced internal to AS
10.82.1.6 (metric 81) from 10.82.0.1 (10.82.0.1)
Origin IGP, MED not set, localpref 100, weight 0
Received label 100101
Extcommunity: RT:23456:100101 ENCAP:8
Originator: 10.82.0.6 Cluster list: 10.82.0.1
!!! type-2 mac originated from Dc-02-Leaf-06 reflected by Dc-02-Spine-02.
Path type: internal, path is valid, not best reason: Neighbor Address, no labeled nexthop
AS-Path: NONE, path sourced internal to AS
10.82.1.6 (metric 81) from 10.82.0.2 (10.82.0.2)
Origin IGP, MED not set, localpref 100, weight 0
Received label 100101
Extcommunity: RT:23456:100101 ENCAP:8
Originator: 10.82.0.6 Cluster list: 10.82.0.2
Path-id 1 not advertised to any peer
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272, version 315
Paths: (2 available, best #2)
Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
Path type: internal, path is valid, not best reason: Neighbor Address, no labeled nexthop
!!! type-2 mac+ip originated from Dc-02-Leaf-06 reflected by Dc-02-Spine-02.
AS-Path: NONE, path sourced internal to AS
10.82.1.6 (metric 81) from 10.82.0.2 (10.82.0.2)
Origin IGP, MED not set, localpref 100, weight 0
Received label 100101 100000
Extcommunity: RT:23456:100000 RT:23456:100101 ENCAP:8 Router MAC:5000.3300.1b08
Originator: 10.82.0.6 Cluster list: 10.82.0.2
Advertised path-id 1
!!! type-2 mac+ip originated from Dc-02-Leaf-06 reflected by Dc-02-Spine-01.
Path type: internal, path is valid, is best path, no labeled nexthop
Imported to 3 destination(s)
Imported paths list: Vrf_Blue L2-100101 L3-100000
AS-Path: NONE, path sourced internal to AS
10.82.1.6 (metric 81) from 10.82.0.1 (10.82.0.1)
Origin IGP, MED not set, localpref 100, weight 0
Received label 100101 100000
Extcommunity: RT:23456:100000 RT:23456:100101 ENCAP:8 Router MAC:5000.3300.1b08
Originator: 10.82.0.6 Cluster list: 10.82.0.1
Path-id 1 not advertised to any peer
From above output we can see that because of l2vni extension site-local bgws are now announcing both type2 routes (mac and mac+ip) towards the site-remote border-gateways.
We can verify the same route now in remote-site's bgw -
!!! Displaying routes with Vlan-101-Pc-02's mac-address.
Dc-01-Border-Gateway-04# show bgp l2vpn evpn 50:1e:d1:00:3a:00
BGP routing table information for VRF default, address family L2VPN EVPN
!!! Originating site's dual-rd.
Route Distinguisher: 59906:100101
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[0]:[0.0.0.0]/216, version 458
Paths: (2 available, best #1)
Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
Advertised path-id 1
!!! type-2 mac route announced by Dc-02-Border-Gateway-03.
Path type: external, path is valid, is best path, no labeled nexthop
Imported to 1 destination(s)
Imported paths list: L2-100101
AS-Path: 4200000002 , path sourced external to AS
10.83.100.2 (metric 0) from 10.82.0.3 (10.82.0.3)
Origin IGP, MED 2000, localpref 100, weight 0
Received label 100101
Extcommunity: RT:23456:100101 ENCAP:8 Site-ID:0:4200000002
!!! type-2 mac route announced by Dc-02-Border-Gateway-04.
Path type: external, path is valid, not best reason: newer EBGP path, no labeled nexthop
AS-Path: 4200000002 , path sourced external to AS
10.83.100.2 (metric 0) from 10.82.0.4 (10.82.0.4)
Origin IGP, MED 2000, localpref 100, weight 0
Received label 100101
Extcommunity: RT:23456:100101 ENCAP:8 Site-ID:0:4200000002
Path-id 1 not advertised to any peer
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272, version 452
Paths: (2 available, best #2)
Flags: (0x000202) (high32 00000000) on xmit-list, is not in l2rib/evpn, is not in HW
!!! type-2 mac+ip route announced by Dc-02-Border-Gateway-03.
Path type: external, path is valid, not best reason: newer EBGP path, no labeled nexthop
AS-Path: 4200000002 , path sourced external to AS
10.83.100.2 (metric 0) from 10.82.0.3 (10.82.0.3)
Origin IGP, MED 2000, localpref 100, weight 0
Received label 100101 100000
Extcommunity: RT:23456:100000 RT:23456:100101 ENCAP:8 Site-ID:0:4200000002
Router MAC:0200.0a53.6402
Advertised path-id 1
!!! type-2 mac+ip route announced by Dc-02-Border-Gateway-04.
Path type: external, path is valid, is best path, no labeled nexthop
Imported to 3 destination(s)
Imported paths list: Vrf_Blue L2-100101 L3-100000
AS-Path: 4200000002 , path sourced external to AS
10.83.100.2 (metric 0) from 10.82.0.4 (10.82.0.4)
Origin IGP, MED 2000, localpref 100, weight 0
Received label 100101 100000
Extcommunity: RT:23456:100000 RT:23456:100101 ENCAP:8 Site-ID:0:4200000002
Router MAC:0200.0a53.6402
Path-id 1 not advertised to any peer
!!! type-2 mac route installed in local-rib and announced to the spines.
Route Distinguisher: 10.81.0.4:32868 (L2VNI 100101)
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[0]:[0.0.0.0]/216, version 457
Paths: (1 available, best #1)
Flags: (0x000212) (high32 0x000400) on xmit-list, is in l2rib/evpn, is not in HW
Advertised path-id 1
Path type: external, path is valid, is best path, no labeled nexthop, in rib
Imported from 59906:100101:[2]:[0]:[0]:[48]:[501e.d100.3a00]:[0]:[0.0.0.0]/216
AS-Path: 4200000002 , path sourced external to AS
10.83.100.2 (metric 0) from 10.82.0.3 (10.82.0.3)
Origin IGP, MED 2000, localpref 100, weight 0
Received label 100101
Extcommunity: RT:23456:100101 ENCAP:8 Site-ID:0:4200000002
Path-id 1 (dual) advertised to peers:
10.81.0.1 10.81.0.2
!!! type-2 mac+ip route installed in local-rib and announced to the spines.
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272, version 451
Paths: (1 available, best #1)
Flags: (0x000212) (high32 0x000400) on xmit-list, is in l2rib/evpn, is not in HW
Advertised path-id 1
Path type: external, path is valid, is best path, no labeled nexthop, in rib
Imported from 59906:100101:[2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272
AS-Path: 4200000002 , path sourced external to AS
10.83.100.2 (metric 0) from 10.82.0.4 (10.82.0.4)
Origin IGP, MED 2000, localpref 100, weight 0
Received label 100101 100000
Extcommunity: RT:23456:100000 RT:23456:100101 ENCAP:8 Site-ID:0:4200000002
Router MAC:0200.0a53.6402
Path-id 1 (dual) advertised to peers:
10.81.0.1 10.81.0.2
Route Distinguisher: 10.81.0.4:4 (L3VNI 100000)
BGP routing table entry for [2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272, version 450
Paths: (1 available, best #1)
Flags: (0x000202) (high32 0x000400) on xmit-list, is not in l2rib/evpn, is not in HW
Advertised path-id 1
Path type: external, path is valid, is best path, no labeled nexthop
Imported from 59906:100101:[2]:[0]:[0]:[48]:[501e.d100.3a00]:[32]:[10.91.101.12]/272
AS-Path: 4200000002 , path sourced external to AS
10.83.100.2 (metric 0) from 10.82.0.4 (10.82.0.4)
Origin IGP, MED 2000, localpref 100, weight 0
Received label 100101 100000
Extcommunity: RT:23456:100000 RT:23456:100101 ENCAP:8 Site-ID:0:4200000002
Router MAC:0200.0a53.6402
Path-id 1 (dual) not advertised to any peer
As l2vpn-evpn routes are advertised properly, we can verify them in mac-address table and vrf's routing table.
Dc-02-Border-Gateway-04# show mac address-table vlan 101
Legend:
* - primary entry, G - Gateway MAC, (R) - Routed MAC, O - Overlay MAC
age - seconds since last seen,+ - primary entry using vPC Peer-Link,
(T) - True, (F) - False, C - ControlPlane MAC, ~ - vsan,
(NA)- Not Applicable A - ESI Active Path, S - ESI Standby Path
TL - True Learned, PS - Peer Sync, RO - Re-originate
VLAN MAC Address Type age Secure NTFY Ports
---------+-----------------+--------+---------+------+----+------------------
!!! Vlan-101-Pc-02 mac-address leaned from site-local leaf.
C 101 501e.d100.3a00 dynamic NA F F nve1(10.82.1.6)
!!! Vlan-101-Pc-01 mac-address leaned from site-remote bgw.
C 101 50da.2200.3900 dynamic NA F F nve1(10.83.100.1)
Dc-02-Border-Gateway-04# show ip route 10.91.101.11 vrf Vrf_Blue
IP Route Table for VRF "Vrf_Blue"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
!!! Vlan-101-Pc-01 ip-address installed in routing table with next-hop site-remote bgw's loopback 100 (vip).
10.91.101.11/32, ubest/mbest: 1/0
*via 10.83.100.1%default, [20/2000], 1d01h, bgp-4200000002, external, tag 4200000001, segid: 100000 tunnelid: 0xa536
401 encap: VXLAN
Dc-02-Border-Gateway-04# show ip route 10.91.101.12 vrf Vrf_Blue
IP Route Table for VRF "Vrf_Blue"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
!!! Vlan-101-Pc-02 ip-address installed in routing table with next-hop site-local leaf's loopback 1.
10.91.101.12/32, ubest/mbest: 1/0
*via 10.82.1.6%default, [200/0], 00:40:52, bgp-4200000002, internal, tag 4200000002, segid: 100000 tunnelid: 0xa5201
06 encap: VXLAN
We can now ping across our data-centers between vlan 101 endpoints.
!!! Ping between Vlan-101-Pc-02 and Vlan-101-Pc-01.
Vlan-101-Pc-02:~# ping -c 5 10.91.101.11
PING 10.91.101.11 (10.91.101.11) 56(84) bytes of data.
64 bytes from 10.91.101.11: icmp_seq=1 ttl=64 time=16.0 ms
64 bytes from 10.91.101.11: icmp_seq=2 ttl=64 time=12.9 ms
64 bytes from 10.91.101.11: icmp_seq=3 ttl=64 time=12.5 ms
64 bytes from 10.91.101.11: icmp_seq=4 ttl=64 time=13.1 ms
64 bytes from 10.91.101.11: icmp_seq=5 ttl=64 time=11.9 ms
--- 10.91.101.11 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
I will not do a detail packet walkthrough for l2vni extension in multisite. It follows the same principle of l2vni packet forwarding in a single site. Just remember - for bridged packets - the inner mac-address of the vxlan encapsulated packet will be the original host's mac-address; they will not be replaced by rmac. Also bgw's will use their PIP (loopback 1) as the source address of the packet. A packet capture taken from Dc-02-Border-Gateway-04 is given below -
03 - L2VNI packet-capture in Bgw
That's it for today. At present our bgws are announcing their routes using their vip (shared loopback 100) as next-hop address. We will change this behavior over dci-links so that BGWs announce the l2vpn-evpn routes using their PIP (loopback 1) as next-hop for type-2 and type-5 routes in part - 12.



Comments
Post a Comment