Configuring VXLAN
Configuring a VXLAN gateway involves the following tasks:
- Configure a VXLAN gateway record.
- Set the VXLAN gateway type as layer2-extension.
- 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.
- Map previously created VLANs to VXLAN Network Identifiers (VNIs).
- Configure one or more remote site records.
- 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.
- Name the overlay-gateway and enter overlay-gateway configuration mode.
- Set the overlay-gateway type (layer2-extension).
- Use the
loopback interfacecommand 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. - 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.
- 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.
- Extend the mapped VLAN to the remote site.
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