Arista EOS MLAG Step by Step: Peer Link and Domain Setup - 夜莺博客

Arista EOS MLAG Step by Step: Peer Link and Domain Setup

MLAG turns two Arista switches into one logical switch for the devices connected below them: a server or downstream switch bundles one link to each peer into a single LACP port channel, and both links stay active. The price of that elegance is that every part of the MLAG control plane must be configured in the right order — peer link, MLAG VLAN, domain and member ports — because a peer-link flap or a mismatched domain-id produces split-brain behavior that is painful to troubleshoot at 2 AM. This is the field-tested step-by-step procedure.

Prerequisites

  • Both switches running the same EOS version, or a validated interop pair (mismatched versions are for upgrade windows, not steady state).
  • At least two physical links bundled into the peer-link port channel — never run an MLAG peer link on a single cable.
  • A separate Layer 3 path (routed SVI) for the MLAG heartbeat so a peer-link failure does not kill the keepalive.
  • Consistent VLAN databases on both switches before enabling MLAG.
  • A domain-id unique to this pair if multiple MLAG domains share the data center.

Step 1: Build the Peer-Link Port Channel

interface Ethernet47
   description MLAG-PEER-LINK
   channel-group 4094 mode active
   no shutdown
!
interface Ethernet48
   description MLAG-PEER-LINK
   channel-group 4094 mode active
   no shutdown
!
interface Port-Channel4094
   description MLAG-PEER-LINK
   switchport mode trunk
   switchport trunk allowed vlan 1,10,20,30,4094
   no spanning-tree portfast

Use LACP in active mode rather than a static bundle — it detects cabling mistakes on the peer link automatically. The configuration is identical on both peers.

Step 2: Create the MLAG Peer VLAN and SVI

By Arista convention VLAN 4094 is reserved for MLAG inter-peer communication. Put it in a dedicated trunk group so it only traverses the peer link and cannot leak onto downstream ports:

interface Vlan4094
   ip address 169.1.1.1/30
   no autostate
   mtu 9214
!
interface Port-Channel4094
   switchport trunk group MLAG-Peer

no autostate keeps the SVI up even when no L2 member is forwarding — essential for the peer heartbeat. The mtu 9214 allows the control traffic to use jumbo frames.

Step 3: Define the MLAG Domain

mlag configuration
   domain-id AristaMLAG1
   local-interface Vlan4094
   peer-address 169.1.1.2
   peer-link Port-Channel4094

The domain-id is case-sensitive and must match exactly on both peers. The local-interface is the SVI used as the MLAG source, peer-address points at the other switch's SVI, and peer-link names the port channel built in step 1. Repeat this configuration on peer 2 with its own local-interface IP (169.1.1.2) pointing back at 169.1.1.1.

Step 4: Configure MLAG Member Port Channels

Downstream port channels that span both chassis get an MLAG ID — it must be identical on both peers:

interface Ethernet10
   description TO-SERVER-01
   channel-group 10 mode active
!
interface Port-Channel10
   description TO-SERVER-01-MLAG
   switchport mode trunk
   switchport trunk allowed vlan 10,20,30
   mlag 10

Verification

switch# show mlag
switch# show mlag detail
switch# show mlag interfaces
switch# show port-channel 10 mlag

show mlag reports the domain state, peer-link status and whether both peers agree on the MLAG configuration; the interface output confirms which port channels are active MLAG members. Compare the concept with Cisco's equivalent in our NX-OS vPC configuration guide, or go deeper on troubleshooting in the complete MLAG run book.

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