Configuring Etherchannel and Link State Tracking
Configuring Etherchannel and Link State Tracking
This chapter describes how to use the command-line interface (CLI) to configure EtherChannel on the
Catalyst 4500 series switch Layer 2 or Layer 3 interfaces. It also provides guidelines, procedures, and
configuration examples.
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. This chapter also describes how to configure link-state tracking.
This chapter includes the following major sections:
About EtherChannel, page 24-2
EtherChannel Configuration Guidelines and Restrictions, page 24-5
Configuring EtherChannel, page 24-6
Displaying EtherChannel to a Virtual Switch System, page 24-16
Understanding Link-State Tracking, page 24-18
Configuring Link-State Tracking, page 24-21
Note The commands in the following sections can be used on all Ethernet interfaces on a Catalyst 4500 series
switch, including the uplink ports on the supervisor engine.
Note For complete syntax and usage information for the switch commands used in this chapter, first look at
the Cisco Catalyst 4500 Series Switch Command Reference and related publications at this location:
http://www.cisco.com/en/US/products//hw/switches/ps4324/index.html
If the command is not found in the Catalyst 4500 Series Switch Command Reference, it will be found in
the larger Cisco IOS library. Refer to the Cisco IOS Command Reference and related publications at this
location:
http://www.cisco.com/en/US/products/ps6350/index.html
About EtherChannel
EtherChannel bundles up to eight individual Ethernet links into a single logical ink that provides an
aggregate bandwidth of up to 800 Mbps (Fast EtherChannel), 8 Gbps (Gigabit EtherChannel), or 80
Gbps (10 Gigabit EtherChannel) between a Catalyst 4500 or 4500X series switch and another switch or
host.
Note Because some linecards have a maximum bandwidth capacity toward the backplane, they can limit the
aggregate bandwidth of an Etherchannel when all the Etherchannel members belong to the same
linecard.
A Catalyst 4500 series switch supports a maximum of 64 EtherChannels. You can form an EtherChannel
with up to eight compatibly configured Ethernet interfaces across modules in a Catalyst 4500 series
switch. All interfaces in each EtherChannel must be the same speed and must be configured as either
Layer 2 or Layer 3 interfaces.
Note The network device to which a Catalyst 4500 series switch is connected may impose its own limits on
the number of interfaces 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 the segment fails, an SNMP trap is sent, identifying
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.
Note The port channel link failure switchover for the Catalyst 4500 series switch was measured at 50
milliseconds, which provides SONET-like link failure switchover time.
Note QoS does not propagate to members. The defaults, QoS cos = 0 and QoS dscp = 0, apply on the port
channel. Input or output policies applied on individual interfaces are ignored.
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 physical interfaces affects only the
interface where you apply the configuration. To change the parameters of all ports in an EtherChannel,
apply configuration commands to the port channel interface (such commands can be STP commands or
commands to configure a Layer 2 EtherChannel as a trunk).
Configuring EtherChannels
These subsections describe how EtherChannels are configured:
EtherChannel Configuration Overview, page 24-3
Manual EtherChannel Configuration, page 24-3
PAgP EtherChannel Configuration, page 24-3
IEEE 802.3ad LACP EtherChannel Configuration, page 24-4
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.
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.
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.
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.
The protocol learns the capabilities of LAN port groups dynamically and informs the other LAN ports.
Once PAgP identifies correctly matched Ethernet links, it facilitates grouping the links into an
EtherChannel. The EtherChannel is then added to the spanning tree as a single bridge port.
Both the auto and desirable modes allow PAgP to negotiate between LAN ports to determine if they can
form an EtherChannel, based on criteria such as port speed and trunking state. Layer 2 EtherChannels
also use VLAN numbers.
LAN ports can form an EtherChannel when they are in different PAgP modes if the modes are
compatible. For example:
A LAN port in desirable mode can form an EtherChannel successfully with another LAN port that
is in desirable mode.
A LAN port in desirable mode can form an EtherChannel with another LAN port in auto mode.
A LAN port in auto mode cannot form an EtherChannel with another LAN port that is also in auto
mode because neither port initiates negotiation.
Note The LACP system ID is the combination of the LACP system priority value and the MAC
address of the switch.
LACP port priorityYou 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
Layer 2 EtherChannels section on page 24-10. LACP uses the port priority with the port number to
form the port identifier.
LACP administrative keyLACP 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 ports 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
LACP tries to configure the maximum number of compatible ports in an EtherChannel up to the
maximum allowed by the hardware (eight ports). If a port cannot be actively included in a channel, it is
not included automatically if a channelled port fails.
Note Standby and sub-channeling are not supported in LACP and PAgP.
Load Balancing
EtherChannel can balance the traffic load across the links in the channel by reducing part of the binary
pattern formed from the addresses or ports in the frame to a numerical value that selects one of the links
in the channel. To balance the load, EtherChannel uses MAC addresses, IP addresses, or Layer 4 port
numbers, and either the message source or message destination, or both.
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.
Note Load balancing can only be configured globally. As a result, all channels (manually configured, PagP,
or LACP) use the same load-balancing method.
For additional information on load balancing, see the Configuring EtherChannel Load Balancing
section on page 24-14.
Configuring EtherChannel
These sections describe how to configure EtherChannel:
Configuring Layer 3 EtherChannels, page 24-6
Configuring Layer 2 EtherChannels, page 24-10
Configuring LACP Standalone or Independent Mode, page 24-12
Configuring the LACP System Priority and System ID, page 24-13
Configuring EtherChannel Load Balancing, page 24-14
Removing an Interface from an EtherChannel, page 24-15
Removing an EtherChannel, page 24-15
Note Ensure that the interfaces are configured correctly. See the EtherChannel Configuration Guidelines and
Restrictions section on page 24-5.
Note To move an IP address from a physical interface to an EtherChannel, you must delete the IP address from
the physical interface before configuring it on the port channel interface.
To create a port channel interface for a Layer 3 EtherChannel, perform this task:
Command Purpose
Step 1 Switch(config)# interface port-channel Creates the port channel interface. The value for
port_channel_number port_channel_number can range from 1 to 64.
Step 2 Switch(config-if)# ip address ip_address mask Assigns an IP address and subnet mask to the
EtherChannel.
Step 3 Switch(config-if)# end Exits configuration mode.
Step 4 Switch# show running-config interface Verifies the configuration.
port-channel port_channel_number
This example shows how to verify the configuration of port channel interface 1:
Switch# 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
Switch#
Command Purpose
Step 1 Switch(config)# interface {fastethernet | Selects a physical interface to configure.
gigabitethernet | tengigabitethernet} slot/port
Step 2 Switch(config-if)# no switchport Makes this a Layer 3 routed port.
Command Purpose
Step 3 Switch(config-if)# no ip address Ensures that no IP address is assigned to the physical
interface.
Step 4 Switch(config-if)# channel-group port_channel_number Configures the interface in a port channel and
mode {active | on | auto | passive | desirable} specifies the PAgP or LACP mode.
If you use PAgP, enter the keywords auto or
desirable.
If you use LACP, enter the keywords active or
passive.
Step 5 Switch(config-if)# end Exits configuration mode.
Step 6 Switch# show running-config interface port-channel Verifies the configuration.
port_channel_number
This example shows how to configure Fast Ethernet interfaces 5/4 and 5/5 into port channel 1 with PAgP
mode desirable:
Switch# configure terminal
Switch(config)# interface range fastethernet 5/4 - 5 (Note: Space is mandatory.)
Switch(config-if)# no switchport
Switch(config-if)# no ip address
Switch(config-if)# channel-group 1 mode desirable
Switch(config-if)# end
Note See the Configuring a Range of Interfaces section on page 7-4 for information about the range
keyword.
The following two examples show how to verify the configuration of Fast Ethernet interface 5/4:
Switch# show running-config interface fastethernet 5/4
Building configuration...
Current configuration:
!
interface FastEthernet5/4
no ip address
no switchport
no ip directed-broadcast
channel-group 1 mode desirable
end
Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa5/4 SC U6/S7 30s 1 128 Any 55
Partner's information:
Switch#
This example shows how to verify the configuration of port channel interface 1 after the interfaces have
been configured:
Switch# show etherchannel 1 port-channel
Channel-group listing:
----------------------
Group: 1
------------
Switch#
This example shows how to display a one-line summary per channel group:
Switch# show etherchannel summary
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
Number of aggregators: 2
Note Cisco IOS software creates port channel interfaces for Layer 2 EtherChannels when you configure
Layer 2 Ethernet interfaces with the channel-group command.
To configure Layer 2 Ethernet interfaces as Layer 2 EtherChannels, perform this task for each interface:
Command Purpose
Step 1 Switch(config)# interface {fastethernet | gigabitethernet Selects a physical interface to configure.
| tengigabitethernet} slot/port
Step 2 Switch(config-if)# channel-group port_channel_number mode Configures the interface in a port channel and
{active | on | auto | passive | desirable} specifies the PAgP or LACP mode.
If you use PAgP, enter the keywords auto or
desirable.
If you use LACP, enter the keywords active or
passive.
Step 3 Switch(config-if)# end Exits configuration mode.
Step 4 Switch# show running-config interface {fastethernet | Verifies the configuration.
gigabitethernet} slot/port
This example shows how to configure Fast Ethernet interfaces 5/6 and 5/7 into port channel 2 with PAgP
mode desirable:
Switch# configure terminal
Switch(config)# interface range fastethernet 5/6 - 7 (Note: Space is mandatory.)
Switch(config-if-range)# channel-group 2 mode desirable
Switch(config-if-range)# end
Switch# end
Note See the Configuring a Range of Interfaces section on page 7-4 for information about the range
keyword.
This example shows how to verify the configuration of port channel interface 2:
Switch# show running-config interface port-channel 2
Building configuration...
Current configuration:
!
interface Port-channel2
switchport access vlan 10
switchport mode access
end
Switch#
The following two examples show how to verify the configuration of Fast Ethernet interface 5/6:
Switch# show running-config interface fastethernet 5/6
Building configuration...
Current configuration:
!
interface FastEthernet5/6
switchport access vlan 10
switchport mode access
channel-group 2 mode desirable
end
Partner's information:
This example shows how to verify the configuration of port channel interface 2 after the interfaces have
been configured:
Switch# show etherchannel 2 port-channel
Port-channels in the group:
----------------------
Port-channel: Po2
------------
0 00 Fa5/7
Switch#
Command Purpose
Step 1 Switch(config)# no port-channel standalone-disable Enables the LACP standalone or independent
mode.
Switch(config)# port-channel standalone-disable Reverts to the default.
Step 2 Switch(config-if)# end Exits configuration mode.
Step 3 Switch# show running configuration {fastethernet | Verifies the configuration.
gigabitethernet} slot/port port-channel
port_channel_number
This example shows how to verify the configuration of port channel interface 1:
Switch# show running-config interface port-channel 1
Building configuration...
Current configuration:
!
interface Port-channel1
switchport
no port-channel standalone-disable
end
Switch#
This example shows how to verify the state of port channel interface 1:
Switch# show etherchannel 1 port-channel
Port-channels in the group:
---------------------------
Port-channel: Po13 (Primary Aggregator)
------------
Age of the Port-channel = 0d:00h:07m:57s
Logical slot/port = 11/13 Number of ports = 0
Port state = Port-channel Ag-Not-Inuse
Protocol = LACP
Port security = Disabled
Standalone = Enabled (independent mode)
Switch#
Command Purpose
Step 1 Switch(config)# lacp system-priority (Optional for LACP) Sets the LACP system priority and
priority_value system ID.
Valid values are 1 through 65535. Higher numbers have
lower priority. The default is 32768.
Switch(config)# no system port-priority Reverts to the default.
Step 2 Switch(config)# end Exits configuration mode.
Step 3 Switch# show lacp sys-id Verifies the configuration.
The system priority is displayed first, followed by the MAC address of the switch.
Note Load balancing can only be configured globally. As a result, all channels (manually configured, PagP,
or LACP) use the same load-balancing method.
Command Purpose
Step 1 Switch(config)# [no] port-channel load-balance Configures EtherChannel load balancing.
{src-mac | dst-mac | src-dst-mac | src-ip |
dst-ip | src-dst-ip | src-port | dst-port | Use the no keyword to return EtherChannel load
src-dst-port} balancing to the default configuration.
Step 2 Switch(config)# end Exits configuration mode.
Step 3 Switch# show etherchannel load-balance Verifies the configuration.
Command Purpose
Step 1 Switch(config)# interface {fastethernet | Selects a physical interface to configure.
gigabitethernet | tengigabitethernet} slot/port
Step 2 Switch(config-if)# no channel-group Removes the interface from the port channel interface.
Step 3 Switch(config-if)# end Exits configuration mode.
Step 4 Switch# show running-config interface Verifies the configuration.
{fastethernet | gigabitethernet |
tengigabitethernet} slot/port
Switch# show interface {fastethernet |
gigabitethernet | tengigabitethernet} slot/port
etherchannel
This example shows how to remove Fast Ethernet interfaces 5/4 and 5/5 from port channel 1:
Switch# configure terminal
Switch(config)# interface range fastethernet 5/4 - 5 (Note: Space is mandatory.)
Switch(config-if)# no channel-group 1
Switch(config-if)# end
Removing an EtherChannel
If you remove an EtherChannel, the member ports are shut down and removed from the channel group.
Note If you want to change an EtherChannel from Layer 2 to Layer 3, or Layer 3 to Layer 2, you must remove
the EtherChannel and recreate it in the desired configuration.
Command Purpose
Step 1 Switch(config)# no interface port-channel Removes the port channel interface.
port_channel_number
Step 2 Switch(config)# end Exits configuration mode.
Step 3 Switch# show etherchannel summary Verifies the configuration.
Dual-Active Scenarios
One of the failure scenarios in a VSS is called dual-active, which occurs when the VSL fails completely.
Neither virtual switch knows of the other's status. From the perspective of the active virtual switch, the
standby chassis is lost. The standby virtual switch also views the active chassis as failed and transitions
to active state by using an SSO switchover. Two active virtual switches exist in the network with identical
configurations, causing duplicate IP addresses and bridge identifiers. This scenario has adverse effects
on the network topology and traffic if it persists.
remote switch stores the new active ID and immediately transmits asynchronous PAgP messages with
TLVs containing the new active ID. Upon receiving the new active ID from the remote switch, the
original active virtual switch detects the dual-active scenario and takes appropriate actions.
Virtual Virtual
Switch A Switch B
(active) VSL (standby)
204283
Remote switch
(Catalyst 4500 series switch)
Active_ID = As MAC
Virtual Virtual
Switch A Switch B
(active) VSL (standby)
Remote switch
(Catalyst 4500 series switch)
Active_ID = Bs MAC
As a remote switch, the Catalyst 4500 series switch supports stateful VSS client. In particular, the ID of
the current active virtual switch is synchronized from the active supervisor engine to the redundant
supervisor engine of the Catalyst 4500 series switch. This ensures that dual-active detection is not
disrupted even when the active supervisor engine switches over to the redundant supervisor engine.
Note You can also see the name of the neighboring switch (Partner Name) and the ports to which this
EtherChannel is connected (Partner Port).
If a Catalyst 4500 switch is connected to a Catalyst 6500 series VSS with the same version of enhanced
PAgP dual-active detection, the switch can detect a dual-active scenario:
Switch# show pagp 1 dual-active
PAgP dual-active detection enabled: Yes
PAgP dual-active version: 1.1
Channel group 1
Dual-Active Partner Partner Partner
Port Detect Capable Name Port Version
Gi6/5 Yes VSS Gi1/8/1 1.1
Gi6/6 Yes VSS Gi2/8/1 1.1
If a Catalyst 4500 switch is not connected to a Catalyst 6500 series VSS, the switch cannot detect a
dual-active scenario:
Switch# show pagp 1 dual-active
PAgP dual-active detection enabled: Yes
PAgP dual-active version: 1.1
Channel group 1
Dual-Active Partner Partner Partner
Port Detect Capable Name Port Version
Gi6/5 No Switch Fa6/5 N/A
Gi6/6 No Switch Fa6/6 N/A
Figure 24-3 on page 24-20 shows a network configured with link-state tracking. To enable link-state
tracking, create a link-state group, and specify the interfaces that are assigned to the link-state group. An
interface can be an aggregation of ports (an EtherChannel), a single physical port in access or trunk
mode, or a routed port. In a link-state group, these interfaces are bundled together. The downstream
interfaces are bound to the upstream interfaces. Interfaces connected to servers are referred to as
downstream interfaces, and interfaces connected to distribution switches and network devices are
referred to as upstream interfaces.
The configuration in Figure 24-3 ensures that the network traffic flow is balanced as follows:
For links to switches and other network devices
Server 1 and server 2 use switch A for primary links and switch B for secondary links.
Server 3 and server 4 use switch B for primary links and switch A for secondary links.
Link-state group 1 on switch A
Switch A provides primary links to server 1 and server 2 through link-state group 1. Port 1 is
connected to server 1, and port 2 is connected to server 2. Port 1 and port 2 are the downstream
interfaces in link-state group 1.
Port 5 and port 6 are connected to distribution switch 1 through link-state group 1. Port 5 and
port 6 are the upstream interfaces in link-state group 1.
Link-state group 2 on switch A
Switch A provides secondary links to server 3 and server 4 through link-state group 2. Port 3 is
connected to server 3, and port 4 is connected to server 4. Port 3 and port 4 are the downstream
interfaces in link-state group 2.
Port 7 and port 8 are connected to distribution switch 2 through link-state group 2. Port 7 and
port 8 are the upstream interfaces in link-state group 2.
Link-state group 2 on switch B
Switch B provides primary links to server 3 and server 4 through link-state group 2. Port 3 is
connected to server 3, and port 4 is connected to server 4. Port 3 and port 4 are the downstream
interfaces in link-state group 2.
Port 5 and port 6 are connected to distribution switch 2 through link-state group 2. Port 5 and
port 6 are the upstream interfaces in link-state group 2.
Link-state group 1 on switch B
Switch B provides secondary links to server 1 and server 2 through link-state group 1. Port 1 is
connected to server 1, and port 2 is connected to server 2. Port 1 and port 2 are the downstream
interfaces in link-state group 1.
Port 7 and port 8 are connected to distribution switch 1 through link-state group 1. Port 7 and
port 8 are the upstream interfaces in link-state group 1.
In a link-state group, the upstream ports can become unavailable or lose connectivity because the
distribution switch or router fails, the cables are disconnected, or the link is lost. These are the
interactions between the downstream and upstream interfaces when link-state tracking is enabled:
If any of the upstream interfaces are in the link-up state, the downstream interfaces can change to or
remain in the link-up state.
If all of the upstream interfaces become unavailable, link-state tracking automatically puts the
downstream interfaces in the error-disabled state. Connectivity to and from the servers is
automatically changed from the primary server interface to the secondary server interface.
Network
Link-state Link-state
Link-state group 1 group 2 Link-state
group 1 group 2
Port Port Port Port Port
Port
5 6 7 7
6 5
Link- Link-
state state
group 1 group 2
Primary link
Secondary link
Command Purpose
Step 1 Switch# configure terminal Enters global configuration mode.
Step 2 Switch(config)# link state track number Creates a link-state group, and enable link-state tracking. The
group number can be 1 to 10; the default is 1.
Step 3 Switch(config)# interface interface-id Specifies a physical interface or range of interfaces to configure,
and enters interface configuration mode.
Valid interfaces include switch ports in access or trunk mode
(IEEE 802.1q), routed ports, or multiple ports bundled into an
EtherChannel interface (static or LACP), also in trunk mode.
Command Purpose
Step 4 Switch(config-if)# link state group Specifies a link-state group, and configure the interface as either
[number] {upstream | downstream} an upstream or downstream interface in the group.The group
number can be 1 to 10; the default is 1.
Step 5 Switch(config-if)# end Returns to privileged EXEC mode.
Step 6 Switch# show running-config Verifies your entries.
Step 7 Switch# copy running-config startup-config (Optional) Saves your entries in the configuration file.
This example shows how to create a link-state group and configure the interfaces:
Switch# configure terminal
Switch(config)# link state track 1
Switch(config)# interface gigabitethernet3/1
Switch(config-if)# link state group 1 upstream
Switch(config-if)# interface gigabitethernet3/3
Switch(config-if)# link state group 1 upstream
Switch(config-if)# interface gigabitethernet3/5
Switch(config-if)# link state group 1 downstream
Switch(config-if)# interface gigabitethernet3/7
Switch(config-if)# link state group 1 downstream
Switch(config-if)# end
To disable a link-state group, use the no link state track number global configuration command.
it is an example of output from the show link state group detail command:
Switch> show link state group detail
(Up):Interface up (Dwn):Interface Down (Dis):Interface disabled
Link State Group: 1 Status: Enabled, Down
Upstream Interfaces : Gi3/5(Dwn) Gi3/6(Dwn)
Downstream Interfaces : Gi3/1(Dis) Gi3/2(Dis) Gi3/3(Dis) Gi3/4(Dis)
Link State Group: 2 Status: Enabled, Down
Upstream Interfaces : Gi3/15(Dwn) Gi3/16(Dwn) Gi3/17(Dwn)
Downstream Interfaces : Gi3/11(Dis) Gi3/12(Dis) Gi3/13(Dis) Gi3/14(Dis)
(Up):Interface up (Dwn):Interface Down (Dis):Interface disabled