- Index
- Preface
- Product Overview
-
- Configuring Ethernet Interfaces
- Configuring VLANs
- Configuring Private VLANs
- Configuring Rapid PVST+
- Configuring Multiple Spanning Tree
- Configuring STP Extensions
- Configuring Port Channels
- Configuring Access and Trunk Interfaces
- Configuring the MAC Address Table
- Configuring IGMP Snooping
- Configuring Traffic Storm Control
-
- Configuring Fibre Channel Interfaces
- Configuring Domain Parameters
- Configuring N-Port Virtualization
- Configuring VSAN Trunking
- Configuring SAN PortChannels
- Configuring and Managing VSANs
- Configuring and Managing Zones
- Distributing Device Alias Services
- Configuring Fibre Channel Routing Services and Protocols
- Managing FLOGI, Name Server, FDMI, and RSCN Databases
- Discovering SCSI Targets
- Advanced Features and Concepts
- Configuring FC-SP and DHCHAP
- Configuring Port Security
- Configuring Fabric Binding
- Configuring Fabric Configuration Servers
- Configuring Port Tracking
Configuring Port Channels
This chapter describes how to configure port channels and to apply and configure the Link Aggregation Control Protocol (LACP) for more efficient use of port channels in Cisco NX-OS.
Information About Port Channels
A port channel bundles up to eight individual interfaces into a group to provide increased bandwidth and redundancy. Port channeling also load balances traffic across these physical interfaces. The port channel stays operational as long as at least one physical interface within the port channel is operational.
You create a port channel by bundling compatible interfaces. You can configure and run either static port channels or ports channels running the Link Aggregation Control Protocol (LACP). (See “Understanding LACP” section for information on LACP.)
Any configuration changes that you apply to the port channel are applied to each member interface of that port channel. For example, if you configure Spanning Tree Protocol (STP) parameters on the port channel, the Cisco NX-OS applies those parameters to each interface in the port channel.
You can use static port channels, with no associated protocol, for a simplified configuration. For more efficient use of the port channel, you can use the Link Aggregation Control Protocol (LACP), which is defined in IEEE 802.3ad. When you use LACP, the link passes protocol packets.
This section includes the following topics:
- Understanding Port Channels
- Compatibility Requirements
- Load Balancing Using Port Channels
- Understanding LACP
Understanding Port Channels
Using port channels, Cisco NX-OS provides wider bandwidth, redundancy, and load balancing across the channels.
You can collect up to eight ports into a static port channel or you can enable the Link Aggregation Control Protocol (LACP). Configuring port channels with LACP requires slightly different steps than configuring static port channels (see the “Configuring Port Channels” section).
Note Cisco NX-OS does not support Port Aggregation Protocol (PAgP) for port channels.
A port channel bundles individual links into a channel group to create a single logical link that provides the aggregate bandwidth of up to eight physical links. If a member port within a port channel fails, traffic previously carried over the failed link switches to the remaining member ports within the port channel.
Each port can be in only one port channel. All the ports in a port channel must be compatible; they must use the same speed and operate in full-duplex mode (see the “Compatibility Requirements” section). When you are running static port channels, without LACP, the individual links are all in the on channel mode; you cannot change this mode without enabling LACP (see the “Port-Channel Modes” section).
Note You cannot change the mode from ON to Active or from ON to Passive.
You can create a port channel directly by creating the port-channel interface, or you can create a channel group that acts to aggregate individual ports into a bundle. When you associate an interface with a channel group, Cisco NX-OS creates a matching port channel automatically if the port channel does not already exist. You can also create the port channel first. In this instance, Cisco NX-OS creates an empty channel group with the same channel number as the port channel and takes the default configuration.
Note The port channel is operationally up when at least one of the member ports is up and that port’s status is channeling. The port channel is operationally down when all member ports are operationally down.
Compatibility Requirements
When you add an interface to a channel group, the Cisco NX-OS checks certain interface attributes to ensure that the interface is compatible with the channel group. The Cisco NX-OS also checks a number of operational attributes for an interface before allowing that interface to participate in the port-channel aggregation.
The compatibility check includes the following operational attributes:
This attribute is strictly not applicable as the Cisco Nexus 5000 Series switch only supports system level MTU.
Use the show port-channel compatibility-parameters command to see the full list of compatibility checks that the Cisco NX-OS uses.
You can only add interfaces configured with the channel mode set to on to static port channels. You can also only add interfaces configured with the channel mode as active or passive to port channels that are running LACP. (See “Port-Channel Modes” section for information on port-channel modes.) You can configure these attributes on an individual member port.
When the interface joins a port channel, some of its individual parameters are replaced with the values on the port channel, as follows:
Many interface parameters remain unaffected with the interface joins a port channel, as follows:
Load Balancing Using Port Channels
The Cisco NX-OS load balances traffic across all operational interfaces in a port channel by reducing part of the binary pattern formed from the addresses in the frame to a numerical value that selects one of the links in the channel. Port channels provide load balancing by default and the basic configuration uses the following criteria to select the link:
- For a Layer 2 frame, it uses the source and destination MAC addresses.
- For a Layer 3 frame, it uses the source and destination MAC addresses and the source and destination IP addresses.
- For a Layer 4 frame, it uses the source and destination MAC addresses, the source and destination IP addresses, and the source and destination port number.
You can configure the switch to use one of the following methods to load balance across the port channel:
- Destination MAC address
- Source MAC address
- Source and destination MAC address
- Destination IP address
- Source IP address
- Source and destination IP address
- Destination TCP/UDP port number
- Source TCP/UDP port number
- Source and destination TCP/UDP port number
Table 1-1 shows the criteria used for each configuration:
|
|
|
|
---|---|---|---|
Source and destination MAC, source and destination IP, source and destination port |
Use the option that provides the balance criteria with the greatest variety in your configuration. For example, if the traffic on a port channel is going only to a single MAC address and you use the destination MAC address as the basis of port-channel load balancing, the port channel always chooses the same link in that port channel; using source addresses or IP addresses might result in better load balancing.
Understanding LACP
LACP allows you to configure up to 8 interfaces into a port channel.
LACP Overview
Note You must enable LACP before the feature functions.
Figure 1-1 shows how individual links can be combined into LACP port channels and channel groups as well as function as individual links.
Figure 1-1 Individual Links Combined into a Port Channel
With LACP, you can bundle up to eight interfaces in a channel group.
Note When you delete the port channel, Cisco NX-OS automatically deletes the associated channel group. All member interfaces revert to their previous configuration.
You cannot disable LACP while any LACP configurations are present.
LACP ID Parameters
LACP uses the following parameters:
- LACP system priority—Each system that runs LACP has an LACP system priority value. You can accept the default value of 32768 for this parameter, or you can configure a value between 1 and 65535. LACP uses the system priority with the MAC address to form the system ID and also uses the system priority during negotiation with other devices. A higher system priority value means a lower priority.
Note The LACP system ID is the combination of the LACP system priority value and the MAC address.
- LACP port priority—Each port configured to use LACP has an LACP port priority. You can accept the default value of 32768 for the LACP port priority, or you can configure a value between 1 and 65535. LACP uses the port priority with the port number to form the port identifier. LACP uses the port priority to decide which ports should be put in standby mode when there is a limitation that prevents all compatible ports from aggregating and which ports should be put into active mode. A higher port priority value means a lower priority for LACP. You can configure the port priority so that specified ports have a lower priority for LACP and are most likely to be chosen as active links, rather than hot-standby links.
- LACP administrative key—LACP automatically configures an administrative key value equal to the channel-group number on each port configured to use LACP. The administrative key defines the ability of a port to aggregate with other ports. A port’s ability to aggregate with other ports is determined by these factors:
– Port physical characteristics, such as the data rate, the duplex capability, and the point-to-point or shared medium state
Port-Channel Modes
Individual interfaces in port channels are configured with channel modes. When you run static port channels, with no protocol, the channel mode is always set to on. After you enable LACP globally on the device, you enable LACP for each channel by setting the channel mode for each interface to active or passive. You can configure either channel mode for individual links in the LACP channel group.
Note You must enable LACP globally before you can configure an interface in either the active or passive channel mode.
Table 1-2 describes the channel modes.
Both the passive and active modes allow LACP to negotiate between ports to determine if they can form a port channel, based on criteria such as the port speed and the trunking state. The passive mode is useful when you do not know whether the remote system, or partner, supports LACP.
Ports can form an LACP port channel when they are in different LACP modes as long as the modes are compatible as in the following examples:
- A port in active mode can form a port channel successfully with another port that is in active mode.
- A port in active mode can form a port channel with another port in passive mode.
- A port in passive mode cannot form a port channel with another port that is also in passive mode, because neither port will initiate negotiation.
- A port in on mode is not running LACP.
LACP Marker Responders
Using port channels, data traffic may be dynamically redistributed due to either a link failure or load balancing. LACP uses the Marker Protocol to ensure that frames are not duplicated or reordered because of this redistribution. Cisco NX-OS supports only Marker Responders.
LACP-Enabled and Static Port Channels Differences
Table 1-3 provides a brief summary of major differences between port channels with LACP enabled and static port channels.
|
|
|
---|---|---|
Configuring Port Channels
You can configure multiple port channels on a device.
This section includes the following topics:
- Creating a Port Channel
- Adding a Port to a Port Channel
- Configuring Load Balancing Using Port Channels
- Enabling LACP
- Configuring Port-Channel Port Modes
- Configuring the LACP System Priority and System ID
- Configuring the LACP Port Priority
Creating a Port Channel
You can create a port channel before creating a channel group. Cisco NX-OS automatically creates the associated channel group.
Enable LACP if you want LACP-based port channels (see the “Enabling LACP” section).
To create a port channel, perform this task:
This example shows how to create a port channel:
switch (config)# interface port-channel 1
To remove the port channel and delete the associated channel group, perform this task:
|
|
---|---|
Removes the port channel and deletes the associated channel group. See the “Compatibility Requirements” section for details on how the interface configuration changes when you delete the port channel. |
Adding a Port to a Port Channel
You can add a port to a new channel group or to a channel group that already contains ports. Cisco NX-OS creates the port channel associated with this channel group if the port channel does not already exist.
Enable LACP if you want LACP-based port channels (see the “Enabling LACP” section). To configure a port channel, perform this task:
|
|
|
---|---|---|
Specifies the interface that you want to add to a channel group and enters the interface configuration mode. |
||
switch(config-if)# switchport trunk { allowed vlan vlan-id | native vlan vlan-id } |
(Optional) Configures necessary parameters for a trunk port. |
|
Configures the port in a channel group and sets the mode. The channel-number range is from 1 to 4096. Cisco NX-OS creates the port channel associated with this channel group if the port channel does not already exist1. |
|
To remove the port from the channel group, perform this task:
|
|
---|---|
Removes the port from the channel group. The port reverts to its original configuration. |
This example shows how to add an Ethernet interface 1/4 to channel group 1:
switch (config)# interface ethernet 1/4
switch(config-if)# switchport mode trunk
switch(config-if)# channel-group 1
Configuring Load Balancing Using Port Channels
You can configure the load-balancing algorithm for port channels that applies to the entire device.
Enable LACP if you want LACP-based port channels (see the “Enabling LACP” section). To configure load balancing using port channels, perform this task:
This example shows how to configure source IP load balancing for port channels:
switch (config)# port-channel load-balance ethernet source-ip
To restore the default load-balancing algorithm of source-dest-mac for non-IP traffic and source-dest-ip for IP traffic, perform this task:
|
|
---|---|
Note Before release 4.0(1a)N1 of Cisco NX-OS, the source-dest-ip, source-dest-mac, and source-dest-port keywords were source-destination-ip, source-destination-mac, and source-destination-port respectively.
Enabling LACP
LACP is disabled by default; you must enable LACP before you begin LACP configuration. You cannot disable LACP while any LACP configuration is present.
LACP learns the capabilities of LAN port groups dynamically and informs the other LAN ports. Once LACP identifies correctly matched Ethernet links, it facilitates grouping the links into a port channel. The port channel is then added to the spanning tree as a single bridge port.
To enable LACP, perform this task:
|
|
|
---|---|---|
This example shows how to enable LACP:
switch (config)# feature lacp
Configuring Port-Channel Port Modes
After you enable LACP, you can configure the channel mode for each individual link in the LACP port channel as active or passive. This channel configuration mode allows the link to operate with LACP.
When you configure port channels with no associated protocol, all interfaces on both sides of the link remain in the on channel mode.
To configure the LACP link mode, perform this task:
This example shows how to set the LACP-enabled interface to active port-channel mode for Ethernet interface 1/4 in channel group 5:
switch (config)# interface ethernet 1/4
switch(config-if)# channel-group 5 mode active
Configuring the LACP System Priority and System ID
The LACP system ID is the combination of the LACP system priority value and the MAC address.
To configure the LACP system priority, perform this task:
|
|
|
---|---|---|
Configures the system priority for use with LACP. Valid values are 1 through 65535, and higher numbers have lower priority. The default value is 32768. |
||
This example shows how to set the LACP system priority to 2500:
switch(config)# lacp system-priority 2500
Configuring the LACP Port Priority
When you enable LACP, you can configure each link in the LACP port channel for the port priority.
To configure the LACP link mode and port priority, perform this task:
This example shows how to set the LACP port priority for Ethernet interface 1/4 to 40000:
switch (config)# interface ethernet 1/4
switch(config-if)# lacp port priority 40000
Verifying Port-Channel Configuration
To display port-channel configuration information, perform one of the following tasks: