EtherChannel
1.1.d Introduction (Not on blueprint)
EtherChannel characteristics:
- Logical aggregation of physical links between two switches (one-to-one connection)
- Up to 8 active ports can be bundled into 1 logical EtherChannel
- Every port has to have the same speed and duplex settings, no mixing possible
- The configuration of the logical Port-Channel is inherited to the physical member interfaces
- This is because in an EtherChannel each member interface must have the same configuration
- If one (1) or several links fail, the Etherchannel will still be up with the remaining links (redundancy)
- STP sees an EtherChannel as 1 logical port
- STP will give the EtherChannel a higher cost if one or more links fail
- Load sharing/balancing across bundled links is done by default with different possible algorithms (configurable)
- Increase of bandwidth bandwidth
- Different EtherChannel protocols (LACP, PAgP, manual/static) can’t be mixed
- EtherChannels should always have a bundle of link numbers based on 2^x
- Layer 2 EtherChannel can be in trunk or access mode
- EtherChannels across two or more stacked switches are called Multichassis EtherChannel
- Important: It’s a common misunderstanding that an EtherChannel doubles/triples/… the bandwidth for a single end user session. If every bundled link has 1G, a single end user session will still have a maximum bandwidth of 1G. This is because a single flow doesn’t split up between several links.
- Important: STP sees an EtherChannel as 1 logical port. STP either blocks the whole EtherChannel or nothing but never one single link of an EtherChannel.
“EtherChannel” CLI configuration commands:
## Configuring an EtherChannel interface (trunk mode)
Switch(config)# interface port-channel <id>
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan <vlan-ids>
## Configuring an EtherChannel interface (access mode)
Switch(config)# interface port-channel <id>
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan <vlan-id>
## Assigning EtherChannel to a range of interfaces
Switch(config)# interface range <if-range>
Switch(config-if)# channel-group <po-id> mode [active | passive | desirable | auto | on]
“EtherChannel” CLI show commands:
## Showing configuration of a specific EtherChannel
Switch# show interface port-channel <id>
## Showing configured EtherChannels, their used protocol and assigned ports
Switch# show etherchannel summary
## Showing configured EtherChannels and their technical details
Switch# show etherchannel port-channel
1.1.d i LACP, static
LACP
Link Aggregation Channel Protocol
General information on “LACP”:
- Open standard
- Also known as IEEE 802.1ax
How “LACP” works:
- LACP does negotiation by sending LACP packets to its peer
- LACP assigns a priority value to each port with EtherChannel capabilities
- 16 ports can be assigned to an LACP-based EtherChannel but only 8 with the lowest priority will be used
- The remaining ports will only be bundled if an already bundled port fails
“LACP” characteristics:
- LACP packets are sent every 30 seconds by default
- LACP checks for configuration consistency and manages link additions and failures
- Verifies that all physical and configurational conditions are consistent
“LACP” priorities:
- System priority has a default of 32768, lower is better
- If two connected LACP devices have the same priority (tie), the lower MAC address decides who is “the master”
- Port priority has a default value of 32768, lower is better
- Port priority makes sense when bundling more than 8 links together
- If two or more ports have the same priority (tie), the lower Port ID wins
“LACP"modes:
- LACP active: Interface is active, sends out LACP packets (does active negotiation)
- LACP passive: Interface is passive, listens to LACP packets but doesn’t send them out
“LACP” channel mode interoperability:
Channel mode | Active | Passive |
---|---|---|
Active | Yes | Yes |
Passive | Yes | No |
“LACP” CLI configuration commands:
## Setting the EtherChannel mode to LACP
Switch(config)# interface range <if-range>
Switch(config-if)# channel-protocol lacp
Switch(config-if)# channel-group <po-id> mode [active | passive]
Switch(config-if)# lacp port-priority <value>
“LACP” CLI show commands:
## Showing LACP neighbors
Switch# show lacp neighbor
PAgP (not on blueprint)
Port Aggregation Protocol
General information on “PAgP”:
- Cisco proprietary protocol
How “PAgP” works:
- PAgP packets are sent between EtherChannel-capable ports to negotiate the forming of the channel
- When PAgP identifies matched Ethernet links, it groups the links into an EtherChannel
- The EtherChannel then gets added to STP as a single bridge port
“PAgP” characteristics:
- PAgP packets are sent every 30 seconds by default
- PAgP checks for configuration consistency and manges link additions and failures
- Verifies that all physical and configurational conditions are consistent
“PAgP” modes:
- PAgP desirable: Interface is active, sends out PAgP packets (does active negotiation).
- PAgP auto: Interface is passive, listens to PAgP packets but doesn’t send them out.
“PAgP” channel mode interoperability:
Channel mode | Desirable | Auto |
---|---|---|
Desirable | Yes | Yes |
Auto | Yes | No |
“PAgP” CLI configuration commands:
## Setting the EtherChannel mode to PAgP
Switch(config)# interface range <if-range>
Switch(config-if)# channel-protocol pagp
Switch(config-if)# channel-group <po-id> mode [desirable | auto]
“PAgP” CLI show commands:
## Showing PAgP neighbors
Switch# show pagp neighbor
static
General information on “static”:
- Manual (static) EtherChannel bypasses the negotiation process (LACP or PAgP)
- Both sides must be configured in mode “on” to work
“static” characteristics:
- Since there’s no negotiation, loops/packet loss/… can occur if only one side of the links is configured as static EtherChannel while the other side of the links aren’t configured for EtherChannel
“static” CLI configuration commands:
## Setting the EtherChannel mode to static
Switch(config)# interface range <if-range>
Switch(config-if)# channel-group <po-id> mode on
“static (EtherChannel)” CLI show commands:
## Showing configured EtherChannels, their used protocol and assigned ports
Switch# show etherchannel summary
1.1.d ii Layer 2, Layer 3
Layer 2
General Information on “Layer 2 EtherChannels”:
- Layer 2 EtherChannels are used for Switching purposes
- STP “sees” Layer 2 EtherChannels as one logical link
Layer 3
General Information on “Layer 3 EtherChannels”:
- Layer 3 EtherChannels are used for Routing purposes
- Therefore an IP needs to be assigned to the EtherChannel
- The IP address must be configured on the logical Port-Channel interface and not on the physical member interfaces
- STP will not be active since it’s Layer 3
1.1.d iii Load balancing
General Information on “Load balancing”:
- Not pure load balancing but more like load distribution
- Configured globally and not per EtherChannel
- Load doesn’t get equally balanced over all bunded ports
- Cisco proprietary hash algorithm runs on an EtherChannel with values from 0-7
- Hash is calculated from fields in the packet header (see possible algorithms below)
- Link count goes from 0 to 7 where 0 = Link 1 and 7 = Link 8
- Per-flow balancing
- The possible configurable algorithm types are platform-specific
“Load balancing” algorithm can be based on:
- Source IP address
- Destination IP address
- Both source and destination IP address (XOR)
- Source MAC address
- Destination MAC address
- Both source and destination MAC address (XOR)
- TCP/UDP port numbers
- […] and more or less, depending on the platform […]
“Load balancing” issue:
- Polarization = Always the same link will be used for the traffic
- Polarization is an issue with “static” algorithms
- “Static algorithms” = Algorithms where the information (source/destination MAC/IP) used to calculate the to-be-used-link always stays the same
- Problem: Using only the source MAC address as algorithm uses always the same link for a specific host since MAC addresses are normally tied to a specific host and don’t change.
- Solution: Using a “modern” algorithm which combines different variables such as source/destination MAC/IP + TCP/UDP port numbers.
“Load balacing” XOR-logic:
- If the compared bits are the same, the result is 0
- If the compared bits are different, then the result is 1
- The last 1-3 bits are used to calculate the EtherChannel algorithm value (from left to right)
# of links in EtherChannel | # of lowest-order bits to XOR | possible results |
---|---|---|
2 | 1 | 0,1 |
4 | 2 | 0,1,2,3 |
8 | 3 | 0,1,2,3,4,5,6,7 |
“Load balancing” exact distribution:
# of links in EtherChannel | Load Balancing |
---|---|
8 | 1:1:1:1:1:1:1:1 |
7 | 2:1:1:1:1:1:1 |
6 | 2:2:1:1:1:1 |
5 | 2:2:2:1:1 |
4 | 2:2:2:2 |
3 | 3:3:2 |
2 | 4:4 |
“EtherChanel Load balancing” CLI configuration commands:
## Modify the EtherChannel load balancing algorithm
Switch(config)# port-channel load-balance <algorithm>
“EtherChanel Load balancing” CLI show commands:
## Showing the current set EtherChannel load balancing algorithm
Switch# show etherchannel load-balance
1.1.d iv EtherChannel Misconfiguration Guard
General information on “EtherChannel Misconfiguration Guard”:
- Works only with LACP or PAgP
- Prevents misconfiguration of EtherChannels
- …and therefore prevents creating loops due to misconfigured EtherChannels
- If a possible switching loop is detected, all ports of an EtherChannel are set into err-disabled state immediately
- Possible misconfiguration issues: different parameters on both switches, one switch configured as EtherChannel while other is not, …
“EtherChannel Misconfiguration Guard” CLI configuration commands:
## Disabling/Enabling EtherChannel misconfiguration guard
Switch(config)# [no] spanning-tree etherchannel guard misconfig
“EtherChannel Misconfiguration Guard” CLI show commands:
## Showing the status of EtherChannel misconfiguration guard
Switch# show spanning-tree summary | in EtherChannel