Whether we are talking about EtherChannels or PortChannels, we are talking about the same technology. That technology is a way to allow you to treat multiple physical links as one link to Spanning-Tree, and you can also do some load-balancing on them.
There are two types of port channels.
- FEC – Fast EtherChannel
- GEC – Gigabit EtherChannel
They can be a layer 2 EtherChannel, or they can be a layer 3 EtherChannel
When a switch decides to load-balance, it will choose from an algorithm (or you can set it manually) on how it should load-balance, and the default varies by switch model. Load-balancing can happen based on layer 2, 3, and/or 4 headers. If load-balancing is based on one header, a bitmap of the low-order bits is used to accomplish the task, but if multiple headers are used, an XOR of the low-order bits is used to determine how to load-balance.
I have a 3550 and 2950, and their default load-balancing is based on source-mac address
3550 – show etherchannel load-balance
SW1#show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
2950 – show etherchannel load-balance
SW1#show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
Source MAC Address
You can explicitly set a port to join an EtherChannel or use a dynamic protocol to create the EtherChannel. The dynamic protocols are;
- LACP – Link Aggregation Control Protocol (802.1AD, Standard)
- PAgP – Port Aggregation Protocol (Cisco Proprietary)
PAgP and LACP Configuration Settings and Recommendations
PAgP Setting | LACP Setting | Action |
On | On | Disables PAgP/LACP; forces interfaces into joining a port-channel |
Off | Off | Disables PAgP/LACP; stops ports from joining a port-channel |
Auto | Passive | Enables LACP; waits for another side to send the first message |
Desirable | Active | Enables PAgP; initiates the port-channel connection |
Using Auto/Auto or Passive/Passive will make a port-channel, not form. It is like both sides of a trunk being in dynamic auto mode.
Cisco recommends that you use Desirable/Desirable or Active/Active to form a port-channel dynamically.
Before a dynamic port-channel is created, several items must be identical on links;
- Speed and duplex
- If not a trunk, the same access VLAN
- If a trunk, same trunk type, allowed VLANS and Native VLAN
- Ports on either side must be the same: trunk, access, routed.
- No SPAN ports can be a part of a port-channel. If you try to use a SPAN port as a source or destination SPAN port and it is a part of a port-channel, it will give you a warning that it will be removed
- On a single switch, the STP port costs on all ports in the port channel must be identical
- For a layer 3 port-channel, the IP is configured on the port-channel interface, not on the physical interfaces
Sample layer 2 port-channel configuration.
The far side is set to LACP Active; in channel-group 6, the command is channel-group 6 mode active.
We will configure our site to be in channel-group 1, using LACP passive; let’s see if it forms.
The configuration is done on ports Ethernet 0/1 and 0/3
SW1(config)#int range e0/1, e0/3
SW1(config-if-range)#channel-group 1 mode passive
Creating a port-channel interface Port-channel 1
Verification 1 – show interface trunk
SW1#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Po1 on 802.1q trunking 1
Port Vlans allowed on trunk
Po1 1-4094
Port Vlans allowed and active in management domain
Po1 1,10,20,30,40,100-101
Port Vlans in spanning tree forwarding state and not pruned
Po1 1,10,20,30,40,100-101
SW1#
OK, so far, it looks good. We see only one trunking interface, and it is the newly created port-channel; let’s do a second verification.
Verification 2 – show etherchannel summary
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 f - failed to allocate aggregator
M - not in use, minimum links not met
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) LACP Et0/0(P) Et0/3(P)
SW1#
The ports are bundled in the port-channel as shown by the (P), and the port-channel Po1 is a Layer 2 port-channel and in-use as shown by (SU)
So that’s it. We have verified a successful port-channel configuration, and just in case anyone wanted to see what the configuration looks like on the port channel, it is
SW1#show run interface port-channel1
Building configuration...
Current configuration : 104 bytes
!
interface Port-channel1
switchport
switchport trunk encapsulation dot1q
switchport mode trunk
I did not add any of those commands; the switch auto-populated based on what was configured on the physical ports. Remember, it can do that because since this is a layer 2 trunk, the allowed VLAN list, trunk type, and native VLAN have to match the port-channel to be created.