Skip to content

Intermediate · Spanning Tree and EtherChannel · topic 30 of 57 · 30 min

EtherChannel: bundling links

Explanation

EtherChannel bundles 2 to 8 physical links into one logical link (a port-channel), so spanning tree sees one link and all members carry traffic. LACP (IEEE 802.3ad, now 802.1AX) uses active and passive modes, Cisco's PAgP uses desirable and auto, and on forces the bundle without negotiation. All members must match in speed, duplex and VLAN settings. Traffic is spread by a hash, so one flow always uses one member link.

An access switch has many users and a single 1 Gbps uplink is getting full. You add a second cable to the same distribution switch. But spanning tree sees two parallel links between the same two switches, which is a loop, and blocks one of them. You paid for two links and use one.

EtherChannel (also called link aggregation or a port-channel) bundles several physical links into one logical link. Spanning tree sees a single link, so nothing is blocked and every member carries traffic. If one cable fails, traffic moves to the remaining members within a moment, without any spanning tree recalculation.

Think of it like this: A four-lane highway is still "one road" on the map, but cars can use any lane. If one lane is closed for repairs, traffic keeps moving on the other three. EtherChannel turns several cables into lanes of one road.

Three ways to form a bundle

  • LACP (Link Aggregation Control Protocol): the open standard, IEEE 802.3ad, now maintained as IEEE 802.1AX. Modes: active (sends LACP messages to start a bundle) and passive (answers but does not start).
  • PAgP (Port Aggregation Protocol): Cisco proprietary. Modes: desirable (starts) and auto (answers only).
  • Static on: no protocol at all. Both sides must be set to on. Simple, but nothing checks that the other side is set up the same way.
Side ASide BBundle forms?
activeactive or passiveYes (LACP)
passivepassiveNo: both wait
desirabledesirable or autoYes (PAgP)
autoautoNo: both wait
ononYes (static)
onanything elseNo
LACP modePAgP modeNo: different protocols

The pattern is the same as DTP: at least one side must actively ask. Prefer LACP with active on both ends: it is standard, works with other vendors and servers, and detects cabling mistakes that static on would miss.

Configuring an LACP EtherChannel

output
SW1(config)# interface range gigabitEthernet 0/1 - 2
SW1(config-if-range)# channel-group 1 mode active
SW1(config-if-range)# exit
SW1(config)# interface port-channel 1
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk allowed vlan 10,20,30
SW1(config-if)# end
SW1# show etherchannel summary
Cisco IOS: channel-group creates interface port-channel 1. Configure trunk settings on the port-channel; IOS copies them to the members.

Members must match

All member ports must have the same speed and duplex, the same switchport mode (all access or all trunk), the same access VLAN, or the same allowed VLANs and native VLAN on trunks. A port that does not match is suspended or left out of the bundle. The easiest way to stay consistent is to configure the port-channel interface, not the members one by one.

An EtherChannel does not split a single frame across links. The switch calculates a hash from fields of each frame, such as source and destination IP addresses, and the result picks one member link. All frames of the same conversation (a flow) give the same hash, so they use the same link and arrive in order. Many different flows spread across all links.

Consequence: one big file copy between two servers never goes faster than one member link, even on a 4-link bundle. And if the hash fields are badly chosen (for example only the source MAC, when all traffic comes from one router), most traffic can end up on one link. The default method depends on the platform; check it and change it globally.

output
SW1(config)# port-channel load-balance src-dst-ip
SW1(config)# end
SW1# show etherchannel load-balance
Cisco IOS: hash on both source and destination IP. Other options include src-mac, dst-mac, src-dst-mac and, on some platforms, port numbers.

Reading show etherchannel summary

output
SW1# 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      ...

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------
1      Po1(SU)         LACP      Gi0/1(P)    Gi0/2(P)
Cisco IOS (trimmed): Po1(SU) is a layer 2 bundle in use; (P) means each member is bundled.

Healthy: SU for a layer 2 channel (RU for layer 3), and P on every member. Trouble: SD means the port-channel is down; (I) means a member stands alone because negotiation failed; (s) means suspended, usually a settings mismatch; (D) means the member itself is down.

Layer 3 EtherChannel, briefly

Between two layer 3 switches you can bundle routed ports: put no switchport on the members and the port-channel, and give the port-channel an IP address.

output
DSW1(config)# interface range gigabitEthernet 1/0/1 - 2
DSW1(config-if-range)# no switchport
DSW1(config-if-range)# channel-group 2 mode active
DSW1(config-if-range)# interface port-channel 2
DSW1(config-if)# no switchport
DSW1(config-if)# ip address 10.0.0.1 255.255.255.252
Cisco IOS: a routed bundle; show etherchannel summary shows Po2(RU).
Careful: Common mistakes: passive on both ends or auto on both ends (no bundle); mixing LACP on one side with PAgP or on on the other; different allowed VLANs on members (ports get suspended); and expecting one download to use the full bundle speed. On many Cisco switches a channel holds up to 8 active links, and the hash spreads best with 2, 4 or 8 members.

Need help?

Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.

Try:

Watch the lesson

EtherChannel: bundling links · 1/8

EtherChannel

In this lesson you will learn how to bundle several cables into one logical link with EtherChannel.

Prefer a video by a teacher? Find free videos on “etherchannel lacp pagp configuration ccna packet tracer” on YouTube ↗

In real life: Full uplinks at a travel booking call centre

A call centre for a travel booking company runs 600 agents on 15 access switches. Every morning at 10 am, when Tatkal bookings open, the 1 Gbps uplinks hit 100% and calls break up. Buying 10 Gbps switches would take months. The network team adds a second cable from each access switch to the distribution switch and configures LACP active on both ends, with port-channel load-balance src-dst-ip. Each uplink now carries 2 Gbps across many agent flows, spanning tree blocks nothing between the pair, and a cut cable just halves the capacity instead of causing an outage.

Practice (0/3 done)

Task 1 · Code · Python

Write channel_forms(a, b) that returns True if an EtherChannel forms between two ports set to modes a and b. Modes are "on", "active", "passive" (LACP), "desirable" and "auto" (PAgP). Rules: on only works with on; LACP works if both are LACP modes and at least one is active; PAgP works if both are PAgP modes and at least one is desirable.

Task 2 · Code · Javascript

A simplified src-dst-ip hash: take the last octet of the source IP and the last octet of the destination IP, XOR them (the ^ operator), and take the result modulo the number of links. Write pickLink(srcIp, dstIp, links) that returns the member link index (0 to links - 1). Real switches use their own hash, but the idea is the same: the same pair of addresses always gives the same link.

Task 3 · Practice

Packet Tracer lab: connect two 2960 switches (SW1, SW2) with two cables, Gi0/1 to Gi0/1 and Gi0/2 to Gi0/2. First look at show spanning-tree: one link is blocked. Then build an LACP EtherChannel (group 1) that is a trunk allowing VLANs 10 and 20, and verify it.

Quick quiz

Question 1

1.Which pair of modes does NOT form an EtherChannel?

Question 2

2.Which standard defines LACP?

Question 3

3.Why can a single file copy not use the full speed of a 4-link EtherChannel?

Question 4

4.show etherchannel summary shows Gi0/2(s). What does s mean?

Question 5

5.Where should you configure the trunk settings of an EtherChannel?

Read more (free)

Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.

Which pair of modes does NOT form an EtherChannel?

Answer: passive and passive

Passive only answers LACP messages, so with passive on both ends nobody starts.

Which standard defines LACP?

Answer: IEEE 802.3ad (now 802.1AX)

LACP came from IEEE 802.3ad and is now maintained in IEEE 802.1AX.

Why can a single file copy not use the full speed of a 4-link EtherChannel?

Answer: A flow is hashed onto one member link

All frames of one flow give the same hash, so they all use the same member link.

show etherchannel summary shows Gi0/2(s). What does s mean?

Answer: Suspended, usually a settings mismatch

Lower-case s means suspended; check speed, duplex and VLAN settings against the other members.

Where should you configure the trunk settings of an EtherChannel?

Answer: On interface port-channel

Configure the logical port-channel interface; IOS applies the settings to the members so they stay consistent.

Two new switches use dynamic auto on the ports that link them. What forms?Related

Answer: An access link

Both sides wait for the other to ask, so neither asks and the link stays access.

From Trunks and 802.1Q tagging

An IP phone and a PC share one switch port. Which command puts the phone traffic in VLAN 50?Related

Answer: switchport voice vlan 50

switchport voice vlan 50 tells the phone to tag voice frames with VLAN 50; the PC stays in the access VLAN.

From VLANs: what they are and why we use them

One end of a 100 Mbps link is set to full duplex by hand, the other is on auto and falls back to half. What will you most likely see?Related

Answer: Late collisions on one side, CRC errors on the other, and a slow link

That is a duplex mismatch: the link is up but slow and full of errors.

From Ethernet frames and MAC addresses

A switch log keeps saying a host is "flapping between port Gi0/1 and port Gi0/2". What does this suggest?Related

Answer: A layer 2 loop

MAC flapping means the same source MAC keeps arriving on different ports, a typical sign of a loop.

From Why layer 2 loops are deadly

Pass the quiz (60% or more) or mark this topic as done when you are ready.

Your progress is saved on this device only.

Next steps

  1. This is the last topic of “Spanning Tree and EtherChannel”. The module exam comes next.
  2. Module 6 exam: Spanning Tree and EtherChannel · 13 questions · 20 min, without help. 5 topics of this module still to finish first.
  3. Then the next module, Routing: static routes and OSPF. 57 topics left in the course before the final exam.

← Previous: Protecting spanning tree: PortFast, BPDU Guard, Root Guard and Loop Guard