Link Aggregation Group (LAG) multiply the bandwidth, increase port flexibility, and provide link redundancy between two devices. Link Aggregation Control Protocol (LACP) is a part of IEEE specification (802.3az) that can control the bundling of several physical ports together to form a single logical channel. Traffic load balancing over the active member ports of a LAG is managed by a hash-based distribution function that distributes unicast and multicast traffic based on Layer 2 or Layer 3 packet header information. LACP helps to form one single LAG by bundling many physical ports. It is also responsible for bandwidth multiplication, increase in port flexibility, and in providing redundancy on links between any 2 devices. Additionally this helps in changing the LAG speed, advertisement, flow control, and also protection which can be easily identified in LAG settings table.
This document explains how to configure LAG on a switch through the Command Line Interface (CLI).
If you are unfamiliar with terms in this document, check out Cisco Business: Glossary of New Terms.
For instructions on how to configure LAG on a switch through the Graphical User Interface (GUI), click here.
In this document, we have two SG550X-24 switches connected to each other on ports GE1/0/1 and GE1/0/2. All the member ports should have the same configuration and speed. The configuration is configured on both of the switches.
Step 1. SSH to the switch. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.
In this example, we will be using the SG550X to configure LAG. To learn how to access an SMB switch CLI through SSH or Telnet, click here.
Step 2. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:
SG550X#configureStep 3. To configure the load balancing policy of the port channeling, use the port-channel load-balance Global Configuration mode command. The parameters are defined as:
src-dst-mac is the default option. In this example, we leave the load balacing as the default option.
SG550X(config)#port-channel load-balance {src-dest-mac/src-dst-mac-ip}Step 4. To execute a command on multiple ports at the same time, use the interface range command. In this example, we will be configuring port 1 and 2 of the switch.
SG550X(config)#interface range GigabitEthernet1/0/1-2To configure a single interface, use the interface interface-id command.
Step 5. To enable auto-negotiation operation for the speed and duplex parameters active-member mode of a given interface, use the negotiation Interface (Ethernet, Port channel) Configuration mode command. In this example, we will be disabling auto-negotiation.
SG550X(config-if-range)#no negotiationStep 6. To associate a port with a port-channel, use the channel-group Interface Configuration mode command. The parameters are defined as:
In this example, we will be configuring channel-group 1 with LACP.
SG550X(config-if-range)#channel-group 1 mode autoStep 7. To enter the Interface Configuration mode in order to configure an interface, use the interface Global Configuration mode command. In this example, we will be configuring port-channel 1.
SG550X(config-if-range)#interface port-channel 1Step 8. To configure the flow control on a given interface, use the flow control Interface (Ethernet, Port Channel) Configuration mode command. Flow control is a feature that allows the receiving device to send a signal to the sending device that it is congested. This tells the sending device to temporarily stop transmitting to help ease the congestion. The parameters are defined as:
In this example, we will be turning flow control on.
SG550X(config-if)#flowcontrol onNote: To disable Flow Control, use the no form of this command. For example:
SG550X(config-if)#no flowcontrolStep 9. To add a description to an interface, use the description Interface (Ethernet, Port Channel) Configuration mode command.
SG550X(config-if)#description LAG1Step 10. (Optional) A trunk interface is an untagged member of a single VLAN, and, in addition, it may be a tagged member of one or more VLANs. Use the switchport trunk allowed vlan Interface Configuration mode command to add/remove VLAN(s) to/from a trunk port.
SG550X(config-if)#switchport trunk allowed vlan {all|none|add vlan-list vlan-list }In this example, we allowed vlan 2-15, 100, 105-115.
SG550X(config-if)#switchport trunk allowed vlan add 2-15,100,105-115Step 11. To end the current configuration session and return to the Privileged EXEC mode, use the end command.
SG550X(config-if)#endStep 12. (Optional) To copy any file from a source to a destination, use the copy command in Privileged EXEC mode. In this example, we will be copying the running configuration to the startup configuration.
SG550X#copy running-config startup-configStep 13. (Optional) A message will appear asking if you would like to overwrite your running-config to the startup-config. Type Y for yes or N for No. In this example, we will be typing Y.
Step 1. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:
SG550X#configureStep 2. To execute a command on multiple ports at the same time, use the interface range command. In this example, we will be configuring port 1 and 2 of the switch.
SG550X(config)#interface range GigabitEthernet1/0/1-2Step 3. To set the physical port priority, use the lacp port-priority Interface (Ethernet) Configuration mode command. Each port configured to use LACP has an LACP port priority. You can configure a value between 1 and 65535. LACP uses the port priority in combination with the port number to form the port identifier. The port priority is used to decide which ports should be put into standby mode when there is a hardware limitation that prevents all compatible ports from aggregating. The default port priority is 1. In this example, we will be leaving the port priority as 1.
SG550X(config-if-range)#lacp port-priority valueStep 4. To assign an administrative LACP timeout to an interface, use the LACP timeout Interface (Ethernet) Configuration mode command. LACP timeout is time interval between the sending and receiving of consecutive LACP protocol data units (PDUs). Select the periodic transmissions of LACP PDUs, which occur at either a long or short transmission speed, depending upon the expressed LACP timeout preference. The default port timeout value is long. The parameters are defined as:
For this example, we will be using the default value of long for our LACP timeout.
SG550X(config-if-range)#lacp timeout longStep 5. To exit any mode and bring the user to the next higher mode in the CLI mode hierarchy, use the exit command.
SG550X(config-if-range)#exitStep 6. To set the system priority, use the lacp system-priority Global Configuration mode command. To restore the default configuration, use the no form of this command. LACP system priority must be configured on each switch running LACP. They can be configured automatically or through the CLI). LACP uses the system priority with the switch MAC address to form the system ID and also during negotiation with other systems. The default system priority is 1. In this example, we will be using the default value of 1.
SG550X(config-if-range)#lacp system-priority valueIf you want to save your running configuration to the startup configuration, please follow steps 11-13 in the previous section: LAG Configuration Procedure.
You should now have configured LAG on your interfaces through the CLI.
Step 1. To verify that your port-channel has been created. Use the command below:
SG550X#show interfaces port-channel [interface-id]Step 2. To display LACP information for all Ethernet ports or for a specific Ethernet port, use the show lacp Privileged EXEC mode command.
SG550X#show lacp interface-id [parameters|statistics|protocol-state]In this example, we will be looking at GE1/0/1 statistics for LACP.
SG550X#show lacp ge1/0/1 statisticsStep 3. To display LACP information for a port-channel, use the show lacp port-channel Privileged EXEC mode command.
SG550X#show lacp port-channel[port_channel_number]The command below is the command we used to display LACP information for a port-channel.
SG550X#show lacp port-channel 1The MAC address has been blurred out in the picture below.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
12-Dec-2018 |
Initial Release |