Configuring Anycast Gateway in a VXLAN Network

You can configure anycast gateway with Virtual Extensible Local Area Network (VXLAN) to ensure that all Virtual Tunnel End Points (VTEPs) in the VXLAN network can act as the default gateway for the devices connected to it. The following task demonstrates how to configure an anycast gateway for one Virtual Ethernet (VE) interface.

Note: To ensure that the MAC address in the Address Resolution Protocol (ARP) entry of the host device matches the MAC address across all VXLAN Tunnel Endpoints (VTEPs), you can configure anycast gateway using manual MAC configuration via the FastIron CLI. This involves manually configuring the same MAC address on the same VE interfaces on all VTEPs within the VXLAN network.
  1. Enter global configuration mode.
    device# configure terminal
  2. Configure a VE interface.
    device(config)# interface ve 5
  3. Assign the VE interface to a non-default overlay Virtual Routing and Forwarding (VRF) instance.
    device(config-vif-5)# vrf forwarding overlay-vrf
    VE 5 is assigned to a non-default VRF called "overlay-vrf " ensuring that all traffic on this interface is routed according to the routing table and policies defined for the overlay-vrf VRF instance. This isolates the interface from other VRF instances and ensures that it follows the specific routing rules and paths set for overlay-vrf.
  4. Set the IP address and subnet mask for the VE interface.
    device(config-vif-5)# ip address 100.1.1.1/24
  5. Configure the anycast gateway MAC address for the VE interface.
    device(config-vif-5)# anycast-gw-mac aabb.ccdd.eeff

The following example demonstrates how to configure VE interfaces and map them to VLANs in a VXLAN environment. VE interfaces 5 and 6 are assigned IP addresses and assigned to the “overlay-vrf” VRF instance. Additionally, the anycast gateway MAC address is configured on these VE interfaces. These VE interfaces correspond to VLANs 5 and 6, which are then mapped to VNIs 1005 and 1006, respectively, enabling VXLAN functionality and extending these VLANs to a remote site labeled R2.

VE 5:

device# configure terminal
device(config)# interface ve 5
device(config-vif-5)# vrf forwarding overlay-vrf
device(config-vif-5)# ip address 100.1.1.1/24
device(config-vif-5)# anycast-gw-mac aabb.ccdd.eeff

VE 6:

device# configure terminal
device(config)# interface ve 6
device(config-vif-6)# vrf forwarding overlay-vrf
device(config-vif-6)# ip address 101.1.1.1/24
device(config-vif-6)# anycast-gw-mac aabb.ccdd.eeff

VXLAN:

device# configure terminal
device(config)# overlay-gateway R1
device(config-overlay-gw-R1)# map vlan 5 to vni 1005
device(config-overlay-gw-R1)# map vlan 6 to vni 1006
device(config-overlay-gw-R1)# remote-site R2
device(config-overlay-gw-R1)# extend vlan add 5
device(config-overlay-gw-R1)# extend vlan add 6