VxLAN Layer 3 gateways resolve the ARP for host VMs and create routes. When VM1 sends inter-subnet packets to VM3, Leaf-A sends the packet to Spine-1 over the VxLAN configuration in the following figure. First, Spine-1 decapsulates the original Layer 2 frame inside the VxLAN tunnel, and the Layer 2 frame has DMAC as the gateway MAC of Spine-1. Then, Spine-1 routes the packet to VM3, where the ARP resolution is through the VxLAN configuration.
device(config)# overlay-gateway gateway_L2L3 device(config-overlay-gw-gateway_L2L3)# type layer2-extension device(config-overlay-gw-gateway_L2L3)# ip interface loopback 1 device(config-overlay-gw-gateway_L2L3)# qos-dscp-mode Pipe device(config-overlay-gw-gateway_L2L3)# map vni auto device(config-overlay-gw-gateway_L2L3)# activate