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.
- Enter global configuration mode.
- Configure a VE interface.
- Assign the VE interface to a
non-default overlay Virtual Routing and Forwarding (VRF) instance.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.
- Set the IP address and subnet mask for the VE interface.
- Configure the anycast gateway MAC address for the VE interface.
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.
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
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
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