What is VXLAN; how does it differ from VLAN?
Short answer
VXLAN (Virtual eXtensible LAN, RFC 7348) is an overlay technology that carries the frames of an L2 segment over an L3 (IP) network by placing them inside UDP packets; segments are separated by a 24-bit VNI (VXLAN Network Identifier), and the UDP port assigned by IANA is 4789. While VLAN divides the same physical L2 infrastructure into at most 4094 networks with the 802.1Q tag, VXLAN extends the L2 segment between locations or networks separated by routers and supports about 16 million segments. In TR7, VXLAN is created in the Add Interface form by selecting Type = VXLAN: VNI (1–16777215, required, unique within the same route table), Underlying Interface (ETH, VLAN, Bond or LACP) and Transport Mode (Unicast (remote peer), Unicast (multiple peers) or Multicast Group) are entered; the Details section contains UDP Port (default 4789), Local Source IP, TTL and MAC Learning (on by default). Since the VXLAN header adds 50 bytes per packet on an IPv4 underlay, the MTU is planned.
Where It Is Used in TR7
| Where | Field / label | What for |
|---|---|---|
| Network → Interfaces → Actions → Add Interface → Type = VXLAN | VNI, Interface Name, Underlying Interface, Transport Mode and, depending on the selection, Remote Peer IP, Peer IPs or Multicast Group | Creating the interface that carries the L2 segment over the IP network |
| VXLAN form → Details | MTU, Local Source IP, UDP Port (1–65535, default 4789), TTL (1–255), MAC Learning | Tunnel parameters |
| Network → Firewall → Add | Route Table = the route table of the Underlying interface, Protocol = UDP, Destination Port = the VXLAN UDP port (default 4789), Rule = ALLOW | The Firewall drops incoming traffic that is not permitted and does not generate an automatic rule for VXLAN; permitting the tunnel packets coming from the remote ends (not needed if the Underlying interface is the cluster sync interface) |
| WEB-CLI | network interface add (type vxlan, vxlanId, vxlanMasterId, vxlanTransportMode) (network interface) | Creating the VXLAN interface from the command line |
Comparison
| VLAN | VXLAN | |
|---|---|---|
| Where it works | The same physical L2 network | A tunnel (overlay) over an L3 network |
| Identifier | VLAN ID, 12 bits (2–4094 in TR7) | VNI, 24 bits (1–16777215) |
| Transport | The 802.1Q tag added to the frame | Encapsulation inside UDP (default port 4789) |
| Does it pass through a router | No | Yes |
| MTU effect | The IP MTU does not change (the 4-byte tag is added to the Ethernet frame) | A 50-byte header per packet on an IPv4 underlay |
| Parent / underlying interface in TR7 | Master Interface: ETH, Bond, LACP | Underlying Interface: ETH, VLAN, Bond, LACP |
Common Misconceptions
- "VXLAN is a faster version of VLAN." The goal is not speed; it is to extend the L2 segment over an L3 network and to go beyond the 4094 limit of VLAN.
- "VXLAN does not affect the MTU." Since the header takes up space, the MTU of the VXLAN interface is kept smaller than that of the underlying interface, or the underlying path carries a large MTU (What is MTU; when should I change it in TR7?).
- "The same VNI can be used on two VXLAN interfaces." The same VNI cannot be defined a second time in the same route table; it can be used in different route tables.
How it is done in the documentation
