ARISTA - VXLAN
VXLAN Overview
VXLAN encapsulates Layer 2 Ethernet frames in Layer 3 UDP packets, providing network segmentation and scalability over a shared IP infrastructure. VXLAN uses a 24-bit VXLAN Network Identifier (VNI) to create virtual networks. It typically works with technologies like EVPN or static configurations to provide control plane functions.
Basic VXLAN Configuration
- interface Vxlan <VNI-number>
- Creates a VXLAN interface with the specified VXLAN Network Identifier (VNI).
- vxlan vlan <vlan-id> vni <vni-number>
- Maps a VLAN to a VXLAN VNI. This is necessary to associate VLANs with VXLAN networks.
- vxlan udp-port <port-number>
- Configures the UDP port for VXLAN encapsulation (default is 4789).
- vxlan source-interface <interface-name>
- Configures the source interface for VXLAN traffic. This interface is used for the source IP address in the VXLAN encapsulated packets.
- vxlan flood <enable|disable>
- Enables or disables flooding of unknown unicast traffic in the VXLAN.
VXLAN BGP EVPN Configuration
For large-scale deployments, VXLAN typically works with EVPN (Ethernet VPN) as the control plane for VXLAN to handle MAC address learning, multi-tenancy, and optimal routing of VXLAN traffic.
- router bgp <AS-number>
- Enters BGP configuration mode to configure BGP as the control plane for VXLAN.
- address-family l2vpn evpn
- Configures the BGP EVPN address family, which is used for VXLAN in BGP.
- neighbor <IP-address> activate
- Activates a BGP EVPN session with the specified neighbor.
- evpn extended-vni-list <VNI-list>
- Configures a list of VNIs for use in the EVPN.
- vxlan evpn mode
- Configures the device to operate in VXLAN EVPN mode, enabling EVPN as the control plane for VXLAN.
- vxlan vni <VNI-number> route-target import
- Configures the route-target (RT) import policy for the VXLAN VNI.
- vxlan vni <VNI-number> route-target export
- Configures the route-target (RT) export policy for the VXLAN VNI.
- vxlan vni <VNI-number> rd <route-distinguisher>
- Configures a route distinguisher (RD) for the VXLAN VNI.
- evpn vni <VNI-number> advertise
- Configures the device to advertise a specific VXLAN VNI in BGP EVPN.
- vxlan vlan <vlan-id> vni <vni-number> rd <route-distinguisher>
- Maps a VLAN to a VXLAN VNI and configures a route distinguisher.
VXLAN and Multicast
VXLAN traffic can be forwarded using multicast for unknown unicast, broadcast, and multicast (BUM) traffic. VXLAN supports both multicast and unicast-based flooding mechanisms.
- vxlan multicast-group <multicast-ip>
- Configures the multicast group IP address for VXLAN BUM traffic.
- vxlan use-vrf <vrf-name> multicast-group <multicast-ip>
- Configures VXLAN to use a specific VRF for multicast forwarding.
- ip igmp join-group <multicast-ip>
- Joins a multicast group for VXLAN flooding (used for multicast-based VXLAN configurations).
- ip pim sparse-mode
- Configures PIM (Protocol Independent Multicast) sparse mode to manage multicast forwarding.
- vxlan flood <enable|disable>
- Configures whether unknown unicast traffic is flooded within the VXLAN.
VXLAN Unicast Mode
In VXLAN Unicast mode, VXLAN traffic is forwarded using unicast to the remote VTEPs (VXLAN Tunnel Endpoints).
- vxlan flood <enable|disable> unicast
- Enables or disables unicast forwarding for VXLAN traffic. In this mode, VXLAN traffic uses unicast encapsulation instead of multicast for BUM traffic.
VXLAN Interfaces
VXLAN requires the configuration of logical interfaces for communication within the VXLAN overlay network.
- interface Vxlan <VNI-number>
- Creates a VXLAN interface associated with a specific VNI.
- interface Vxlan <VNI-number> ip address <IP-address> <subnet-mask>
- Configures an IP address on a VXLAN interface.
- interface Vxlan <VNI-number> no shutdown
- Enables the VXLAN interface (brings it up).
- show interface Vxlan <VNI-number>
- Displays information about the VXLAN interface, including operational status and statistics.
VXLAN Tunnel Endpoint (VTEP) Configuration
A VTEP is responsible for VXLAN encapsulation and decapsulation at the edge of the VXLAN network. It is typically configured on devices that serve as gateways between the physical network and the VXLAN overlay.
- interface Ethernet <slot>/<port> vxlan encapsulation
- Configures a physical interface to support VXLAN encapsulation.
- show vxlan
- Displays detailed VXLAN configuration and status, including VNI mappings, VTEP interfaces, and VXLAN flood mode.
- show vxlan tunnel
- Displays the VXLAN tunnel status between VTEPs, including IP address and operational status.
VXLAN Monitoring and Troubleshooting
- show vxlan vtep
- Displays information about VXLAN Tunnel Endpoints (VTEPs) in the system.
- show vxlan flood
- Displays the flooding behavior of VXLAN traffic (whether it is multicast or unicast).
- show ip vxlan
- Displays general VXLAN configuration information, including active VNIs and associated VLANs.
- show bgp l2vpn evpn
- Displays BGP EVPN routes for VXLAN. Useful for troubleshooting BGP control plane connectivity.
- show vxlan vni <VNI-number>
- Displays the status and configuration of a specific VXLAN VNI.
- debug vxlan
- Enables debugging for VXLAN traffic, useful for troubleshooting VXLAN encapsulation and forwarding issues.
- debug bgp evpn
- Enables debugging for BGP EVPN, which is the control plane for VXLAN.
- clear vxlan vtep <VTEP-IP>
- Clears VXLAN VTEP state information for a specified VTEP.
VXLAN Use Cases
- VXLAN for Multi-Tenant Data Centers
- VXLAN is used to create isolated Layer 2 domains over a shared Layer 3 infrastructure, which is ideal for multi-tenant data center environments.
- VXLAN with EVPN Control Plane
- VXLAN often operates with EVPN as the control plane for MAC address learning, route advertisement, and multi-homing across VTEPs.
- VXLAN for Hybrid Cloud Deployments
- VXLAN provides seamless Layer 2 connectivity across on-premise data centers and public cloud environments, supporting hybrid cloud use cases.
Advanced VXLAN Features
- VXLAN with Segment Routing
- VXLAN can be integrated with Segment Routing (SR) to provide enhanced traffic engineering and forwarding.
- VXLAN with DCI (Data Center Interconnect)
- VXLAN is commonly used for Data Center Interconnect (DCI) to extend Layer 2 services across multiple geographically distributed data centers.
- VXLAN EVPN Multihoming
- VXLAN with EVPN allows for multihoming configurations, where a single VXLAN network can be connected to multiple VTEPs for redundancy and load balancing.
