Configuring a VXLAN

Prerequisites
  • A enabled layer 3 interface with an IP address assigned to it, created with the command interface.
  • A layer 3 VLAN.

Procedure
  1. Create VXLAN interface 1 with the command interface vxlan.
  2. Enable VXLAN interface 1 with the command no shutdown.
  3. Set the source IP address for the VXLAN tunnel with the command source ip.
  4. Create a VNI with the command vni.
  5. Define the IP address of the peer VTEP with the command vtep-peer.
  6. Associate a VLAN with the VNI with the command vlan.
  7. Review VXLAN settings with the commands show interface vxlan1 and show interface vxlan1 vteps.

Example

This example creates the following configuration:

  • Creates the layer 3 underlay interface 1/1/1 with IP address 100.1.1.1/24.
  • Creates VLAN 10.
  • Creates VXLAN interface 1.
  • Sets the source IP address for the VXLAN tunnel to 100.1.1.1.
  • Creates VNI 10.
  • Sets the VTEP peer to 200.1.1.1.

  • Associates VLAN 10 with VNI 10.

switch(config)# interface 1/1/1
switch(config-if)# no shutdown
switch(config-if)# ip address 100.1.1.1/24
switch(config-if)# exit
switch(config)# vlan 10
switch(config-vlan-10)# exit
switch(config)# interface vxlan 1
switch(config-vxlan-if)# no shutdown
switch(config-vxlan-if)# source ip 100.1.1.1
switch(config-vxlan-if)# vni 10
switch(config-vni)# vtep-peer 200.1.1.1
switch(config-vni)# VLAN 10
switch(config-vni)# exit
switch(config-vxlan-if)# exit
switch(config-if)# exit
switch(config)# show interface vxlan1
Interface vxlan1 is up
Admin state is up
Description:VXLAN1
Destination UDP port: 4789
VTEP source IPv4 address: 100.1.1.1
VNI        VLAN   VTEP Peers
10         10     200.1.1.1