5/21/2020

Arista EVPN VXLAN Configuration Example (2a) - Single-homing, L2 EVPN, Vlan-based

As of May 2020, the latest EOS 4.24.0F supports 2 types of L2 EVPN MAC-VRF:
  • Vlan-based
    • 1 VRF (1 RD): 1 VLAN
    • ESI = 0
  • Vlan-aware Bundled
    • 1 VRF (1 RD): n VLANs
    • ESI = VNI
Here is the configuration of Vlan-Based L2 EVPN

Explanations:
  •  Configure VLAN aka MAC-VRF under router BGP with RD/RT
  • "redistribute learned" is to advertised the learnt MAC under VLAN as type-2 routes to remote EVPN peers.
  • Under interface Vxlan 1, configure VNI values for above VLANs
Control Plane Checkup:

EVPN uses 2 types routes for L2EVPN, 1) type-3 IMET, 2) type-2 MAC-IP

1) IMET

snp261-eVtep1#show bgp evpn route-type imet vni 601 detail
BGP routing table information for VRF default
Router identifier 160.255.255.10, local AS number 65161
BGP routing table entry for imet 160.255.255.10, Route Distinguisher: 160.255.255.10:601
 Paths: 1 available
  Local
    - from - (0.0.0.0)
      Origin IGP, metric -, localpref -, weight 0, valid, local, best
      Extended Community: Route-Target-AS:65100:601 TunnelEncap:tunnelTypeVxlan
      VNI: 601
      PMSI Tunnel: Ingress Replication, MPLS Label: 601, Leaf Information Required: false, Tunnel ID: 160.255.255.10
BGP routing table entry for imet 160.255.255.20, Route Distinguisher: 160.255.255.20:601
 Paths: 1 available
  Local
    160.255.255.20 from 160.255.255.1 (180.255.255.1)
      Origin IGP, metric -, localpref 100, weight 0, valid, internal, best
      Originator: 160.255.255.20, Cluster list: 180.255.255.1
      Extended Community: Route-Target-AS:65100:601 TunnelEncap:tunnelTypeVxlan  << RT to control import
      VNI: 601  << VNI for this VLAN
      PMSI Tunnel: Ingress Replication, MPLS Label: 601, Leaf Information Required: false, Tunnel ID: 160.255.255.20 << VTEP ID

2) Flood-set, the above IMET prefix is used to form the flood-set

snp261-eV1.16:27:32#show vxlan flood vtep vlan 601
          VXLAN Flood VTEP Table
--------------------------------------------------------------------------------
VLANS                            Ip Address
-----------------------------   ------------------------------------------------
601                             160.255.255.20

snp261-eV1.16:23:04#show l2rib output floodset vlan 601
L2 RIB Output flood set:
Source: Local Dynamic, Local Static, BGP, VXLAN Static, VXLAN Dynamic
   Vlan              Address       Type            Destination
---------- -------------------- ---------- -------------------
    601       0000.0000.0000        All    VTEP 160.255.255.20

snp261-eV1.16:27:02#show l2rib input bgp floodset vlan 601
L2 RIB EVPN Input flood set:
   Vlan              Address       Type            Destination
---------- -------------------- ---------- -------------------
    601       0000.0000.0000        All    VTEP 160.255.255.20

3) Type-2 MAC-IP EVPN Route

snp261-eVtep1#show bgp evpn route-type mac-ip vni 601 detail
BGP routing table information for VRF default
Router identifier 160.255.255.10, local AS number 65161
BGP routing table entry for mac-ip 444c.a8a5.1140, Route Distinguisher: 160.255.255.10:601
 Paths: 1 available
  Local
    - from - (0.0.0.0)
      Origin IGP, metric -, localpref -, weight 0, valid, local, best
      Extended Community: Route-Target-AS:65100:601 TunnelEncap:tunnelTypeVxlan
      VNI: 601 ESI: 0000:0000:0000:0000:0000
BGP routing table entry for mac-ip 444c.a8a5.1141, Route Distinguisher: 160.255.255.20:601  << mac address
 Paths: 1 available
  Local
    160.255.255.20 from 160.255.255.1 (180.255.255.1)
      Origin IGP, metric -, localpref 100, weight 0, valid, internal, best
      Originator: 160.255.255.20, Cluster list: 180.255.255.1
      Extended Community: Route-Target-AS:65100:601 TunnelEncap:tunnelTypeVxlan << RT to control import
      VNI: 601 ESI: 0000:0000:0000:0000:0000 << VNI

4) MAC table vs EVPN prefixes

snp261-eV1.16:29:56#show mac address-table interface vxlan 1 vlan 601
          Mac Address Table
------------------------------------------------------------------

Vlan    Mac Address       Type        Ports      Moves   Last Move
----    -----------       ----        -----      -----   ---------
 601    444c.a8a5.1141    DYNAMIC     Vx1        1       4:53:10 ago

5) Clear MAC on remote VTEP to simulate MAC aging out

wa464-eVtep2#clear mac address-table dynamic vlan 601 << clear MAC

snp261-eVtep1#show bgp evpn route-type mac-ip vni 601 detail << NO evpn type-2 prefix
BGP routing table information for VRF default
Router identifier 160.255.255.10, local AS number 65161
BGP routing table entry for mac-ip 444c.a8a5.1140, Route Distinguisher: 160.255.255.10:601
 Paths: 1 available
  Local
    - from - (0.0.0.0)
      Origin IGP, metric -, localpref -, weight 0, valid, local, best
      Extended Community: Route-Target-AS:65100:601 TunnelEncap:tunnelTypeVxlan
      VNI: 601 ESI: 0000:0000:0000:0000:0000

snp261-eVtep1#show mac address-table interface vxlan 1 vlan 601 << no MAC entry
          Mac Address Table
------------------------------------------------------------------

Vlan    Mac Address       Type        Ports      Moves   Last Move
----    -----------       ----        -----      -----   ---------

Data Plane Checkup: 

host1 under VTEP1 ping host2 behind VTEP2

Host1#ping vrf EvpnHost1 160.60.1.201
PING 160.60.1.201 (160.60.1.201) 72(100) bytes of data.
80 bytes from 160.60.1.201: icmp_seq=1 ttl=64 time=0.135 ms
80 bytes from 160.60.1.201: icmp_seq=2 ttl=64 time=0.100 ms
80 bytes from 160.60.1.201: icmp_seq=3 ttl=64 time=0.092 ms
80 bytes from 160.60.1.201: icmp_seq=4 ttl=64 time=0.088 ms
80 bytes from 160.60.1.201: icmp_seq=5 ttl=64 time=0.089 ms

--- 160.60.1.201 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.088/0.100/0.135/0.021 ms, ipg/ewma 0.128/0.117 ms


VLAN-based: RD/RT vs VNI = 1:1

From the below output, the different VLANs have different RD and RT values, so 1:1 relationship. (In our case, only one host simulates multiple hosts under different VLANs).

snp261-eV1.18:18:45#sh bgp evpn route-type mac-ip vni 601 detail
BGP routing table entry for mac-ip 444c.a8a5.1141, Route Distinguisher: 160.255.255.20:601
 Paths: 1 available
  Local
    160.255.255.20 from 160.255.255.1 (180.255.255.1)
      Origin IGP, metric -, localpref 100, weight 0, valid, internal, best
      Originator: 160.255.255.20, Cluster list: 180.255.255.1
      Extended Community: Route-Target-AS:65100:601 TunnelEncap:tunnelTypeVxlan
      VNI: 601 ESI: 0000:0000:0000:0000:0000

snp261-eV1.18:18:49#sh bgp evpn route-type mac-ip vni 602 detail
BGP routing table entry for mac-ip 444c.a8a5.1141, Route Distinguisher: 160.255.255.20:602
 Paths: 1 available
  Local
    160.255.255.20 from 160.255.255.1 (180.255.255.1)
      Origin IGP, metric -, localpref 100, weight 0, valid, internal, best
      Originator: 160.255.255.20, Cluster list: 180.255.255.1
      Extended Community: Route-Target-AS:65100:602 TunnelEncap:tunnelTypeVxlan
      VNI: 602 ESI: 0000:0000:0000:0000:0000

No comments:

Post a Comment