# VXLAN

VXLAN is a network encapsulation protocol that carries Layer 2 Ethernet frames across a Layer 3 IP network to create logically isolated overlay networks.

Cloud concept. Updated 2026-10-29. Page: https://blowstack.com/tools/cloud-concepts-hub/vxlan

> Virtual Extensible LAN separates logical network segments from the physical or routed infrastructure that transports their traffic. It enables scalable segmentation and selected Layer 2 connectivity across IP networks, but requires careful planning for tunnel endpoints, routing, packet size, security, and failure handling.

Practice exams covering VXLAN: [ANS-C01 AWS Certified Advanced Networking - Specialty](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty).

## 6 key aspects of VXLAN

VXLAN provides scalable Ethernet overlays across routed networks, with explicit requirements for endpoint control, MTU management, traffic distribution, and security.

1. **Layer 2 overlay over a routed underlay**: VXLAN transports Ethernet frames between IP-reachable VTEPs. Design underlay routing independently from the logical segments carried inside the tunnels.
2. **Large segmentation namespace**: The 24-bit VNI identifies an overlay segment and supports approximately 16 million identifiers. Routing or gateway policy is required for communication between separate segments.
3. **Explicit endpoint and control-plane design**: VTEPs encapsulate and decapsulate traffic, but VXLAN alone does not specify how every remote MAC address is discovered. Select a supported learning or control-plane approach and define how broadcast, unknown-unicast, and multicast traffic is distributed.
4. **Encapsulation-aware MTU planning**: VXLAN adds headers that reduce the payload size supported by a given underlay MTU. Account for the complete encapsulation stack and test both TCP and non-TCP traffic across the hybrid path.
5. **Segmentation without built-in encryption**: VNIs separate logical networks but do not authenticate peers or encrypt frames. Apply endpoint access controls and an encrypted transport where confidentiality and integrity are required.
6. **Separate overlay and underlay operations**: Monitor IP reachability and tunnel transport separately from MAC learning, VNI mappings, and overlay gateways. Layer 2 extension can increase broadcast scope and connect failure domains that would otherwise remain isolated.

## Cloud services for VXLAN

In a hybrid design, Direct Connect or Site-to-Site VPN supplies routed reachability between on-premises tunnel endpoints and software endpoints hosted on EC2. The endpoint software, not the connectivity service, creates the VXLAN overlay and controls workload attachment, segment membership, and frame forwarding. VPN adds encryption but also introduces additional packet overhead.

VPC Traffic Mirroring uses VXLAN for a separate purpose: transporting copies of packets to analysis targets. EC2-hosted collectors can decode these packets, but this monitoring path should not be confused with a bidirectional Layer 2 extension. Across both uses, validate endpoint reachability, UDP access, packet size, and decapsulation behavior.

- **[Amazon EC2](https://blowstack.com/tools/cloud-services-hub/amazon-ec2)**: EC2 can host software VTEPs, network appliances, or collectors that decapsulate mirrored VXLAN traffic. Engineers must configure guest networking, tunnel access rules, MTU, and any required forwarding behavior; EC2 does not automatically bridge a VPC subnet into the overlay.
- **[AWS Direct Connect](https://blowstack.com/tools/cloud-services-hub/aws-direct-connect)**: Direct Connect can provide private routed connectivity between on-premises and cloud VTEP addresses. It supplies underlay reachability rather than a managed VXLAN endpoint or transparent extension of an on-premises VLAN into a VPC, and encryption must be evaluated separately.
- **[AWS Site-to-Site VPN](https://blowstack.com/tools/cloud-services-hub/aws-site-to-site-vpn)**: Site-to-Site VPN can provide an encrypted IP underlay for customer-managed VXLAN endpoints. The combined VPN and VXLAN overhead requires careful MTU planning, and VPN route configuration must provide reachability between the VTEP addresses.

## VXLAN exam questions

Real practice exam questions on VXLAN, with the correct answer and its explanation.

### Question 1 (ANS-C01)

**Question:**

A company is migrating a legacy licensing application to a container running on an Amazon EC2 instance. The container must remain in the same logical Ethernet segment as an on-premises licensing server because discovery uses non-IP Ethernet broadcasts. The container's network namespace can connect to a software bridge inside the EC2 guest. An existing AWS Direct Connect private virtual interface provides routed IP connectivity between the on-premises network and the VPC. The company can deploy supported virtual network appliances at both locations, but it cannot modify the application or licensing server. Only the licensing segment should be extended, and the design must not depend on multicast support in the routed underlay.

Which solution meets these requirements?

**Correct answer:** Deploy a VXLAN endpoint inside the EC2 guest and a corresponding on-premises endpoint. Bridge the container's virtual interface and the on-premises licensing segment into the same VNI. Configure unicast replication between endpoints, ensure bidirectional underlay reachability, and size the overlay MTU for encapsulation overhead.

**Explanation:** VXLAN transports Ethernet frames across an IP underlay, including the application's non-IP discovery frames. Explicitly attaching the container's virtual interface to the guest bridge places it in the overlay without assuming that the ordinary VPC subnet supports customer-controlled Layer 2 bridging. Unicast replication carries broadcast traffic between the endpoints without requiring underlay multicast. Endpoint routing and sufficient MTU headroom are also necessary.

## Practice VXLAN in a full exam

Questions on VXLAN in each practice exam, with every answer option and an explanation for each:

- [ANS-C01](https://blowstack.com/practice-exams/aws-certified-advanced-networking-specialty): 1 question

## What is VXLAN

VXLAN, short for Virtual Extensible LAN, builds an overlay network on top of an IP underlay. The overlay defines logical Ethernet segments, while the underlay provides IP connectivity between tunnel endpoints. A VXLAN tunnel endpoint, or VTEP, encapsulates an Ethernet frame in VXLAN, UDP, and outer IP headers; the receiving VTEP removes those headers and delivers the original frame to the appropriate logical segment. The standard UDP destination port is 4789, although some implementations use a different port.

Each VXLAN segment is identified by a 24-bit VXLAN Network Identifier, or VNI. This provides approximately 16 million possible segment identifiers, compared with roughly 4,000 usable VLAN identifiers. Devices in different VNIs remain in separate logical Layer 2 domains unless a routing function connects them. A VNI is a segmentation identifier, not an encryption key or an authorization mechanism.

For hybrid-cloud design, distinguish the routes that deliver encapsulated traffic from the connectivity inside the overlay. An on-premises VTEP needs an IP route to its cloud-side peer, and the cloud-side peer needs a return route. AWS Direct Connect or AWS Site-to-Site VPN can provide that routed underlay connectivity. Neither service automatically extends an on-premises VLAN into a VPC or acts as a general-purpose VXLAN endpoint.

For example, an organization might run a virtual network appliance on Amazon EC2 and establish a VXLAN segment with an on-premises appliance. That segment could support a legacy workload that requires Ethernet adjacency. The design must explicitly define which interfaces participate in the overlay, where default gateways reside, how MAC addresses are learned, and how broadcast traffic reaches remote participants. An ordinary VPC subnet does not become a customer-controlled Ethernet broadcast domain simply because an EC2 instance runs a VTEP. Workload attachment and bridging or routing must be supported by the chosen appliance and guest-network design.

VXLAN specifies encapsulation, not a complete control plane. Implementations can learn remote MAC locations from traffic, use configured peers, or use a control plane such as BGP EVPN. Broadcast, unknown-unicast, and multicast traffic requires an explicit distribution mechanism, such as ingress replication to remote VTEPs. Do not assume a cloud underlay supports the multicast behavior expected by an on-premises VXLAN fabric.

Encapsulation also reduces the usable packet size. With typical Ethernet framing and an IPv4 underlay, VXLAN requires about 50 bytes of additional capacity relative to the inner IP packet. An underlay IP MTU of 1500 therefore commonly requires an inner IP MTU of 1450, with further reductions when additional encapsulation is present. Validate the complete path, including VPN limits, and test large packets. TCP MSS adjustment can help TCP traffic, but it does not solve oversized UDP packets or all path MTU discovery failures.

VXLAN does not provide confidentiality or integrity protection by itself. Restrict tunnel traffic to intended peers, enforce segmentation at the endpoints, and use an encrypted transport when required. Monitor both layers: a healthy underlay route does not prove that VNI mappings, MAC learning, or overlay gateways are correct. Troubleshooting should examine outer IP reachability, UDP filtering, MTU, endpoint configuration, and inner traffic separately.

For architecture and certification scenarios, prefer ordinary routed connectivity when workloads do not require Layer 2 adjacency. Stretching an Ethernet segment can preserve addressing or satisfy a legacy dependency, but it also extends broadcast scope and couples failure domains across locations. VXLAN offers overlay flexibility; it does not remove the need for resilient routing, loop prevention, security policy, or application-aware migration planning.
