NVIDIA MLNX-OS LAG and LACP Configuration Guide - 夜莺博客

NVIDIA MLNX-OS LAG and LACP Configuration Guide

NVIDIA Mellanox switches running MLNX-OS are common in HPC and storage fabrics, and link aggregation is usually the first feature you configure: bonding two or four 25/40/100G ports into one logical port-channel doubles the bandwidth and removes single-link risk. This guide walks through MLNX-OS LAG and LACP configuration from scratch: creating the port-channel, assigning member ports, choosing static vs LACP modes, and verifying the bundle with the right show commands.

Step 1: Create the Port-Channel

switch (config) # interface port-channel 1
switch (config interface port-channel 1) # switchport mode trunk
switch (config interface port-channel 1) # switchport trunk allowed vlan add 10,20,30
switch (config interface port-channel 1) # exit

MLNX-OS uses interface port-channel <id> like IOS. The port-channel inherits switchport settings; here it is a trunk carrying VLANs 10, 20 and 30.

Step 2: Assign Member Ports with LACP

switch (config) # interface ethernet 1/1
switch (config interface ethernet 1/1) # channel-group 1 mode active
switch (config interface ethernet 1/1) # exit
switch (config) # interface ethernet 1/2
switch (config interface ethernet 1/2) # channel-group 1 mode active
switch (config interface ethernet 1/2) # exit

mode active enables active LACP (802.3ad) - the switch actively sends LACPDUs. Use mode passive to wait for the peer, or mode on for a static (non-LACP) bundle when the peer does not support LACP.

Step 3: Save the Configuration

switch (config) # exit
switch # write memory
Success.

Verification Commands

show interfaces port-channel 1
show interfaces port-channel summary
show lacp
show lacp interfaces
show interfaces ethernet 1/1
show interfaces counter port-channel 1

show interfaces port-channel 1 shows the bundle state and member ports; show lacp interfaces displays LACP partner state for each member (look for BNDL/Collecting-Distributing state - if members show AGG but not BNDL, the peer is not matching the LACP config).

Common Issues and Fixes

Symptom Cause Fix
Members stuck in AGG state LACP mode mismatch (active vs passive) Set both sides active
Bundle does not come up VLAN/switchport settings differ on members Apply identical switchport config to all members
Traffic not load-balanced Hash policy unsuited to traffic port-channel load-balance tuning (L3/L4 hash)
Link flaps after reboot Config not saved write memory

Port-Channel Load Balancing

switch (config) # port-channel load-balance ethernet dst-ip
switch (config) # port-channel load-balance ethernet l4-src-port

MLNX-OS lets you pick the hash fields for the bundle; for storage/NFS traffic, include L4 ports to spread flows across members.

Best Practices

  • Use LACP (mode active) instead of static bundles where possible - it detects mis-wiring and dead links.
  • Keep all members on the same speed and VLAN settings.
  • For storage fabrics, verify the hash policy spreads traffic or a single member will saturate.

Related: Mellanox switch port types in MLNX-OS and Dell OS10 port-channel and LACP configuration.

原文链接:https://docs.nvidia.com/networking/display/MLNXOSv31120/