Configuring VXLAN

Configuring a VXLAN gateway involves the following tasks:

  1. Configure a VXLAN gateway record.
  2. Set the VXLAN gateway type as layer2-extension.
  3. Specify the loopback interface whose IP address will be used as the source IP address for VXLAN tunnels.
    Note: The loopback interface must not belong to a user VRF. Be sure the specified IPv4 address is configured on this interface; otherwise, all VXLAN tunnels will be down.
  4. Map previously created VLANs to VXLAN Network Identifiers (VNIs).
  5. Configure one or more remote site records.
    • For each remote site, specify the IP address of the remote site VTEP. This IP address is used as the destination address for the VXLAN tunnel to that remote site.
    • Make sure the remote VTEP IP address is reachable in the default VRF; otherwise, the VXLAN tunnel to the remote VTEP will be down.
  6. Extend each mapped VLAN to the remote site.

Perform the following steps to configure a VXLAN overlay-gateway.

Note: Only one overlay-gateway can be configured.

  1. Name the overlay-gateway and enter overlay-gateway configuration mode.
    device# configure terminal
    device(config)#overlay-gateway gate1
    device(config-overlay-gw-gate1)#
    
  2. Set the overlay-gateway type (layer2-extension).
    device(config-overlay-gw-gate1)# type layer2-extension
    
  3. Use the loopback interface command in overlay-gateway configuration mode to configure the IP interface for the overlay-gateway.
    Note: You must use a loopback interface, rather than an explicit IPv4 address, as the source address.
    device(config-overlay-gw-gate1)# ip interface loopback 1
  4. Map a VLAN you intend to extend over the VXLAN segment (that is, over the overlay-gateway) to a VXLAN Network Identifier (VNI).
    Note: A maximum of 256 VLAN, VNI pairs can be configured.

    Note: The default VLAN (typically, VLAN 1) cannot be mapped to a VNI or extended over a VXLAN segment.

    device(config-overlay-gw-gate1)# map vlan 2 to vni 3
  5. Create a remote site (VXLAN tunnel), and configure the IP address for the site.
    Note: Only IPv4 tunnels are supported.
    Note: A maximum of 32 remote sites can be created.
    device(config-overlay-gw-gate1)# site site1
    device(config-overlay-gw-gate1-site1)# ip address 67.67.67.1
  6. Extend the mapped VLAN to the remote site.
    device(config-overlay-gw-gate1-site1)# extend vlan add 2
    

The following example configures overlay-gateway gate1. It maps VLAN 2 to VNI 3. It configures a VXLAN tunnel by creating a remote site (site1) and configuring its IP address (67.67.67.1) as the destination address. Finally, it extends the mapped VLAN (VLAN 2) over the overlay-gateway.

device# configure terminal
device(config)# overlay-gateway gate1
device(config-overlay-gw-gate1)# type layer2-extension
device(config-overlay-gw-gate1)# ip interface loopback 1
device(config-overlay-gw-gate1)# map vlan 2 to vni 3
device(config-overlay-gw-gate1)# site site1
device(config-overlay-gw-gate1-site1)# ip address 67.67.67.1
device(config-overlay-gw-gate1-site1)# extend vlan add 2
device(config-overlay-gw-gate1-site1)# end

device# show running-config overlay-gateway
overlay-gateway gateway1
 type layer2-extension
 ip interface Loopback 1
 map vlan 2 vni 3
 site site1
   ip address 67.67.67.1
   extend vlan add 2

device# show overlay-gateway
Overlay Gateway Name    : gateway1
Type                    : layer2-extension
Source IP Interface     : loopback 1 (vrf: default-vrf, IP address: 32.32.31.13)
Total Mapped Vlans      : 1
Total Sites             : 1