0% found this document useful (0 votes)
68 views16 pages

Purpose of STP Redundancy in Layer 2 Switched Networks STP Recalculation

STP prevents Layer 2 loops from forming in switched networks with redundant paths by dynamically blocking ports on switches. It elects a root bridge and calculates the shortest path from each switch to that root, blocking ports along redundant paths. If a failure occurs, STP will unblock previously blocked ports to allow traffic to flow over the new optimal path. This maintains a loop-free topology while leveraging backup links for redundancy and fault tolerance.

Uploaded by

mxrcuryyy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views16 pages

Purpose of STP Redundancy in Layer 2 Switched Networks STP Recalculation

STP prevents Layer 2 loops from forming in switched networks with redundant paths by dynamically blocking ports on switches. It elects a root bridge and calculates the shortest path from each switch to that root, blocking ports along redundant paths. If a failure occurs, STP will unblock previously blocked ports to allow traffic to flow over the new optimal path. This maintains a loop-free topology while leveraging backup links for redundancy and fault tolerance.

Uploaded by

mxrcuryyy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 16

PURPOSE OF STP STP Recalculation

Redundancy in Layer 2 Switched Networks STP compensates for a failure in the network by
recalculating and opening up previously blocked ports.
● This topic covers the causes of loops in a Layer 2
network and briefly explains how spanning tree
protocol works. Redundancy is an important
part of the hierarchical design for eliminating
single points of failure and preventing
disruption of network services to users.
Redundant networks require the addition of
physical paths, but logical redundancy must also
be part of the design. Having alternate physical
Issues with Redundant Switch Links
paths for data to traverse the network makes it
possible for users to access network resources, ● Path redundancy provides multiple network
despite path disruption. However, redundant services by eliminating the possibility of a single
paths in a switched Ethernet network may point of failure. When multiple paths exist
cause both physical and logical Layer 2 loops. between two devices on an Ethernet network,
and there is no spanning tree implementation
● Ethernet LANs require a loop-free topology with
on the switches, a Layer 2 loop occurs. A Layer 2
a single path between any two devices. A loop
loop can result in MAC address table instability,
in an Ethernet LAN can cause continued
link saturation, and high CPU utilization on
propagation of Ethernet frames until a link is
switches and end-devices, resulting in the
disrupted and breaks the loop.
network becoming unusable.

● Layer 2 Ethernet does not include a mechanism


Spanning Tree Protocol to recognize and eliminate endlessly looping
frames. Both IPv4 and IPv6 include a
● Spanning Tree Protocol (STP) is a loop- mechanism that limits the number of times a
prevention network protocol that allows for Layer 3 networking device can retransmit a
redundancy while creating a loop-free Layer 2 packet. A router will decrement the TTL (Time
topology. to Live) in every IPv4 packet, and the Hop Limit
field in every IPv6 packet. When these fields are
● STP logically blocks physical loops in a Layer 2
decremented to 0, a router will drop the packet.
network, preventing frames from circling the
Ethernet and Ethernet switches have no
network forever.
comparable mechanism for limiting the number
of times a switch retransmits a Layer 2 frame.
STP was developed specifically as a loop
prevention mechanism for Layer 2 Ethernet.

Layer 2 Loops

● Without STP enabled, Layer 2 loops can form,


S2 drops the frame because it received it on a blocked causing broadcast, multicast and unknown
port. unicast frames to loop endlessly. This can bring
down a network quickly.
● When a loop occurs, the MAC address table on Corporation, and published in the 1985 paper
a switch will constantly change with the "An Algorithm for Distributed Computation of a
updates from the broadcast frames, which Spanning Tree in an Extended LAN.” Her
results in MAC database instability. This can spanning tree algorithm (STA) creates a loop-
cause high CPU utilization, which makes the free topology by selecting a single root bridge
switch unable to forward frames. where all other switches determine a single
least-cost path.
● An unknown unicast frame is when the switch
does not have the destination MAC address in ● STP prevents loops from occurring by
its MAC address table and must forward the configuring a loop-free path through the
frame out all ports, except the ingress port. network using strategically placed "blocking-
state" ports. The switches running STP are able
to compensate for failures by dynamically
Broadcast Storm unblocking the previously blocked ports and
permitting traffic to traverse the alternate
● A broadcast storm is an abnormally high paths.
number of broadcasts overwhelming the
network during a specific amount of time.
Broadcast storms can disable a network within How does the STA create a loop-free topology?
seconds by overwhelming switches and end
devices. Broadcast storms can be caused by a ● Selecting a Root Bridge: This bridge (switch) is
hardware problem such as a faulty NIC or from the reference point for the entire network to
a Layer 2 loop in the network. build a spanning tree around.

● Layer 2 broadcasts in a network, such as ARP ● Block Redundant Paths: STP ensures that there
Requests are very common. Layer 2 multicasts is only one logical path between all destinations
are typically forwarded the same way as a on the network by intentionally blocking
broadcast by the switch. IPv6 packets are never redundant paths that could cause a loop. When
forwarded as a Layer 2 broadcast, ICMPv6 a port is blocked, user data is prevented from
Neighbor Discovery uses Layer 2 multicasts. entering or leaving that port.

● A host caught in a Layer 2 loop is not accessible ● Create a Loop-Free Topology: A blocked port
to other hosts on the network. Additionally, due has the effect of making that link a non-
to the constant changes in its MAC address forwarding link between the two switches. This
table, the switch does not know out of which creates a topology where each switch has only a
port to forward unicast frames. single path to the root bridge, similar to
branches on a tree that connect to the root of
● To prevent these issues from occurring in a the tree.
redundant network, some type of spanning tree
must be enabled on the switches. Spanning tree ● Recalculate in case of Link Failure: The physical
is enabled, by default, on Cisco switches to paths still exist to provide redundancy, but
prevent Layer 2 loops from occurring. these paths are disabled to prevent the loops
from occurring. If the path is ever needed to
compensate for a network cable or switch
The Spanning Tree Algorithm failure, STP recalculates the paths and unblocks
the necessary ports to allow the redundant path
● STP is based on an algorithm invented by Radia to become active. STP recalculations can also
Perlman while working for Digital Equipment
occur any time a new switch or new inter- ● MAC address: When two switches are
switch link is added to the network. configured with the same priority and have the
same extended system ID, the switch having the
MAC address with the lowest value, expressed
STP OPERATIONS in hexadecimal, will have the lower BID.

Steps to a Loop-Free Topology

Using the STA, STP builds a loop-free topology in a four- 1. Elect the Root Bridge
step process: ● The STA designates a single switch as the root
1. Elect the root bridge. bridge and uses it as the reference point for all
path calculations. Switches exchange BPDUs to
2. Elect the root ports. build the loop-free topology beginning with
selecting the root bridge.
3. Elect designated ports.
● All switches in the broadcast domain participate
4. Elect alternate (blocked) ports.
in the election process. After a switch boots, it
● During STA and STP functions, switches use begins to send out BPDU frames every two
Bridge Protocol Data Units (BPDUs) to share seconds. These BPDU frames contain the BID of
information about themselves and their the sending switch and the BID of the root
connections. BPDUs are used to elect the root bridge, known as the Root ID.
bridge, root ports, designated ports, and
● The switch with the lowest BID will become the
alternate ports.
root bridge. At first, all switches declare
● Each BPDU contains a bridge ID (BID) that themselves as the root bridge with their own
identifies which switch sent the BPDU. The BID BID set as the Root ID. Eventually, the switches
is involved in making many of the STA decisions learn through the exchange of BPDUs which
including root bridge and port roles. switch has the lowest BID and will agree on one
root bridge.
● The BID contains a priority value, the MAC
address of the switch, and an extended system
ID. The lowest BID value is determined by the
combination of these three fields.

● Bridge Priority: The default priority value for all


Cisco switches is the decimal value 32768. The
range is 0 to 61440 in increments of 4096. A
lower bridge priority is preferable. A bridge
priority of 0 takes precedence over all other
bridge priorities. Impact of Default BIDs

● Extended System ID: The extended system ID ● Because the default BID is 32768, it is possible
value is a decimal value added to the bridge for two or more switches to have the same
priority value in the BID to identify the VLAN for priority. In this scenario, where the priorities
this BPDU. are the same, the switch with the lowest MAC
address will become the root bridge. The
administrator should configure the desired root the IEEE 802.1D standard, also known as the
bridge switch with a lower priority. short path cost, for both STP and RSTP.

● In the figure, all switches are configured with ● Although switch ports have a default port cost
the same priority of 32769. Here the MAC associated with them, the port cost is
address becomes the deciding factor as to configurable. The ability to configure individual
which switch becomes the root bridge. The port costs gives the administrator the flexibility
switch with the lowest hexadecimal MAC to manually control the spanning tree paths to
address value is the preferred root bridge. In the root bridge.
this example, S2 has the lowest value for its
MAC address and is elected as the root bridge
for that spanning tree instance.
Link Speed STP Cost: IEEE RSTP Cost: IEEE
● Note: The priority of all the switches is 32769.
The value is based on the 32768 default bridge 802.1D-1998 802.1w-2004
priority and the extended system ID (VLAN 1
assignment) associated with each switch 10 Gbps 2 2,000
(32768+1).
1 Gbps 4 20,000

100 Mbps 19 200,000

10 Mbps 100 2,000,000

2. Elect the Root Ports

● After the root bridge has been determined, the


Determine the Root Path Cost STA algorithm is used to select the root port.
Every non-root switch will select one root port.
● When the root bridge has been elected for a The root port is the port closest to the root
given spanning tree instance, the STA starts bridge in terms of overall cost to the root
determining the best paths to the root bridge bridge. This overall cost is known as the internal
from all destinations in the broadcast domain. root path cost.
The path information, known as the internal
root path cost, is determined by the sum of all ● The internal root path cost is equal to the sum
the individual port costs along the path from of all the port costs along the path to the root
the switch to the root bridge. bridge, as shown in the figure. Paths with the
lowest cost become preferred, and all other
● When a switch receives the BPDU, it adds the redundant paths are blocked. In the example,
ingress port cost of the segment to determine the internal root path cost from S2 to the root
its internal root path cost. bridge S1 over path 1 is 19 while the internal
● The default port costs are defined by the speed root path cost over path 2 is 38. Because path 1
at which the port operates. The table shows the has a lower overall path cost to the root bridge,
default port costs suggested by IEEE. Cisco it is the preferred path and F0/1 becomes the
switches by default use the values as defined by root port on S2.
4. Elect Alternate (Blocked) Ports

If a port is not a root port or a designated port, then it


becomes an alternate (or backup) port. Alternate ports
are in discarding or blocking state to prevent loops. In
the figure, the STA has configured port F0/2 on S3 in the
alternate role. Port F0/2 on S3 is in the blocking state
and will not forward Ethernet frames. All other inter-
switch ports are in forwarding state. This is the loop-
prevention part of STP.

3. Elect Designated Ports

● Every segment between two switches will have


one designated port. The designated port is a
port on the segment that has the internal root
path cost to the root bridge. In other words, the
designated port has the best path to receive
traffic leading to the root bridge.

● What is not a root port or a designated port


becomes an alternate or blocked port.

● All ports on the root bridge are designated Elect a Root Port from Multiple Equal-Cost Paths
ports.
When a switch has multiple equal-cost paths to the root
● If one end of a segment is a root port, the other bridge, the switch will determine a port using the
end is a designated port. following criteria:

● All ports attached to end devices are designated ● Lowest sender BID
ports.
● Lowest sender port priority
● On segments between two switches where
neither of the switches is the root bridge, the ● Lowest sender port ID
port on the switch with the least-cost path to
the root bridge is a designated port.
Lowest Sender BID: This topology has four switches
with switch S1 as the root bridge. Port F0/1 on switch S3
and port F0/3 on switch S4 have been selected as root
ports because they have the root path cost to the root
bridge for their respective switches. S2 has two ports,
F0/1 and F0/2 with equal cost paths to the root bridge.
The bridge IDs of S3 and S4, will be used to break the
tie. This is known as the sender’s BID. S3 has a BID of
32769.5555.5555.5555 and S4 has a BID of
32769.1111.1111.1111. Because S4 has a lower BID, the
F0/1 port of S2, which is the port connected to S4, will
be the root port.
STP Timers and Port States

STP convergence requires three timers, as follows:

● Hello Timer - The hello time is the interval


between BPDUs. The default is 2 seconds but
can be modified to between 1 and 10 seconds.

● Forward Delay Timer - The forward delay is the


Lowest Sender Port Priority: This topology has two
time that is spent in the listening and learning
switches which are connected with two equal-cost
state. The default is 15 seconds but can be
paths between them. S1 is the root bridge, so both of its
modified to between 4 and 30 seconds.
ports are designated ports.
● Max Age Timer - The max age is the maximum
● S4 has two ports with equal-cost paths to the
length of time that a switch waits before
root bridge. Because both ports are connected
attempting to change the STP topology. The
to the same switch, the sender’s BID (S1) is
default is 20 seconds but can be modified to
equal. So the first step is a tie.
between 6 and 40 seconds.
● Next, is the sender’s (S1) port priority. The
Note: The default times can be changed on the root
default port priority is 128, so both ports on S1
bridge, which dictates the value of these timers for the
have the same port priority. This is also a tie.
STP domain.
However, if either port on S1 was configured
with a lower port priority, S4 would put its
adjacent port in forwarding state. The other
port on S4 would be a blocking state. STP facilitates the logical loop-free path throughout the
broadcast domain. The spanning tree is determined
through the information learned by the exchange of the
BPDU frames between the interconnected switches. If a
switch port transitions directly from the blocking state
to the forwarding state without information about the
full topology during the transition, the port can
Lowest Sender Port ID: The last tie-breaker is the temporarily create a data loop. For this reason, STP has
lowest sender’s port ID. Switch S4 has received BPDUs five ports states, four of which are operational port
from port F0/1 and port F0/2 on S1. The decision is states as shown in the figure. The disabled state is
based on the sender’s port ID, not the receiver’s port ID. considered non-operational.
Because the port ID of F0/1 on S1 is lower than port
F0/2, the port F0/6 on switch S4 will be the root port.
This is the port on S4 that is connected to the F0/1 port
on S1.

● Port F0/5 on S4 will become an alternate port


and placed in the blocking state.

Blocking

● No BPDU received

● Max Age = 20 seconds


Listening STP can be configured to operate in an environment
with multiple VLANs. In Per-VLAN Spanning Tree (PVST)
● Forward Delay = 15 seconds versions of STP, there is a root bridge elected for each
Blocking spanning tree instance. This makes it possible to have
different root bridges for different sets of VLANs. STP
● In blocking state until STP determines if port is operates a separate instance of STP for each individual
root or designated port VLAN. If all ports on all switches are members of VLAN
1, then there is only one spanning tree instance.
Link comes up

Learning
EVOLUTION OF STP
● Forward Delay = 15 seconds
Different Versions of STP
Forwarding
● Many professionals generically use spanning
tree and STP to refer to the various
Operational Details of Each Port State implementations of spanning tree, such as
Rapid Spanning Tree Protocol (RSTP) and
The table summarizes the operational details of each Multiple Spanning Tree Protocol (MSTP). In
port state order to communicate spanning tree concepts
correctly, it is important to refer to the
implementation or standard of spanning tree in
context.
Port State BPDU MAC Forwarding
Address Data Frames ● The latest IEEE documentation on spanning tree
Table (IEEE-802-1D-2004) says, "STP has now been
superseded by the Rapid Spanning Tree
Blocking Receive No update No Protocol (RSTP)."The IEEE uses "STP" to refer to
only the original implementation of spanning tree
and "RSTP" to describe the version of spanning
tree specified in IEEE-802.1D-2004.
Listening Receive No update No
and send ● Because the two protocols share much of the
same terminology and methods for the loop-
Learning Receive Updating No free path, the primary focus will be on the
and send table current standard and the Cisco proprietary
implementations of STP and RSTP.

Forwarding Receive Updating Yes ● Cisco switches running IOS 15.0 or later, run
and send table PVST+ by default. This version incorporates
many of the specifications of IEEE 802.1D-2004,
such as alternate ports in place of the former
Disabled None No update No
non-designated ports. Switches must be
sent or
explicitly configured for rapid spanning tree
received
mode in order to run the rapid spanning tree
protocol.

Per-VLAN Spanning Tree


STP Variety ● RSTP (IEEE 802.1w) supersedes the original
802.1D while retaining backward compatibility.
● STP - This is the original IEEE 802.1D version The 802.1w STP terminology remains primarily
(802.1D-1998 and earlier) that provides a loop- the same as the original IEEE 802.1D STP
free topology in a network with redundant links. terminology. Most parameters have been left
Also called Common Spanning Tree (CST), it unchanged. Users that are familiar with the
assumes one spanning tree instance for the original STP standard can easily configure RSTP.
entire bridged network, regardless of the The same spanning tree algorithm is used for
number of VLANs. both STP and RSTP to determine port roles and
● PVST+ - Per-VLAN Spanning Tree (PVST+) is a topology.
Cisco enhancement of STP that provides a ● RSTP increases the speed of the recalculation of
separate 802.1D spanning tree instance for the spanning tree when the Layer 2 network
each VLAN configured in the network. PVST+ topology changes. RSTP can achieve much
supports PortFast, UplinkFast, BackboneFast, faster convergence in a properly configured
BPDU guard, BPDU filter, root guard, and loop network, sometimes in as little as a few
guard. hundred milliseconds. If a port is configured to
● 802.1D-2004 - This is an updated version of the be an alternate port it can immediately change
STP standard, incorporating IEEE 802.1w. to a forwarding state without waiting for the
network to converge.
● RSTP - Rapid Spanning Tree Protocol (RSTP) or
IEEE 802.1w is an evolution of STP that provides Note: Rapid PVST+ is the Cisco implementation of RSTP
faster convergence than STP. on a per-VLAN basis. With Rapid PVST+ an independent
instance of RSTP runs for each VLAN.
● Rapid PVST+ - This is a Cisco enhancement of
RSTP that uses PVST+ and provides a separate
instance of 802.1w per VLAN. Each separate RSTP Port States and Port Roles
instance supports PortFast, BPDU guard, BPDU
filter, root guard, and loop guard. There are only three port states in RSTP that correspond
to the three possible operational states in STP. The
● MSTP - Multiple Spanning Tree Protocol (MSTP) 802.1D disabled, blocking, and listening states are
is an IEEE standard inspired by the earlier Cisco merged into a unique 802.1w discarding state.
proprietary Multiple Instance STP (MISTP)
implementation. MSTP maps multiple VLANs
into the same spanning tree instance.
STP RSTP
● MST - Multiple Spanning Tree (MST) is the Cisco
implementation of MSTP, which provides up to
16 instances of RSTP and combines many VLANs Disabled Discarding
with the same physical and logical topology into
a common RSTP instance. Each instance Blocking
supports PortFast, BPDU guard, BPDU filter,
root guard, and loop guard.
Listening

Learning Learning
RSTP Concepts
● When a device is connected to a switch port or
Forwarding Forwarding
when a switch powers up, the switch port goes
through both the listening and learning states,
each time waiting for the Forward Delay timer
Root ports and designated ports are the same for both to expire. This delay is 15 seconds for each state
STP and RSTP. However, there are two RSTP port roles for a total of 30 seconds. This can present a
that correspond to the blocking state of STP. In STP, a problem for DHCP clients trying to discover a
blocked port is defined as not being the designated or DHCP server because the DHCP process may
root port. RSTP has two port roles for this purpose. timeout. The result is that an IPv4 client will not
receive a valid IPv4 address.

● When a switch port is configured with PortFast,


STP RSTP that port transitions from blocking to
forwarding state immediately, avoiding the 30
second delay. You can use PortFast on access
Root Port Root Port
ports to allow devices connected to these ports
to access the network immediately. PortFast
Designated Port Designated Port should only be used on access ports. If you
enable PortFast on a port connecting to another
Blocked Port (Non- Backup Port switch, you risk creating a spanning tree loop.
Designated Port)
● A PortFast-enabled switch port should never
Alternate Port receive BPDUs because that would indicate that
switch is connected to the port, potentially
causing a spanning tree loop. Cisco switches
support a feature called BPDU guard. When
The alternate port has an alternate path to the root
enabled, it immediately puts the switch port in
bridge. The backup port is a backup to a shared
an errdisabled (error-disabled) state upon
medium, such as a hub. A backup port is less common
receipt of any BPDU. This protects against
because hubs are now considered legacy devices.
potential loops by effectively shutting down the
port. The administrator must manually put the
interface back into service.

Alternatives to STP

● Over the years, organizations required greater


resiliency and availability in the LAN. Ethernet
LANs went from a few interconnected switches
connected to a single router, to a sophisticated
hierarchical network design including access,
distribution and core layer switches.

● Depending on the implementation, Layer 2 may


PortFast and BPDU Guard include not only the access layer, but also the
distribution or even the core layers. These
designs may include hundreds of switches, with
hundreds or even thousands of VLANs. STP has ● EtherChannel technology makes it possible to
adapted to the added redundancy and combine the number of physical links between
complexity with enhancements, as part of RSTP the switches to increase the overall speed of
and MSTP. switch-to-switch communication.

● An important aspect to network design is fast


and predictable convergence when there is a
failure or change in the topology. Spanning tree EtherChannel
does not offer the same efficiencies and EtherChannel technology was originally developed by
predictabilities provided by routing protocols at Cisco as a LAN switch-to-switch technique of grouping
Layer 3. several Fast Ethernet or Gigabit Ethernet ports into one
● Layer 3 routing allows for redundant paths and logical channel.
loops in the topology, without blocking ports. When an EtherChannel is configured, the resulting
For this reason, some environments are virtual interface is called a port channel. The physical
transitioning to Layer 3 everywhere except interfaces are bundled together into a port channel
where devices connect to the access layer interface, as shown in the figure.
switch. In other words, the connections
between access layer switches and distribution
switches would be Layer 3 instead of Layer 2.

ETHERCHANNEL

EtherChannel OPERATION

Link Aggregation

● There are scenarios in which more bandwidth


or redundancy between devices is needed than Advantages of EtherChannel
what can be provided by a single link. Multiple
EtherChannel technology has many advantages,
links could be connected between devices to
including the following:
increase bandwidth. However, Spanning Tree
Protocol (STP), which is enabled on Layer 2 ● Most configuration tasks can be done on the
devices like Cisco switches by default, will block EtherChannel interface instead of on each
redundant links to prevent switching loops. individual port, ensuring configuration
consistency throughout the links.
● A link aggregation technology is needed that
allows redundant links between devices that ● EtherChannel relies on existing switch ports.
will not be blocked by STP. That technology is There is no need to upgrade the link to a faster
known as EtherChannel. and more expensive connection to have more
bandwidth.
● EtherChannel is a link aggregation technology
that groups multiple physical Ethernet links ● Load balancing takes place between links that
together into one single logical link. It is used to are part of the same EtherChannel.
provide fault-tolerance, load sharing, increased
bandwidth, and redundancy between switches, ● EtherChannel creates an aggregation that is
routers, and servers. seen as one logical link. When several
EtherChannel bundles exist between two
switches, STP may block one of the bundles to
prevent switching loops. When STP blocks one
of the redundant links, it blocks the entire AutoNegotiation Protocols
EtherChannel. This blocks all the ports EtherChannels can be formed through negotiation using
belonging to that EtherChannel link. Where one of two protocols, Port Aggregation Protocol (PAgP)
there is only one EtherChannel link, all physical or Link Aggregation Control Protocol (LACP). These
links in the EtherChannel are active because STP protocols allow ports with similar characteristics to form
sees only one (logical) link. a channel through dynamic negotiation with adjoining
● EtherChannel provides redundancy because the switches.
overall link is seen as one logical connection. Note: It is also possible to configure a static or
Additionally, the loss of one physical link within unconditional EtherChannel without PAgP
the channel does not create a change in the
topology. or LACP.

Implementation Restrictions PAgP Operation

EtherChannel has certain implementation restrictions, PAgP (pronounced “Pag - P”) is a Cisco-proprietary
including the following: protocol that aids in the automatic creation of
EtherChannel links. When an EtherChannel link is
● Interface types cannot be mixed. For example, configured using PAgP, PAgP packets are sent between
Fast Ethernet and Gigabit Ethernet cannot be EtherChannel-capable ports to negotiate the forming of
mixed within a single EtherChannel. a channel. When PAgP identifies matched Ethernet
● Currently each EtherChannel can consist of up links, it groups the links into an EtherChannel. The
EtherChannel is then added to the spanning tree as a
to eight compatibly-configured Ethernet ports.
EtherChannel provides full-duplex bandwidth single port.
up to 800 Mbps (Fast EtherChannel) or 8 Gbps When enabled, PAgP also manages the EtherChannel.
(Gigabit EtherChannel) between one switch and PAgP packets are sent every 30 seconds. PAgP checks
another switch or host. for configuration consistency and manages link
● The Cisco Catalyst 2960 Layer 2 switch currently additions and failures between two switches. It ensures
that when an EtherChannel is created, all ports have the
supports up to six EtherChannels.
same type of configuration.
● The individual EtherChannel group member
Note: In EtherChannel, it is mandatory that all ports
port configuration must be consistent on both
devices. If the physical ports of one side are have the same speed, duplex setting, and VLAN
configured as trunks, the physical ports of the information. Any port modification after the creation of
other side must also be configured as trunks the channel also changes all other channel ports.
within the same native VLAN. Additionally, all
ports in each EtherChannel link must be
configured as Layer 2 ports.
PAgP helps create the EtherChannel link by detecting
● Each EtherChannel has a logical port channel the configuration of each side and ensuring that links
interface. A configuration applied to the port are compatible so that the EtherChannel link can be
channel interface affects all physical interfaces enabled when needed. The modes for PAgP as follows:
that are assigned to that interface.
● On - This mode forces the interface to channel
without PAgP. Interfaces configured in the on
mode do not exchange PAgP packets. S1 S2 Channel
Establishment
● PAgP desirable - This PAgP mode places an
interface in an active negotiating state in which
the interface initiates negotiations with other On On Yes
interfaces by sending PAgP packets.
On Desirable/Auto No
● PAgP auto - This PAgP mode places an interface
in a passive negotiating state in which the
interface responds to the PAgP packets that it Desirable Desirable Yes
receives but does not initiate PAgP negotiation.
Desirable Auto Yes
The modes must be compatible on each side. If one side
is configured to be in auto mode, it is placed in a passive
state, waiting for the other side to initiate the Auto Desirable Yes
EtherChannel negotiation. If the other side is also set to
auto, the negotiation never starts and the EtherChannel Auto Auto No
does not form. If all modes are disabled by using the no
command, or if no mode is configured, then the
EtherChannel is disabled. The on mode manually places
the interface in an EtherChannel, without any LACP Operation
negotiation. It works only if the other side is also set to
LACP is part of an IEEE specification (802.3ad) that
on. If the other side is set to negotiate parameters
allows several physical ports to be bundled to form a
through PAgP, no EtherChannel forms, because the side
single logical channel. LACP allows a switch to negotiate
that is set to on mode does not negotiate. No
an automatic bundle by sending LACP packets to the
negotiation between the two switches means there is
other switch. It performs a function similar to PAgP with
no checking to make sure that all the links in the
Cisco EtherChannel. Because LACP is an IEEE standard, it
EtherChannel are terminating on the other side, or that
can be used to facilitate EtherChannels in multivendor
there is PAgP compatibility on the other switch.
environments. On Cisco devices, both protocols are
supported.

PAgP Mode Settings Example LACP provides the same negotiation benefits as PAgP.
LACP helps create the EtherChannel link by detecting
the configuration of each side and making sure that
they are compatible so that the EtherChannel link can
be enabled when needed. The modes for LACP are as
follows:

The table shows the various combination of PAgP ● On - This mode forces the interface to channel
modes on S1 and S2 and the resulting channel without LACP. Interfaces configured in the on
establishment outcome. mode do not exchange LACP packets.

● LACP active - This LACP mode places a port in


an active negotiating state. In this state, the
port initiates negotiations with other ports by
sending LACP packets.
● LACP passive - This LACP mode places a port in requirement that interfaces be physically
a passive negotiating state. In this state, the contiguous.
port responds to the LACP packets that it
● Speed and duplex - Configure all interfaces in
receives but does not initiate LACP packet
negotiation. an EtherChannel to operate at the same speed
and in the same duplex mode.

● VLAN match - All interfaces in the EtherChannel


LACP Mode Settings Example bundle must be assigned to the same VLAN or
be configured as a trunk (shown in the figure).

● Range of VLANs - An EtherChannel supports the


same allowed range of VLANs on all the
interfaces in a trunking EtherChannel. If the
The table shows the various combination of LACP allowed range of VLANs is not the same, the
modes on S1 and S2 and the resulting channel interfaces do not form an EtherChannel, even
establishment outcome. when they are set to auto or desirable mode.

● The figure shows a configuration that would


S1 S2 Channel
allow an EtherChannel to form between S1 and
Establishment
S2.

On On Yes ● If these settings must be changed, configure


them in port channel interface configuration
mode. Any configuration that is applied to the
On Active/Passive No
port channel interface also affects individual
interfaces. However, configurations that are
Active Active Yes applied to the individual interfaces do not affect
the port channel interface. Therefore, making
Active Passive Yes configuration changes to an interface that is
part of an EtherChannel link may cause
interface compatibility issues.
Passive Active Yes
● The port channel can be configured in access
Passive Passive No mode, trunk mode (most common), or on a
routed port.

CONFIGURE ETHERCHANNEL

Configuration Guidelines

The following guidelines and restrictions are useful for


configuring EtherChannel:

● EtherChannel support - All Ethernet interfaces


must support EtherChannel with no
LACP Configuration Example ● The show etherchannel summary command
displays one line of information per port
Configuring EtherChannel with LACP requires the channel.
following three steps:
● The show etherchannel port-channel command
● Step 1. Specify the interfaces that compose the displays information about a specific port
EtherChannel group using the interface range channel interface.
interface global configuration mode command.
The range keyword allows you to select several ● The show interfaces etherchannel command
interfaces and configure them all together. can provide information about the role of a
physical member interface of the EtherChannel.
● Step 2. Create the port channel interface with
the channel-group identifier mode active
command in interface range configuration
Common Issues with EtherChannel Configurations
mode. The identifier specifies a channel group
number. The mode active keywords identify All interfaces within an EtherChannel must have the
this as an LACP EtherChannel configuration. same configuration of speed and duplex mode, native
● Step3. To change Layer 2 settings on the port and allowed VLANs on trunks, and access VLAN on
access ports. Ensuring these configurations will
channel interface, enter port channel interface
configuration mode using the interface port- significantly reduce network problems related to
EtherChannel. Common EtherChannel issues include the
channel command, followed by the interface
identifier. In the example, S1 is configured with following:
an LACP EtherChannel. The port channel is ● Assigned ports in the EtherChannel are not part
configured as a trunk interface with the allowed of the same VLAN, or not configured as trunks.
VLANs specified. Ports with different native VLANs cannot form
an EtherChannel.

● Trunking was configured on some of the ports


that make up the EtherChannel, but not all of
them. It is not recommended that you configure
trunking mode on individual ports that make up
the EtherChannel. When configuring a trunk on
an EtherChannel, verify the trunking mode on
the EtherChannel.
VERIFY AND TROUBLESHOOT ETHERCHANNEL
● If the allowed range of VLANs is not the same,
Verify EtherChannel the ports do not form an EtherChannel even
when PAgP is set to the auto or desirable mode.
As always, when you configure devices in your network,
you must verify your configuration. If there are ● The dynamic negotiation options for PAgP and
problems, you will also need to be able to troubleshoot LACP are not compatibly configured on both
and fix them. There are a number of commands to ends of the EtherChannel.
verify an EtherChannel configuration:

● The show interfaces port-channel command


displays the general status of the port channel Troubleshoot EtherChannel Example
interface.
In the figure, interfaces F0/1 and F0/2 on switches S1
and S2 are connected with an EtherChannel. However,
the EtherChannel is not operational.

Step 1. View the EtherChannel Summary Information:


The output of the show etherchannel summary
command indicates that the EtherChannel is down.

Step 2. View Port Channel Configuration: In the show


run | begin interface port-channel output, more
detailed output indicates that there are incompatible
PAgP modes configured on S1 and S2.

Step 3: Correct the Misconfiguration: To correct the


issue, the PAgP mode on the EtherChannel is changed
to desirable.

Note: EtherChannel and STP must interoperate. For this


reason, the order in which EtherChannel-related
commands are entered is important, which is why you
see interface Port-Channel 1 removed and then re-
added with the channel-group command, as opposed to
directly changed. If one tries to change the
configuration directly, STP errors cause the associated
ports to go into blocking or errdisabled state.
Step 4. Verify EtherChannel is Operational: The
EtherChannel is now active as verified by the output of
the show etherchannel summary command.

You might also like