ARISTA - MLAG
Introduction
MLAG (Multi-Chassis Link Aggregation) is a network feature that allows two physical switches (MLAG peers) to present themselves as a single logical switch to the connected devices. This provides high availability, increased bandwidth, and redundancy without requiring a single switch to be a point of failure. Arista EOS supports MLAG, enabling the creation of a redundant, active-active link aggregation configuration.
This guide covers the essential commands and configuration steps for MLAG on Arista EOS.
MLAG Overview
In an MLAG setup, two switches act as MLAG peers and share a single logical control plane for link aggregation. The MLAG peer switches maintain synchronization and communicate through a dedicated MLAG interconnect link, allowing traffic to flow seamlessly between them. MLAG supports Layer 2 and Layer 3 connectivity.
- Key Features of MLAG:
- **Active-Active Links**: Provides load balancing and redundancy by using multiple links between switches and end devices.
- **Redundancy**: If one switch fails, the other switch in the MLAG pair can continue to forward traffic.
- **No Single Point of Failure**: MLAG avoids the single point of failure in traditional link aggregation setups.
- **Simplified Network Design**: MLAG allows for the use of standard LACP (Link Aggregation Control Protocol) to create logical links between devices.
Basic MLAG Configuration
To configure MLAG, you need to set up the MLAG peer, the MLAG domain, and the MLAG interconnect link. Here are the steps to configure MLAG on Arista EOS.
- Step 1: Enable MLAG on Both Switches
- mlag config-id <number>
- Configures the MLAG configuration ID (domain). This ID must be the same on both switches in the MLAG pair.
- mlag peer-address <IP-address>
- Configures the IP address of the MLAG peer. This IP address is used for communication between the MLAG peers.
- mlag peer-link <interface-name>
- Configures the interconnect link between the two MLAG peers. This interface must be a high-speed link between the peers, often configured as a trunk or a port-channel.
- mlag local-interface <interface-name>
- Configures the local interface for the MLAG instance. This interface is used for communication with the peer.
- Step 2: Configure the MLAG Peer Link
The peer link connects the two switches and allows them to communicate. It typically connects the two switches via a high-speed link like a 10/40/100Gb Ethernet link.
- interface Ethernet <slot>/<port>
- Configures the peer link interface.
- switchport mode trunk
- Configures the peer link interface as a trunk port to allow multiple VLANs.
- channel-group <group-id> mode active
- Configures the peer link as part of a port channel and sets the link aggregation mode to "active."
- Step 3: Configure the MLAG Interface
The MLAG interface is the logical interface that both switches share to appear as a single logical switch to the connected devices.
- interface Vlan <vlan-id>
- Creates the MLAG VLAN interface.
- mlag <vlan-id>
- Assigns the VLAN to the MLAG instance.
- ip address <IP-address> <subnet-mask>
- Configures the IP address on the MLAG interface.
- no shutdown
- Brings the MLAG interface up.
- Step 4: Configure Port-Channels on Each Switch
Port-channels are used to bundle multiple physical links into a single logical link. These port-channels are associated with the MLAG configuration.
- interface Ethernet <slot>/<port>
- Configures each physical interface that will be added to the port-channel.
- channel-group <group-id> mode active
- Configures the physical interface as part of the port-channel in active mode.
- interface Port-Channel <group-id>
- Configures the port-channel interface.
- switchport mode trunk
- Configures the port-channel as a trunk to carry multiple VLANs.
- mlag <vlan-id>
- Assigns the port-channel to the MLAG instance.
- Step 5: Enable MLAG on Both Switches
Ensure that both switches in the MLAG pair are configured with identical settings.
- show mlag
- Displays the status of MLAG on the device, including the peer status and configured VLANs.
- show mlag peer-link
- Displays the status of the MLAG peer link.
- show mlag interface
- Displays the status of MLAG interfaces.
MLAG Troubleshooting
Here are some useful troubleshooting commands to check MLAG status and resolve any issues.
- show mlag
- Displays the MLAG configuration and operational status. It shows the local MLAG configuration, peer status, and MLAG interfaces.
- show mlag peer-link
- Displays the status of the peer link between MLAG switches. This command provides information about the health and status of the peer link.
- show mlag interface
- Displays detailed information about MLAG interfaces, including whether they are operational or in a failed state.
- show mlag summary
- Displays a summary of the MLAG configuration, including peer switch information and interface status.
- show interfaces ethernet <slot>/<port>
- Displays the status of a specific interface, including any errors or issues.
- show spanning-tree vlan <vlan-id>
- Displays the spanning tree protocol (STP) status for a specific VLAN. STP is crucial in an MLAG configuration to ensure loop-free operation.
- show logging
- Displays system logs, including any relevant information about MLAG or peer link issues.
- debug mlag
- Enables debugging of MLAG operations to help troubleshoot problems.
- clear mlag statistics
- Clears the MLAG statistics counters, which can be useful after resolving issues or performing maintenance.
MLAG Redundancy and Failover
MLAG provides high availability by ensuring that both switches in the MLAG pair can forward traffic simultaneously. If one switch fails, the other will continue forwarding traffic with minimal disruption.
- MLAG Failover Behavior:
- If a port-channel member goes down on one switch, the traffic is automatically forwarded via the other switch in the MLAG pair.
- If the MLAG peer link fails, the switch will attempt to maintain communication with its peer through the local MLAG interface.
- If the MLAG peer switch fails completely, the local switch can still forward traffic for MLAG-configured VLANs via the local interfaces.
- Configuring Redundancy:
- Ensure both switches are connected to each other via a high-speed, redundant peer link.
- Utilize spanning-tree protocol (STP) to ensure no loops are present in the network. STP configuration should be consistent across both MLAG peers.
- show spanning-tree
- Displays the spanning-tree topology, which should have no loops, especially in an MLAG configuration.
Advanced MLAG Configuration
Arista EOS provides additional advanced features for MLAG configurations, such as MLAG over multiple interfaces, VLANs with specific MLAG configurations, and integrating MLAG with other protocols like EVPN.
- MLAG with EVPN:
- EVPN (Ethernet VPN) can be used as a control plane to manage MLAG configurations in larger networks. By using EVPN, you can achieve more flexible and scalable MLAG deployment with better fault tolerance.
- MLAG on Virtual Router Redundancy Protocol (VRRP):
- MLAG can also be configured to work with VRRP to provide high availability for Layer 3 gateways.
MLAG Security Best Practices
- Ensure that MLAG peer links are physically secured to prevent unauthorized access.
- Use network access control lists (ACLs) to limit the devices that can connect to the MLAG pair.
- Regularly monitor the status of MLAG and peer links using `show mlag` and other relevant commands.
- Use authentication and encryption methods (such as IPsec or MACsec) for MLAG interconnect links to protect against eavesdropping or tampering.
