Etherchannel Cisco
Etherchannel Cisco
Configuring EtherChannels
This chapter describes how to configure EtherChannels on Layer 2 or Layer 3 LAN ports in
Cisco IOS Software Release 12.2SX.
Note For complete syntax and usage information for the commands used in this chapter, see the Cisco IOS
Software Releases 12.2SX Command References at this URL:
http://www.cisco.com/en/US/docs/ios/mcl/122sx_mcl.html
Understanding EtherChannels
These sections describe how EtherChannels work:
• EtherChannel Feature Overview, page 15-1
• Understanding EtherChannel Configuration, page 15-2
• Understanding Port Channel Interfaces, page 15-4
• Understanding LACP 1:1 Redundancy, page 15-4
• Understanding Load Balancing, page 15-5
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 15-1
Chapter 15 Configuring EtherChannels
Understanding EtherChannels
Note The network device to which a switch is connected may impose its own limits on the number of ports in
an EtherChannel.
If a segment within an EtherChannel fails, traffic previously carried over the failed link switches to the
remaining segments within the EtherChannel. When a failure occurs, the EtherChannel feature sends a
trap that identifies the switch, the EtherChannel, and the failed link. Inbound broadcast and multicast
packets on one segment in an EtherChannel are blocked from returning on any other segment of the
EtherChannel.
Mode Description
on Mode that forces the LAN port to channel unconditionally. In the on mode, a usable
EtherChannel exists only when a LAN port group in the on mode is connected to another
LAN port group in the on mode. Because ports configured in the on mode do not negotiate,
there is no negotiation traffic between the ports. You cannot configure the on mode with
an EtherChannel protocol. If one end uses the on mode, the other end must also.
auto PAgP mode that places a LAN port into a passive negotiating state, in which the port
responds to PAgP packets it receives but does not initiate PAgP negotiation. (Default)
desirable PAgP mode that places a LAN port into an active negotiating state, in which the port
initiates negotiations with other LAN ports by sending PAgP packets.
passive LACP mode that places a port into a passive negotiating state, in which the port responds
to LACP packets it receives but does not initiate LACP negotiation. (Default)
active LACP mode that places a port into an active negotiating state, in which the port initiates
negotiations with other ports by sending LACP packets.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
15-2 OL-13013-02
Chapter 15 Configuring EtherChannels
Understanding EtherChannels
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 15-3
Chapter 15 Configuring EtherChannels
Understanding EtherChannels
Note The LACP system ID is the combination of the LACP system priority value and the MAC
address of the switch.
• LACP port priority—You must configure an LACP port priority on each port configured to use
LACP. The port priority can be configured automatically or through the CLI (see the “Configuring
Channel Groups” section on page 15-8). 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 hardware limitation that prevents all compatible ports from aggregating.
• LACP administrative key—LACP automatically configures an administrative key value equal to the
channel group identification 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 data rate, duplex capability, and point-to-point or shared
medium
– Configuration restrictions that you establish
On ports configured to use LACP, LACP tries to configure the maximum number of compatible ports in
an EtherChannel, up to the maximum allowed by the hardware (eight ports). If LACP cannot aggregate
all the ports that are compatible (for example, the remote system might have more restrictive hardware
limitations), then all the ports that cannot be actively included in the channel are put in hot standby state
and are used only if one of the channeled ports fails. You can configure an additional 8 standby ports
(total of 16 ports associated with the EtherChannel).
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
15-4 OL-13013-02
Chapter 15 Configuring EtherChannels
EtherChannel Feature Configuration Guidelines and Restrictions
After you configure an EtherChannel, the configuration that you apply to the port channel interface
affects the EtherChannel; the configuration that you apply to the LAN ports affects only the LAN port
where you apply the configuration. To change the parameters of all ports in an EtherChannel, apply the
configuration commands to the port channel interface, for example, Spanning Tree Protocol (STP)
commands or commands to configure a Layer 2 EtherChannel as a trunk.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 15-5
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
• An EtherChannel will not form if one of the LAN ports is a Switched Port Analyzer (SPAN)
destination port.
• For Layer 3 EtherChannels, assign Layer 3 addresses to the port channel logical interface, not to the
LAN ports in the channel.
• For Layer 2 EtherChannels:
– Assign all LAN ports in the EtherChannel to the same VLAN or configure them as trunks.
– If you configure an EtherChannel from trunking LAN ports, verify that the trunking mode is the
same on all the trunks. LAN ports in an EtherChannel with different trunk modes can operate
unpredictably.
– An EtherChannel supports the same allowed range of VLANs on all the LAN ports in a trunking
Layer 2 EtherChannel. If the allowed range of VLANs is not the same, the LAN ports do not
form an EtherChannel.
– LAN ports with different STP port path costs can form an EtherChannel as long they are
compatibly configured with each other. If you set different STP port path costs, the LAN ports
are not incompatible for the formation of an EtherChannel.
– An EtherChannel will not form if protocol filtering is set differently on the LAN ports.
• After you configure an EtherChannel, the configuration that you apply to the port channel interface
affects the EtherChannel. The configuration that you apply to the LAN ports affects only the LAN
port where you apply the configuration.
• When QoS is enabled, enter the no mls qos channel-consistency port-channel interface command
to support EtherChannels that have ports with and without strict-priority queues.
Caution Serious traffic problems can result from mixing manual mode with PAgP or LACP modes, or with a port
with no EtherChannel configured. For example, if a port configured in on mode is connected to another
port configured in desirable mode, or to a port not configured for EtherChannel, a bridge loop is created
and a broadcast storm can occur. If one end uses the on mode, the other end must also.
Configuring EtherChannels
These sections describe how to configure EtherChannels:
• Configuring Port Channel Logical Interfaces for Layer 3 EtherChannels, page 15-7
• Configuring Channel Groups, page 15-8
• Configuring EtherChannel Load Balancing, page 15-10
• Configuring EtherChannel Hash-Distribution Algorithm, page 15-11
• Configuring the EtherChannel Min-Links Feature, page 15-12
• Configuring LACP 1:1 Redundancy, page 15-13
Note Make sure that the LAN ports are configured correctly (see the “EtherChannel Feature Configuration
Guidelines and Restrictions” section on page 15-5).
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
15-6 OL-13013-02
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Note • When configuring Layer 2 EtherChannels, you cannot put Layer 2 LAN ports into manually created
port channel logical interfaces. If you are configuring a Layer 2 EtherChannel, do not perform the
procedures in this section (see the “Configuring Channel Groups” section on page 15-8).
• When configuring Layer 3 EtherChannels, you must manually create the port channel logical
interface as described in this section, and then put the Layer 3 LAN ports into the channel group (see
the “Configuring Channel Groups” section on page 15-8).
• To move an IP address from a Layer 3 LAN port to an EtherChannel, you must delete the IP address
from the Layer 3 LAN port before configuring it on the port channel logical interface.
To create a port channel interface for a Layer 3 EtherChannel, perform this task:
Command Purpose
Step 1 Router(config)# interface port-channel group_number Creates the port channel interface.
Router(config)# no interface port-channel group_number Deletes the port channel interface.
Step 2 Router(config-if)# ip address ip_address mask Assigns an IP address and subnet mask to the
EtherChannel.
Step 3 Router(config-if)# end Exits configuration mode.
Step 4 Router# show running-config interface port-channel Verifies the configuration.
group_number
The group_number can be 1 through 256, up to a maximum of 128 port-channel interfaces. This example
shows how to create port channel interface 1:
Router# configure terminal
Router(config)# interface port-channel 1
Router(config-if)# ip address 172.32.52.10 255.255.255.0
Router(config-if)# end
This example shows how to verify the configuration of port channel interface 1:
Router# show running-config interface port-channel 1
Building configuration...
Current configuration:
!
interface Port-channel1
ip address 172.32.52.10 255.255.255.0
no ip directed-broadcast
end
Router#
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 15-7
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Note • When configuring Layer 3 EtherChannels, you must manually create the port channel logical
interface first (see the “Configuring Port Channel Logical Interfaces for Layer 3 EtherChannels”
section on page 15-7), and then put the Layer 3 LAN ports into the channel group as described in
this section.
• When configuring Layer 2 EtherChannels, configure the LAN ports with the channel-group
command as described in this section, which automatically creates the port channel logical interface.
You cannot put Layer 2 LAN ports into a manually created port channel interface.
• For Cisco IOS to create port channel interfaces for Layer 2 EtherChannels, the Layer 2 LAN ports
must be connected and functioning.
To configure channel groups, perform this task for each LAN port:
Command Purpose
1
Step 1 Router(config)# interface type slot/port Selects a LAN port to configure.
Step 2 Router(config-if)# no ip address Ensures that there is no IP address assigned to the LAN
port.
Step 3 Router(config-if)# channel-protocol (lacp | pagp} (Optional) On the selected LAN port, restricts the
channel-group command to the EtherChannel protocol
configured with the channel-protocol command.
Router(config-if)# no channel-protocol Removes the restriction.
Step 4 Router(config-if)# channel-group group_number Configures the LAN port in a port channel and specifies
mode {active | auto | desirable | on | passive} the mode (see Table 15-1 on page 15-2). PAgP supports
only the auto and desirable modes. LACP supports only
the active and passive modes.
Router(config-if)# no channel-group Removes the LAN port from the channel group.
Step 5 Router(config-if)# lacp port-priority (Optional for LACP) Valid values are 1 through 65535.
priority_value Higher numbers have lower priority. The default is 32768.
Router(config-if)# no lacp port-priority Reverts to the default.
Step 6 Router(config-if)# end Exits configuration mode.
1
Step 7 Router# show running-config interface type Verifies the configuration.
slot/port
Router# show interfaces type1 slot/port
etherchannel
1. type = fastethernet, gigabitethernet, or tengigabitethernet
This example shows how to configure Fast Ethernet ports 5/6 and 5/7 into port channel 2 with PAgP
mode desirable:
Router# configure terminal
Router(config)# interface range fastethernet 5/6 -7
Router(config-if)# channel-group 2 mode desirable
Router(config-if)# end
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
15-8 OL-13013-02
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Note See the “Configuring a Range of Interfaces” section on page 8-4 for information about the range
keyword.
This example shows how to verify the configuration of port channel interface 2:
Router# show running-config interface port-channel 2
Building configuration...
Current configuration:
!
interface Port-channel2
no ip address
switchport
switchport access vlan 10
switchport mode access
end
Router#
This example shows how to verify the configuration of Fast Ethernet port 5/6:
Router# show running-config interface fastethernet 5/6
Building configuration...
Current configuration:
!
interface FastEthernet5/6
no ip address
switchport
switchport access vlan 10
switchport mode access
channel-group 2 mode desirable
end
Router# show interfaces fastethernet 5/6 etherchannel
Port state = Down Not-in-Bndl
Channel group = 12 Mode = Desirable-Sl Gcchange = 0
Port-channel = null GC = 0x00000000 Pseudo port-channel = Po1
2
Port index = 0 Load = 0x00 Protocol = PAgP
Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa5/2 d U1/S1 1s 0 128 Any 0
This example shows how to verify the configuration of port channel interface 2 after the LAN ports have
been configured:
Router# show etherchannel 12 port-channel
Port-channels in the group:
----------------------
Port-channel: Po12
------------
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 15-9
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Router#
Command Purpose
Step 1 Router(config)# lacp system-priority (Optional for LACP) Valid values are 1 through 65535.
priority_value Higher numbers have lower priority. The default is 32768.
Router(config)# no lacp system-priority Reverts to the default.
Step 2 Router(config)# end Exits configuration mode.
Step 3 Router# show lacp sys-id Verifies the configuration.
The system priority is displayed first, followed by the MAC address of the switch.
Command Purpose
Step 1 Router(config)# port-channel per-module (Optional) Enables the ability to specify the
load-balance load-balancing method on a per-module basis.
Step 2 Router(config)# port-channel load-balance Configures the EtherChannel load-balancing method. The
{src-mac | dst-mac | src-dst-mac | src-ip | method is globally applied to all port channels.
dst-ip | src-dst-ip | src-port | dst-port |
src-dst-port} [module slot]
Optionally, you can configure the load-balancing method
for a specific module.
Router(config)# no port-channel load-balance Reverts to default EtherChannel load balancing.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
15-10 OL-13013-02
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Command Purpose
Step 3 Router(config)# end Exits configuration mode.
Step 4 Router# show etherchannel load-balance Verifies the configuration.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 15-11
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Note Some external devices require the fixed algorithm. For example, the service control engine (SCE)
requires incoming and outgoing packets to use the same port.
Command Purpose
Step 1 Router(config)# port-channel hash-distribution Sets the hash distribution algorithm to adaptive or
{adaptive | fixed} fixed.
Router(config)# {no | default} port-channel Resets the hash distribution algorithm to the default
hash-distribution (fixed).
Step 2 Router(config)# end Exits configuration mode.
This example shows how to globally set the hash distribution to adaptive:
Router(config)# port-channel hash-distribution adaptive
Command Purpose
Step 1 Router(config)# interface port-channel Enters interface configuration mode for the port channel.
channel-num
Step 2 Router(config-if)# port-channel port Sets the hash distribution algorithm for this interface
hash-distribution {adaptive | fixed}
Router(config-if)# {no | default} port-channel Resets the hash distribution algorithm for this interface to
port hash-distribution the default (fixed).
Step 3 Router(config-if)# end Exits interface configuration mode.
This example shows how to set the hash distribution algorithm to adaptive on port channel 10:
Router (config)# interface port-channel 10
Router (config-if)# port-channel port hash-distribution adaptive
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
15-12 OL-13013-02
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Command Purpose
Step 1 Router(config)# interface port-channel group_number Selects an LACP port channel interface.
Step 2 Router(config-if)# port-channel min-links number Configures the minimum number of member ports that
must be in the link-up state and bundled in the
EtherChannel for the port channel interface to
transition to the link-up state.
Router(config-if)# no port-channel min-links Reverts to the default number of active member ports
(one).
Step 3 Router(config-if)# end Exits configuration mode.
Step 4 Router# show running-config interface port-channel Verifies the configuration.
group_number
Router# show interfaces type1 slot/port etherchannel
1. type = fastethernet, gigabitethernet, or tengigabitethernet
Note Although the EtherChannel min-links feature works correctly when configured only on one end of an
EtherChannel, for best results, configure the same number of minimum links on both ends of the
EtherChannel.
This example shows how to configure port channel interface 1 to be inactive if fewer than two member
ports are active in the EtherChannel:
Router# configure terminal
Router(config)# interface port-channel 1
Router(config-if)# port-channel min-links 2
Router(config-if)# end
Command Purpose
Step 1 Router(config)# interface port-channel group_number Selects an LACP port channel interface.
Step 1 Router(config-if)# lacp fast-switchover Enables the fast switchover feature for this
EtherChannel.
Step 2 Router(config-if)# lacp max-bundle 1 Sets the maximum number of active member ports to be
one.
Step 3 Router(config-if)# port-channel min-links 1 Sets the minimum number of active member ports to be
one.
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
OL-13013-02 15-13
Chapter 15 Configuring EtherChannels
Configuring EtherChannels
Command Purpose
Step 4 Router(config-if)# end Exits configuration mode.
Step 5 Router# show running-config interface port-channel Verifies the configuration.
group_number
Router# show interfaces type1 slot/port etherchannel
1. type = fastethernet, gigabitethernet, or tengigabitethernet
Note For the LACP 1:1 redundancy feature to work correctly, especially the fast switchover capability, the
feature needs to be enabled at both ends of the EtherChannel.
This example shows how to configure an LACP EtherChannel with 1:1 redundancy. Fast Ethernet 5/6 is
the active link, as it is configured with a higher port priority:
Router# configure terminal
Router# lacp system-priority 33000
Router(config)# interface range fastethernet 5/6 -7
Router(config-if)# channel-protocol lacp
Router(config-if)# channel-group 1 mode active
Router(config)# interface fastethernet 5/6
Router(config-if)# lacp port-priority 33000
Router(config)# interface port-channel 1
Router(config-if)# lacp fast-switchover
Router(config-if)# lacp max-bundle 1
Router(config-if)# port-channel min-links 1
Router(config-if)# end
Cisco IOS Software Configuration Guide, Release 12.2(33)SXH and Later Releases
15-14 OL-13013-02