Arista EOS VARP: Active-Active Gateway with MLAG - 夜莺博客

Arista EOS VARP: Active-Active Gateway with MLAG

Traditional first-hop redundancy protocols such as HSRP and VRRP are active-standby: one gateway forwards while the other idles, wasting half the uplink capacity of an MLAG pair. Arista EOS solves this with Virtual ARP (VARP), an L3 anycast gateway where both MLAG peers carry the same virtual-router IP and respond to ARP, so every switch forwards traffic at the same time. This article explains how VARP works and walks through the complete EOS configuration on both peers.

How VARP Works

Each MLAG peer keeps a unique physical SVI IP address but shares one virtual-router IP per VLAN and one global virtual-router MAC. Both switches answer ARP requests and periodically send gratuitous ARPs for the VIP using the virtual MAC. That MAC is receive-only — no packet ever leaves with it as the source. When a host sends a frame to the virtual MAC, the local MLAG peer performs the L3 lookup and forwards to the next hop, so traffic is balanced across both switches and failover is immediate when a link or peer fails.

EOS VARP Configuration on Both Peers

Configure the same virtual-router address on each VLAN interface and the same virtual MAC globally on Switch1 and Switch2:

Switch1(config)# interface vlan 10
Switch1(config-if-Vl10)# ip address 10.10.10.2/24
Switch1(config-if-Vl10)# ip virtual-router address 10.10.10.1
Switch1(config-if-Vl10)# interface vlan 20
Switch1(config-if-Vl20)# ip address 10.10.20.2/24
Switch1(config-if-Vl20)# ip virtual-router address 10.10.20.1
Switch1(config-if-Vl20)# exit
Switch1(config)# ip virtual-router mac-address 00:1c:73:00:00:99
Switch1(config)# ip routing
Switch2(config)# interface vlan 10
Switch2(config-if-Vl10)# ip address 10.10.10.3/24
Switch2(config-if-Vl10)# ip virtual-router address 10.10.10.1
Switch2(config-if-Vl10)# interface vlan 20
Switch2(config-if-Vl20)# ip address 10.10.20.3/24
Switch2(config-if-Vl20)# ip virtual-router address 10.10.20.1
Switch2(config-if-Vl20)# exit
Switch2(config)# ip virtual-router mac-address 00:1c:73:00:00:99
Switch2(config)# ip routing

The example MAC 00:1c:73:00:00:99 will not occur naturally. VARP sits on top of an MLAG domain — the peers synchronize MAC and ARP state over the peer link, and the MLAG system MAC is what downstream switches negotiate with LACP.

Verifying VARP

Switch1# show ip virtual-router
Switch1# show ip arp | grep 10.10.10.1

show ip virtual-router lists every configured virtual address with its state; the virtual MAC column should show 00:1c:73:00:00:99. VARP-enabled switches send gratuitous ARP every 30 seconds by default — tune the advertisement interval only if MAC aging on downstream switches demands it.

Design Guidance

Deploy VARP consistently: at minimum on every ToR/leaf that participates in the VLAN and on all core/spine switches. Partial deployment still forwards correctly but can force suboptimal hairpin paths. Because VARP relies on a shared MAC advertised by many switches, validate the design in a lab before a mixed-vendor rollout. For an active-standby alternative, compare with Cisco HSRP, and see where VARP fits in leaf-spine data center design.

原文链接:https://arista.my.site.com/AristaCommunity/s/article/active-active-router-redundancy-using-varp