Arista EOS MLAG Configuration: Complete Run Book - 夜莺博客

Arista EOS MLAG Configuration: Complete Run Book

Source: InfraRunBook (Solve The Network Knowledge Base)

A production-ready guide to configuring Arista EOS MLAG, covering peer-link setup, peer-keepalive, MLAG domain configuration, interface assignment, verification, and troubleshooting from first principles.

What Is MLAG and Why It Matters in Production

Multi-Chassis Link Aggregation (MLAG) is an Arista EOS feature that allows two independent physical switches to present themselves as a single logical switching entity to any connected device. From the perspective of a server, storage array, or downstream access switch, the MLAG pair appears as one LACP-capable peer. Both uplinks are active simultaneously, delivering full bandwidth utilization and sub-second failover when one peer or one link fails.

Traditional dual-homed designs using Spanning Tree Protocol (STP) block one uplink to prevent Layer 2 loops, wasting half of the installed bandwidth and introducing STP convergence delays (typically 1–5 seconds for Rapid STP). MLAG eliminates the blocked port by synchronizing MAC tables, ARP tables, and LACP state between the two peers.

MLAG Architecture and Component Overview

An MLAG deployment is built from four logical components that must all be correctly configured:

  • Peer-link — a port channel between the two switches carrying control and data traffic.
  • Peer-keepalive — a Layer 3 keepalive path (usually over the management VRF) for dual-primary detection.
  • MLAG domain — the domain ID, local interface, peer address, and peer-link configuration.
  • MLAG interfaces — port channels assigned an MLAG ID on both peers.

When fully operational, both peers share a virtual system MAC address. Connected devices negotiate LACP against this shared MAC, unaware they are physically connected to two separate switches.

Step 1 — Configure Peer-Keepalive Addressing

The peer-keepalive runs over the management VRF. Each switch has a dedicated management IP; the keepalive references the remote peer's management IP:

interface Management1
ip address 192.168.1.11/24
no shutdown
interface Management1
ip address 192.168.1.12/24
no shutdown

Confirm bidirectional reachability: ping 192.168.1.12 source Management1

Step 2 — Build the Peer-Link Port Channel

Bundle Ethernet47/48 into Port-Channel1 using LACP active mode, identical on both peers:

interface Ethernet47
description MLAG-PEER-LINK-Eth47
channel-group 1 mode active
no shutdown
!
interface Ethernet48
description MLAG-PEER-LINK-Eth48
channel-group 1 mode active
no shutdown

Verify with show lacp 1 peer — both members should show as Bundled.

Step 3 — Create the MLAG Peer VLAN and SVI

By Arista convention, VLAN 4094 is reserved for MLAG inter-peer communication. A dedicated trunk group restricts this VLAN to the peer-link so it cannot leak to downstream ports:

vlan 4094
name MLAG-PEER-VLAN
trunk group MLAG-PEER
!
interface Vlan4094
description MLAG-PEER-LINK-SVI
no autostate
ip address 10.0.0.1/30
no shutdown

The no autostate directive is essential — without it, Vlan4094 goes down if the VLAN has no active member ports, breaking MLAG peering at exactly the wrong moment. Then apply the trunk group to the peer-link port channel:

interface Port-Channel1
description MLAG-PEER-LINK
switchport mode trunk
switchport trunk group MLAG-PEER
no shutdown

Step 4 — Configure the MLAG Domain

The domain ID must be character-for-character identical on both peers. Reload-delay timers prevent forwarding before state synchronization completes after a reboot:

mlag configuration
domain-id INFRARUNBOOK-MLAG
local-interface Vlan4094
peer-address 10.0.0.2
peer-link Port-Channel1
peer-address heartbeat 192.168.1.12 vrf MGMT
reload-delay mlag 300
reload-delay non-mlag 330

reload-delay mlag 300 holds MLAG interfaces in a non-forwarding state for 300 seconds after reload, allowing full MLAG peering and MAC/ARP table synchronization; non-mlag 330 adds an extra delay so protocols like BGP/OSPF do not advertise reachability before MLAG converges.

Step 5 — Configure MLAG Interfaces for Downstream Devices

The MLAG ID ties the two peers' port channels together and must be identical on both peers:

interface Ethernet1
description SERVER-DUAL-HOME-MEMBER
channel-group 10 mode active
no shutdown
!
interface Port-Channel10
description SERVER-DUAL-HOME
switchport mode trunk
switchport trunk allowed vlan 10,20,30
mlag 10
no shutdown

The downstream server or switch running LACP sees a single LAG partner advertising the shared MLAG system MAC.

Verifying MLAG Operation

show mlag
MLAG Status:
state                 : Active
negotiation status    : Connected
peer-link status      : Up
local-int status      : Up
system-id             : 02:1c:73:aa:bb:cc
MLAG Ports:
Active-full           : 2

Key fields: state = Active, negotiation status = Connected, and all expected MLAG ports in Active-full. Also check show mlag interfaces, show mlag config-sanity (no configuration inconsistencies), and show mlag detail (keepalive status, peer address).

Troubleshooting Common MLAG Problems

Negotiation Status: Disconnected

Peer-link is up at L1/L2 but MLAG protocol messages are not exchanged — most commonly a missing or incorrect trunk group on Vlan4094 or Port-Channel1. Verify with show interfaces Vlan4094 and show running-config | section interface Port-Channel1, then reapply the trunk group.

Split-Brain: Peer-Link Down, Keepalive Up

EOS performs automatic split-brain prevention: the secondary peer disables all its MLAG interfaces (state : Secondary, negotiation status : Peer-link-down). The primary continues forwarding normally. Restore the peer-link; MLAG interfaces on the secondary re-enable automatically after state re-synchronization.

MLAG Interface in active-partial

The port channel is up locally but the corresponding member is down on the remote peer. Investigate the remote peer's physical interface, cable seating, SFP status, and the connected device's NIC.

Key Best Practices

  • Use LACP (channel-group mode active) rather than static LAGs to avoid miscabling issues.
  • Isolate the keepalive path from the peer-link (management VRF) to avoid simultaneous dual failure.
  • Size the peer-link to carry all traffic that crosses during failover.
  • Set a static system-id when replacing a switch in an existing MLAG pair.
  • MLAG works with VXLAN BGP EVPN fabrics: MLAG leaf pairs share a common VTEP and synchronize EVPN routes via BGP EVPN.

原文链接:https://infrarunbook.com/article/arista-eos-mlag-configuration-runbook