Catalyst 2950 and Catalyst 2955 Switch Software Configuration Guide, 12.1(22)EA11 and Later
Configuring EtherChannels
Downloads: This chapterpdf (PDF - 212.0KB) The complete bookPDF (PDF - 18.87MB) | Feedback

Configuring EtherChannels

Table Of Contents

Configuring EtherChannels

Understanding EtherChannels

Understanding Port-Channel Interfaces

Understanding the Port Aggregation Protocol and Link Aggregation Protocol

PAgP and LACP Modes

Physical Learners and Aggregate-Port Learners

PAgP and LACP Interaction with Other Features

EtherChannel On Mode

Understanding Load Balancing and Forwarding Methods

Configuring EtherChannels

Default EtherChannel Configuration

EtherChannel Configuration Guidelines

Configuring Layer 2 EtherChannels

Configuring EtherChannel Load Balancing

Configuring the PAgP Learn Method and Priority

Configuring the LACP Port Priority

Configuring Hot Standby Ports

Configuring the LACP System Priority

Displaying EtherChannel, PAgP, and LACP Status


Configuring EtherChannels


This chapter describes how to configure EtherChannel on the Layer 2 interfaces of a Catalyst 2950 or Catalyst 2955 switch.

This chapter consists of these sections:

Understanding EtherChannels

EtherChannel On Mode

Configuring EtherChannels

Displaying EtherChannel, PAgP, and LACP Status


Note For complete syntax and usage information for the commands used in this chapter, see the command reference for this release.


Understanding EtherChannels

EtherChannel provides fault-tolerant high-speed links between switches, routers, and servers. You can use it to increase the bandwidth among the wiring closets and the data center, and you can deploy it anywhere in the network where bottlenecks are likely to occur. EtherChannel provides automatic recovery for the loss of a link by redistributing the load across the remaining links. If a link fails, EtherChannel redirects traffic from the failed link to the remaining links in the channel without intervention.

An EtherChannel consists of individual Fast Ethernet or Gigabit Ethernet links bundled into a single logical link as shown in Figure 30-1. The EtherChannel provides full-duplex bandwidth up to 800 Mbps (Fast EtherChannel) or 2 Gbps (Gigabit EtherChannel) between your switch and another switch or host.

Figure 30-1 Typical EtherChannel Configuration

Each EtherChannel can consist of up to eight compatibly configured Ethernet interfaces. All interfaces in each EtherChannel must be the same speed, and all must be configured as Layer 2 interfaces.


Note The network device to which your switch is connected can impose its own limits on the number of interfaces in the EtherChannel. For Catalyst 2950 and Catalyst 2955 switches, the number of EtherChannels is limited to six with eight ports per EtherChannel.


You can configure an EtherChannel in one of these modes: Port Aggregation Protocol (PAgP), Link Aggregation Control Protocol (LACP), or On mode. Configure both ends of the EtherChannel in the same mode:

When you configure one end of an EtherChannel in either PAgP or LACP mode, the system negotiates with the other end of the channel to determine which ports should become active. Incompatible ports are suspended.

When you configure an EtherChannel in the on mode, no negotiations take place. The switch forces all compatible ports to become active in the EtherChannel. The other end of the channel (on the other switch) must also be configured in the on mode; otherwise, packet loss can occur.

If a link within an EtherChannel fails, traffic previously carried over that failed link moves to the remaining links within the EtherChannel. If traps are enabled on the switch, a trap is sent for a failure that identifies the switch, the EtherChannel, and the failed link. Inbound broadcast and multicast packets on one link in an EtherChannel are blocked from returning on any other link of the EtherChannel.

Understanding Port-Channel Interfaces

When you create an EtherChannel for Layer 2 interfaces, a logical interface is dynamically created, as shown in Figure 30-2. You then manually assign an interface to the EtherChannel by using the channel-group interface configuration command.

Each EtherChannel has a logical port-channel interface numbered from 1 to 6.

Figure 30-2 Relationship of Physical Ports, Logical Port Channels, and Channel Groups

When a port joins an EtherChannel, the physical interface for that port is shut down. When the port leaves the port-channel, its physical interface is brought up, and it has the same configuration as it had before joining the EtherChannel.


Note Configuration changes made to the logical interface of an EtherChannel may not propagate to all the member ports of the channel.


Understanding the Port Aggregation Protocol and Link Aggregation Protocol

The Port Aggregation Protocol (PAgP) and Link Aggregation Control Protocol (LACP) facilitate the automatic creation of EtherChannels by exchanging packets between Ethernet interfaces. PAgP is a Cisco-proprietary protocol that can be run only on Cisco switches and on those switches licensed by licensed vendors to support PAgP. LACP is defined in IEEE 802.3ad and allows Cisco switches to manage Ethernet channels between switches that conform to the IEEE 802.3ad protocol.

By using one of these protocols, a switch learns the identity of partners capable of supporting either PAgP or LACP and learns the capabilities of each interface. It then dynamically groups similarly configured interfaces into a single logical link (channel or aggregate port); these interfaces are grouped based on hardware, administrative, and port parameter constraints. For example, PAgP groups the interfaces with the same speed, duplex mode, native VLAN, VLAN range, and trunking status and type. After grouping the links into an EtherChannel, PAgP adds the group to the spanning tree as a single switch port.

PAgP and LACP Modes

Table 30-1 shows the user-configurable EtherChannel modes for the channel-group interface configuration command. Switch interfaces exchange PAgP packets only with partner interfaces configured in the auto or desirable modes. Switch interfaces exchange LACP packets only with partner interfaces configured in the active or passive modes. Interfaces configured in the on mode do not exchange PAgP or LACP packets.

Table 30-1 EtherChannel Modes 

Mode
Description

active

Places an interface into an active negotiating state, in which the interface starts negotiations with other interfaces by sending LACP packets.

auto

Places an interface into a passive negotiating state, in which the interface responds to PAgP packets it receives but does not start PAgP packet negotiation. This setting minimizes the transmission of PAgP packets.

desirable

Places an interface into an active negotiating state, in which the interface starts negotiations with other interfaces by sending PAgP packets.

passive

Places an interface into a passive negotiating state, in which the interface responds to LACP packets that it receives, but does not start LACP packet negotiation. This setting minimizes the transmission of LACP packets.


Exchanging PAgP Packets

Both the auto and desirable PAgP modes allow interfaces to negotiate with partner interfaces to determine if they can form an EtherChannel based on criteria such as interface speed and, for Layer 2 EtherChannels, trunking state and VLAN numbers.

Interfaces can form an EtherChannel when they are in different PAgP modes as long as the modes are compatible. For example:

An interface in the desirable mode can form an EtherChannel with another interface that is in the desirable or auto mode.

An interface in the auto mode can form an EtherChannel with another interface in the desirable mode.

An interface in the auto mode cannot form an EtherChannel with another interface that is also in the auto mode because neither interface starts PAgP negotiation.

If your switch is connected to a partner that is PAgP-capable, you can configure the switch interface for nonsilent operation by using the non-silent keyword. If you do not specify non-silent with the auto or desirable mode, silent mode is assumed.

The silent mode is used when the switch is connected to a device that is not PAgP-capable and seldom, if ever, sends packets. An example of a silent partner is a file server or a packet analyzer that is not generating traffic. In this case, running PAgP on a physical port connected to a silent partner prevents that switch port from ever becoming operational; however, the silent setting allows PAgP to operate, to attach the interface to a channel group, and to use the interface for transmission.


Note An EtherChannel cannot be configured in both the PAgP and LACP modes.


Exchanging LACP Packets

Both the active and passive LACP modes allow interfaces to negotiate with partner interfaces to determine if they can form an EtherChannel based on criteria such as interface speed and, for Layer 2 EtherChannels, trunking state, and VLAN numbers.

Interfaces can form an EtherChannel when they are in different LACP modes as long as the modes are compatible. For example:

An interface in the active mode can form an EtherChannel with another interface that is in the active mode.

An interface in the active mode can form an EtherChannel with another interface in the passive mode.

An interface in the passive mode cannot form an EtherChannel with another interface that is also in the passive mode because neither interface starts LACP negotiation.


Note An EtherChannel cannot be configured in both the PAgP and LACP modes.


Physical Learners and Aggregate-Port Learners

Network devices are classified as PAgP physical learners or aggregate-port learners. A device is a physical learner if it learns addresses by physical ports and directs transmissions based on that knowledge. A device is an aggregate-port learner if it learns addresses by aggregate (logical) ports.

When a device and its partner are both aggregate-port learners, they learn the address on the logical port-channel. The device sends packets to the source by using any of the interfaces in the EtherChannel. With aggregate-port learning, it is not important on which physical port the packet arrives.

The switch uses source-MAC address distribution for a channel if it is connected to a physical learner even if you configure the switch for destination-MAC address distribution.

These frame distribution mechanisms are possible for frame transmission:

Load distribution based on the source-MAC address of the packet

Load distribution based on the destination-MAC address of the packet

The switch supports up to eight ports in a PAgP group.

PAgP and LACP Interaction with Other Features

The Dynamic Trunking Protocol (DTP) and Cisco Discovery Protocol (CDP) send and receive packets over the physical interfaces in the EtherChannel. Trunk ports send and receive PAgP and LACP protocol data units (PDUs) on the lowest numbered VLAN.

Spanning tree sends packets over a single physical interface in the EtherChannel, regarding the EtherChannel as one port.

PAgP sends and receives PAgP PDUs only from interfaces that have PAgP enabled for the auto or desirable mode. LACP sends and receives LACP PDUs only from interfaces that have LACP enabled for the active or passive mode.

EtherChannel On Mode

EtherChannel on mode can be used to manually configure an EtherChannel. The on mode forces a port to join an EtherChannel without negotiations. It can be useful if the remote device does not support PAgP or LACP. With the on mode, a usable EtherChannel exists only when both ends of the link are configured in the on mode.

This mode is not available on Long-Reach Ethernet (LRE) switches, because LRE interfaces do not support an EtherChannel-only mode.

Ports that are configured with on mode in the same channel group must have compatible port characteristics, such as speed and duplex. Ports that are not compatible are suspended, even though they are configured with on mode.


Caution You should exercise care when using the on mode. This is a manual configuration, and ports on both ends of the EtherChannel must have a similar configuration. If the group is misconfigured, packet loss or spanning-tree loops can occur.

Understanding Load Balancing and Forwarding Methods

EtherChannel balances the traffic load across the links in a channel by randomly associating a newly learned MAC address with one of the links in the channel.

With source-MAC address forwarding, packets forwarded to an EtherChannel are distributed across the ports in the channel based on the source-MAC address of the incoming packet. Therefore, to provide load balancing, packets from different hosts use different ports in the channel, but packets from the same host use the same port in the channel. The MAC address learned by the switch does not change).

With destination-MAC address forwarding, packets forwarded to an EtherChannel are distributed across the ports in the channel based on the destination host MAC address of the incoming packet. Therefore, packets to the same destination are forwarded over the same port, and packets to a different destination might be sent on a different port in the channel. You configure the load balancing and forwarding method by using the port-channel load-balance global configuration command.

In Figure 30-3, multiple workstations are connected to a switch, and an EtherChannel connects the switch to the router. Source-based load balancing is used on the switch end of the EtherChannel to ensure that the switch efficiently uses the bandwidth of the router by distributing traffic from the workstation across the physical links. Since the router is a single MAC address device, it uses destination-based load balancing to efficiently spread the traffic to the workstations across the physical links in the EtherChannel.

Figure 30-3 Load Distribution and Forwarding Methods

Use the option that provides the greatest variety in your configuration. For example, if the traffic on a channel is going only to a single MAC address, using the destination-MAC address always chooses the same link in the channel; using source addresses or IP addresses might result in better load balancing.

Configuring EtherChannels

These sections describe how to configure EtherChannel interfaces:

Default EtherChannel Configuration

EtherChannel Configuration Guidelines

Configuring Layer 2 EtherChannels

Configuring EtherChannel Load Balancing

Configuring the PAgP Learn Method and Priority


Note Make sure that the interfaces are correctly configured (see the "EtherChannel Configuration Guidelines" section).



Note After you configure an EtherChannel, configuration changes applied to the port-channel interface apply to all the physical interfaces assigned to the port-channel interface, and configuration changes applied to the physical interface affect only the interface where you apply the configuration.


Default EtherChannel Configuration

Table 30-2 shows the default EtherChannel configuration.

Table 30-2 Default EtherChannel Configuration 

Feature
Default Setting

Channel groups

None assigned.

PAgP mode

No default.

PAgP learn method

Aggregate-port learning on all interfaces.

PAgP priority

128 on all interfaces. (Changing this value has no effect.)

LACP learn method

Aggregate-port learning on all interfaces.

LACP priority

32768 on all interfaces.

Load balancing

Load distribution on the switch is based on the source-MAC address of the incoming packet.


EtherChannel Configuration Guidelines

If improperly configured, some EtherChannel ports are automatically disabled to avoid network loops and other problems. Follow these guidelines to avoid configuration problems:

Configure an EtherChannel with up to eight Ethernet ports of the same type.


Note Do not configure a GigaStack GBIC port as part of an EtherChannel.


Configure all ports in an EtherChannel to operate at the same speeds and duplex modes.

Enable all interfaces in an EtherChannel. A port in an EtherChannel that is disabled by using the shutdown interface configuration command is treated as a link failure, and its traffic is transferred to one of the remaining interfaces in the EtherChannel.

When a group is first created, all ports follow the parameters set for the first port to be added to the group. If you change the configuration of one of these parameters, you must also make the changes to all ports in the group:

Allowed-VLAN list

Spanning-tree path cost for each VLAN

Spanning-tree port priority for each VLAN

Spanning-tree Port Fast setting

Do not configure a secure port as part of an EtherChannel or the reverse.

Do not configure a port that is an active or a not-yet-active member of an EtherChannel as an IEEE 802.1x port. If you try to enable IEEE 802.1x on an EtherChannel port, an error message appears, and IEEE 802.1x is not enabled.

If EtherChannels are configured on switch interfaces, remove the EtherChannel configuration from the interfaces before globally enabling IEEE 802.1x on a switch by using the dot1x system-auth-control global configuration command.

An EtherChannel supports the same allowed range of VLANs on all the interfaces in a trunking Layer 2 EtherChannel. When configuring an interface for PAgP, if the allowed range of VLANs is not the same, the interfaces do not form an EtherChannel even when PAgP is set to the auto or desirable mode. When configuring an interface for LACP, if the allowed range of VLANs is not the same, the interfaces do not form an EtherChannel even when LACP is set to the active or passive mode.

Interfaces with different spanning-tree path costs can form an EtherChannel if they are otherwise compatibly configured. Setting different spanning-tree path costs does not, by itself, make interfaces incompatible for the formation of an EtherChannel.

Configure only PAgP-type EtherChannels on Catalyst 2950 Long-Reach Ethernet (LRE) switch ports.

Configuring Layer 2 EtherChannels

You configure Layer 2 EtherChannels by configuring the Ethernet interfaces with the channel-group interface configuration command, which creates the port-channel logical interface. You cannot put a Layer 2 interface into a manually created port-channel interface.


Note Layer 2 interfaces must be connected and functioning for the software to create port-channel interfaces.


Beginning in privileged EXEC mode, follow these steps to assign a Layer 2 Ethernet interface to a Layer 2 EtherChannel:

 
Command
Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

interface interface-id

Specify a physical interface to configure, and enter interface configuration mode.

Valid interfaces include physical interfaces.

Up to eight interfaces of the same type and speed can be configured for the same group.

Step 3 

switchport mode {access | trunk}

switchport access vlan vlan-id

Assign all interfaces as static-access ports in the same VLAN, or configure them as trunks.

If you configure the interface as a static-access port, assign it to only one VLAN. The range is 1 to 4094.

Step 4 

channel-group channel-group-number mode
{{auto [non-silent] | desirable [non-silent] | on} | {active | passive}}

Assign the port to a channel group, and specify the PAgP or LACP mode.

For channel-group-number, the range is 1 to 6. Each EtherChannel can have up to eight compatibly configured Ethernet interfaces.

For mode, select one of these keywords:

auto—Enables PAgP only if a PAgP device is detected. It places an interface into a passive negotiating state, in which the interface responds to PAgP packets it receives but does not start PAgP packet negotiation.

desirable—Unconditionally enables PAgP. It places an interface into an active negotiating state, in which the interface starts negotiations with other interfaces by sending PAgP packets.

on—Forces the interface to channel without PAgP. With the on mode, a usable EtherChannel exists only when an interface group in the on mode is connected to another interface group in the on mode.

non-silent—If your switch is connected to a partner that is PAgP-capable, you can configure the switch interface for nonsilent operation. You can configure an interface with the non-silent keyword for use with the auto or desirable mode. If you do not specify non-silent with the auto or desirable mode, silent is assumed. The silent setting is for connections to file servers or packet analyzers. This setting allows PAgP to operate, to attach the interface to a channel group, and to use the interface for transmission.

activeEnables LACP only if an LACP device is detected. It places an interface into an active negotiating state, in which the interface starts negotiations with other interfaces by sending LACP packets.

passive—Enables LACP on an interface and places it into a passive negotiating state, in which the interface responds to LACP packets that it receives, but does not start LACP packet negotiation.

For information on compatible PAgP and LACP modes for the switch and its partner, see the "PAgP and LACP Modes" section.

Step 5 

end

Return to privileged EXEC mode.

Step 6 

show running-config

Verify your entries.

Step 7 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

To remove a port from the EtherChannel group, use the no channel-group interface configuration command. If you delete the EtherChannel by using the no interface port-channel global configuration command without removing the physical interfaces, the physical interfaces are shutdown. If you do not want the member physical interfaces to shut down, remove the physical interfaces before deleting the EtherChannel.

This example shows how to assign a range of interfaces as static-access ports in VLAN 10 to channel 5 with the PAgP mode desirable:

Switch# configure terminal 
Switch(config)# interface range fasttethernet0/1 -2 
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 10
Switch(config-if-range)# channel-group 5 mode desirable 
Switch(config-if-range)# end 

Configuring EtherChannel Load Balancing

This section describes how to configure EtherChannel load balancing by using source-based or destination-based forwarding methods. For more information, see the "Understanding Load Balancing and Forwarding Methods" section.

Beginning in privileged EXEC mode, follow these steps to configure EtherChannel load balancing:

 
Command
Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

port-channel load-balance method

Configure an EtherChannel load-balancing method value:

src-mac—Load distribution using the source-MAC address. Packets to the same destination are sent on the same port, but packets to different destinations might be send on different ports in the channel.

dst-mac—Load distribution using the destination-MAC address. Packets from different hosts use different ports in the channel, but packets from the same host use the same port in the channel.

The default is src-mac.

If the link partner to the switch is a physical learner, use one of these load-distribution methods:

If the channel-group interface configuration command is set to auto or desirable, the switch automatically uses the load distribution method based on the source-MAC address, regardless of the configured load-distribution method.

If the channel-group interface configuration command is set to on, set the load-distribution method based on the source-MAC address by using the port-channel load-balance src-mac global configuration command.

Step 3 

end

Return to privileged EXEC mode.

Step 4 

show etherchannel load-balance

Verify your entries.

Step 5 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

To return EtherChannel load balancing to the default configuration, use the no port-channel load-balance global configuration command.

Configuring the PAgP Learn Method and Priority

Network devices are classified as PAgP physical learners or aggregate-port learners. A device is a physical learner if it learns addresses by physical ports and directs transmissions based on that knowledge. A device is an aggregate-port learner if it learns addresses by aggregate ports.

For compatibility with Catalyst 1900 series switches, configure the Catalyst 2950 and Catalyst 2955 switch for source-MAC load distribution.

The Catalyst 2950 or Catalyst 2955 switch supports address learning only on aggregate ports even though the physical-port keyword is provided in the command-line interface (CLI). The pagp learn-method and the pagp port-priority interface configuration command have no effect on the switch hardware.


Note You should not set the learn method to physical-port because the switch is an aggregate-learning device.


If the link partner to the switch is a physical learner that has the channel-group interface configuration command set to auto or desirable, the switch automatically uses the load-distribution method based on the source-MAC address, regardless of the configured load distribution method.

If the link partner to the Catalyst 2950 or Catalyst 2955 switch is a physical learner that has the channel-group interface configuration command set to on, set the load-distribution method based on the source-MAC address by using the port-channel load-balance src-mac global configuration command.

Configuring the LACP Port Priority

You can set the priority for each port in an EtherChannel that is configured for LACP by using the lacp port-priority privileged EXEC command. The range is from 1 to 65535. Beginning in privileged EXEC mode, follow these steps to configure the LACP port priority:

 
Command
Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

interface interface-id

Specify the interface for transmission, and enter interface configuration mode.

Step 3 

lacp port-priority priority-value

Select the LACP port priority value.

For priority-value, the range is 1 to 65535. By default, the priority value is 32768. The lower the range, the more likely that the interface will be used for LACP transmission.

Step 4 

end

Return to privileged EXEC mode.

Step 5 

show running-config

or

show lacp channel-group-number internal

Verify your entries.

Step 6 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

Configuring Hot Standby Ports

When enabled, LACP tries to configure the maximum number of LACP-compatible ports in a channel, up to a maximum of 16 ports. Only eight LACP links can be active at one time. Any additional links are put in a hot standby state. If one of the active links becomes inactive, a link that is in hot standby mode becomes active in its place.

If more than eight links are configured for an EtherChannel group, the software determines which of the hot standby ports to make active based on:

LACP port-priority

Port ID

All ports default to the same port priority. You can change the port priority of LACP EtherChannel ports to specify which hot standby links become active first by using the lacp port-priority interface configuration command to set the port priority to a value lower than the default of 32768.

The hot standby ports that have lower port numbers become active in the channel first unless the port priority is configured to be a lower number than the default value of 32768.


Note If LACP is not able to aggregate all the ports that are compatible (for example, the remote system might have more restrictive hardware limitations), all the ports that cannot be actively included in the EtherChannel are put in hot standby state and are used only if one of the channeled ports fails.


Configuring the LACP System Priority

You can set the system priority for all of the EtherChannels that are configured for LACP by using the lacp system-priority privileged EXEC command. The range is from 1 to 65535.


Note The lacp system-priority command is global. You cannot set a system priority for each LACP-configured channel separately.


We recommend using this command only when there are a combination of LACP-configured EtherChannels that are in both active and standby modes.

Beginning in privileged EXEC mode, follow these steps to configure the LACP system priority:

 
Command
Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

lacp system-priority priority-value

Select the LACP system priority value.

For priority-value, the range is 1 to 65535. By default, the priority value is 32768. The lower the range, the higher the system priority. The switch with the lower system priority value determines which links between LACP partner switches are active and which are in standby for each LACP EtherChannel.

Step 3 

end

Return to privileged EXEC mode.

Step 4 

show running-config

or

show lacp channel-group-number internal

Verify your entries.

Step 5 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

Displaying EtherChannel, PAgP, and LACP Status

You can use the privileged EXEC commands described in Table 30-3Table 30-3Table 30-3 to display EtherChannel, PAgP, and LACP status information:

Table 30-3 Commands for Displaying EtherChannel, PAgP, and LACP Status 

Command
Description

show etherchannel [channel-group-number] {detail | load-balance | port | port-channel | summary}

Displays EtherChannel information in a detailed and one-line summary form. Also displays the load-balance or frame-distribution scheme, port, and port-channel information.

show pagp [channel-group-number] {counters | internal | neighbor}1

Displays PAgP information such as traffic information, the internal PAgP configuration, and neighbor information.

show lacp [channel-group-number] {counters | internal | neighbor}2

Displays LACP information such as traffic information, the internal PAgP configuration, and neighbor information.

1 You can clear PAgP channel-group information and traffic filters by using the clear pagp {channel-group-number [counters] | counters} privileged EXEC command.

2 You can clear LACP channel-group information and traffic filters by using the clear lacp {channel-group-number [counters] | counters} privileged EXEC command.


For detailed information about the fields in the command outputs, see the command reference for this release.