01-03 Understanding VXLANs
01-03 Understanding VXLANs
01-03 Understanding VXLANs
Switches
Configuration Guide - VXLAN 3 Understanding VXLANs
3 Understanding VXLANs
VBDIF
BD
NVE
VNI
VTEP UDP 4789
IP IP2
Network
VNI VNI
L3 5020 5030
Packet Device3 Gateway
NVE
VAP2 VAP3
VX
LAN
VLAN 20 Untag
l
Tu
ne
n
n
ne
Tu
l
E
NV
N
L2
LA
l Gateway
unne
VX
A N T
Device1 VXL Device2
NVE vSwitch
vSwitch VM1 VM2 ... VMm
VM1 ... VMm Untag
192.168.10.2/24
VLAN 10 VLAN 20
192.168.10.1/24 192.168.20.1/24
Server1 Server2
Concept Description
Concept Description
Virtual access A VXLAN service access point that can be a Layer 2 sub-
point (VAP) interface or VLAN.
● If a Layer 2 sub-interface is used as a service access point, it
can have different encapsulation types configured to
transmit various types of data packets. After a Layer 2 sub-
interface is added to a BD, the sub-interface can transmit
data packets through this BD.
● If a VLAN is used as a service access point, it can be bound
to a BD for data packets in the VLAN to be transmitted
through this BD.
Traffic Description
Encapsulation
Type
Traffic Description
Encapsulation
Type
Traffic Description
Encapsulation
Type
NOTE
When a sub-interface that is configured with dot1q and QinQ receives double-tagged VLAN
packets, the QinQ sub-interface preferentially processes the packets. For example, if a dot1q
and QinQ sub-interface carries the VLAN ID of 10 for dot1q and outer VLAN ID of 10 and
inner VLAN ID of 20 for QinQ and receives a packet with the outer VLAN ID of 10 and inner
VLAN ID of 20, the QinQ sub-interface preferentially processes the packet. If a dot1q and
QinQ sub-interface carries the VLAN ID of 10 for dot1q and outer VLAN ID of 10 and inner
VLAN ID of 20 for QinQ and receives a packet with the outer VLAN ID of 10 and inner
VLAN ID of non-20, the dot1q sub-interface preferentially processes the packet.
VXLAN Flags
Reserved VNI Reserved
(00001000)
8 bits 24 bits 24 bits 8 bits
Outer UDP header ● DestPort: destination port number, which is 4789 for
UDP.
● Source Port: source port number, which is calculated
by performing the hash operation on the inner
packet.
Field Description
Outer Ethernet ● MAC DA: destination MAC address, which is the MAC
header address mapped to the next-hop IP address based on
the destination VTEP address in the routing table of
the VTEP on which the VM that sends packets
resides.
● MAC SA: source MAC address, which is the MAC
address of the VTEP on which the VM that sends
packet resides.
● 802.1Q Tag: VLAN tag carried in packets. This field is
optional.
● Ethernet Type: Ethernet packet type.
IPv4 over IPv4 The overlay network and As shown in Figure 3-3,
underlay network are the server IP and VTEP IP
both IPv4 networks. addresses are all IPv4
addresses.
IPv6 over IPv6 The overlay network and As shown in Figure 3-3,
underlay network are the server IP and VTEP IP
both IPv6 networks. addresses are all IPv6
addresses.
Device2
VTEP IP
el
VX
nn
LA
Tu
N
N
Tu
LA
VTEP IP VTEP IP
nn
VX
el
Device1 VXLAN Tunnel Device3
NVE
NOTE
VXLAN implementation principles are similar in the preceding combinations of underlay and
overlay networks. To make the description concise and clear, an IPv4 over IPv4 network is taken
as an example for subsequent descriptions. For other types of network combination, only the
implementation differences are described.
L2
Gateway
Leaf1 Leaf2
Spine1 Spine2
L3
Gateway
Leaf1 Leaf2
L2
Gateway
Inter-segment traffic
BGP network layer reachability information (NLRI), called the EVPN NLRI. The
EVPN NLRI defines new BGP EVPN routes to implement MAC address learning and
advertisement between different sites on a Layer 2 network.
VXLAN does not provide the control plane, and VTEP discovery and host
information (IP and MAC addresses, VNIs, and gateway VTEP IP address) learning
are implemented by traffic flooding on the data plane, resulting in high traffic
volumes on DC networks. To address this problem, VXLAN uses EVPN as the
control plane. EVPN allows VTEPs to exchange BGP EVPN routes to implement
automatic VTEP discovery and host information advertisement, preventing
unnecessary traffic flooding.
In summary, EVPN introduces several new types of BGP EVPN routes through BGP
extension for advertising VTEP addresses and host information. In this way, EVPN
applied to VXLAN networks enables VTEP discovery and host information learning
on the control plane instead of on the data plane.
Related Concepts
To help you better understand how EVPN works on a VXLAN network, the
following fundamental concepts are provided:
● Ethernet segment (ES): a set of Ethernet links that connect a VM to more
than one gateway NVE interfaces in an EVPN VXLAN scenario
● Ethernet segment identifier (ESI): an identifier that represents a unique ES
across a network
● EVPN instance (EVI): an instance whose name is the ID of the BD to which
the EVPN instance is bound on an EVPN VXLAN network
● Integrated routing and bridging (IRB): a type of route that carries VNIs, MAC
addresses, and IP addresses for transmitting Layer 2 and Layer 3 routing
information
● Designated forwarder (DF): a designated gateway that is elected for
forwarding BUM traffic to a VM in a VM multi-homing scenario
NOTE
Only the CE6881, CE6881K, CE6863K, CE6881E, and CE6863 support type 1 and type 4
routes.
After gateways establish BGP EVPN peer relationships, they exchange Ethernet A-
D routes to advertise their reachability to the MAC addresses of their connected
sites. Specifically, in EVPN ESI all-active scenarios, Ethernet A-D per ES routes are
used for fast convergence and split horizon, whereas Ethernet A-D per EVI routes
are used for aliasing. For details, see 5.3 EVPN ESI All-Active Function.
Type 2 route—MAC/IP route
The following figure shows the format of MAC/IP routes.
Field Description
Ethernet Unique ID for defining the connection between local and remote
Segment devices
Identifier
MAC/IP routes provide the following functions on the VXLAN control plane:
function as BGP EVPN peers to exchange MAC/IP routes so that they can
obtain the host MAC addresses. The MAC Address field identifies the MAC
address of a host.
● ARP advertisement
A MAC/IP route can carry both the MAC and IP addresses of a host, and
therefore can be used to advertise ARP entries between VTEPs. The MAC
Address field identifies the MAC address of the host, whereas the IP Address
field identifies the IP address of the host. This type of MAC/IP route is called
the ARP route. ARP advertisement applies to the following scenarios:
a. ARP broadcast suppression. After a Layer 3 gateway learns the ARP entry
of a host, it generates host information that contains the host IP and
MAC addresses, Layer 2 VNI, and gateway's VTEP IP address. The Layer 3
gateway then transmits an ARP route carrying the host information to a
Layer 2 gateway. When the Layer 2 gateway receives an ARP request, it
checks whether it has the host information corresponding to the
destination IP address of the packet. If such host information exists, the
Layer 2 gateway replaces the broadcast MAC address in the ARP request
with the destination unicast MAC address and unicasts the packet. This
implementation suppresses ARP broadcast packets.
b. VM migration in distributed gateway scenarios. After a VM migrates from
one gateway to another, the new gateway learns the ARP entry of the
VM (after the VM sends gratuitous ARP packets) and generates host
information that contains the host IP and MAC addresses, Layer 2 VNI,
and gateway's VTEP IP address. The new gateway then transmits an ARP
route carrying the host information to the original gateway. After the
original gateway receives the ARP route, it detects a VM location change
and triggers ARP probe. If ARP probe fails, the original gateway
withdraws the ARP and host routes of the VM.
● IP route advertisement
In distributed VXLAN gateway scenarios, to implement Layer 3
communication between inter-subnet hosts, the source and remote VTEPs
that function as Layer 3 gateways must learn the host IP routes. The VTEPs
function as BGP EVPN peers to exchange MAC/IP routes so that they can
obtain the host IP routes. The IP Address field identifies the destination
address of the IP route. In addition, the MPLS Label2 field must carry the
Layer 3 VNI. This type of MAC/IP route is called the integrated routing and
bridging (IRB) route.
NOTE
An ARP route carries host MAC and IP addresses and a Layer 2 VNI. An IRB route
carries host MAC and IP addresses, a Layer 2 VNI, and a Layer 3 VNI. Therefore, IRB
routes contain ARP routes and can be used to advertise IP routes as well as ARP
entries.
● ND entry flooding
A MAC/IP route can carry both the MAC address and IPv6 address of a host.
Therefore, this type of route can be used to transmit ND entries between
VTEPs, implementing ND entry advertisement. The MAC Address field carried
in a MAC/IP route indicates information about the host MAC address, and the
IP Address field identifies information about the host IPv6 address. The
MAC/IP route in this case is also called an ND route. ND entry flooding
An ND route carries the following valid information: host MAC address, host IPv6
address, and Layer 2 VNI. An IRBv6 route carries the following valid information: host
MAC address, host IPv6 address, Layer 2 VNI, and Layer 3 VNI. It can be seen that an
IRBv6 route includes information about an ND route and therefore can be used to
advertise both a host IPv6 route and host ND entry.
PMSI attribute
Flags (1 byte)
Field Description
Flags Flags indicating whether leaf node information is required for the
tunnel
This field is inapplicable in VXLAN scenarios.
This type of route is used on the VXLAN control plane for automatic VTEP
discovery and dynamic VXLAN tunnel establishment. VTEPs that function as BGP
EVPN peers exchange inclusive multicast routes to transfer Layer 2 VNIs and
VTEPs' IP addresses. The Originating Router's IP Address field identifies the local
VTEP's IP address; the MPLS Label field identifies a Layer 2 VNI. If the remote
VTEP's IP address is reachable at Layer 3, a VXLAN tunnel to the remote VTEP is
established. In addition, the local end creates a VNI-based ingress replication list
and adds the peer VTEP IP address to the list for subsequent BUM packet
forwarding.
Type 4 route—Ethernet segment route
Figure 3-9 shows the format of an Ethernet segment route.
Ethernet segment routes carry ESI information, source IP address and RD (source
IP:0) on the local device. These routes are exchanged among gateways that are
connected to the same VM. This ensures that these gateways automatically
discover each other. Ethernet segment routes are mainly used in DF election. For
details, see 5.3 EVPN ESI All-Active Function.
Field Description
Ethernet Unique ID for defining the connection between local and remote
Segment devices
Identifier
The IP Prefix Length and IP Prefix fields in an IP prefix route can identify a host IP
address or network segment.
● If the IP Prefix Length and IP Prefix fields in an IP prefix route identify a host
IP address, the route is used for IP route advertisement in distributed VXLAN
gateway scenarios, which functions the same as an IRB route on the VXLAN
control plane.