Thursday, September 8, 2022

Port Aggregation With Etherchannels

Need for Port Aggregation

A network will often span across multiple switches. Trunk ports are usually used to connect switches together.
There are two issues with using only a single physical port for the trunk connection:

  • The port represents a single point of failure. If the port goes down, the trunk connection is lost.
  • The port represents a traffic bottleneck. All other ports on the switch will use that one port to communicate across the trunk connection.
Thus, the obvious benefits of adding redundancy to the trunk connection are fault tolerance and increased bandwidth, via load balancing. However, simply trunking two or more ports between the switches will not work, as this creates a switching loop. One of two things will occur:
  • Spanning Tree Protocol (STP) will disable one or more ports to eliminate the loop.
  • If STP is disabled, the switching loop will result in an almost instantaneous broadcast storm, crippling the network.
Frequently, a single point-to-point link between two switches do not provide sufficient bandwidth to
transfer all necessary traffic. Additional links will be blocked by Spanning-Tree
 
Port aggregation allows multiple physical ports to be bundled together to form a single logical port. The switch and STP will treat the bundled ports as a single interface, eliminating the possibility of a switching loop. Cisco’s implementation of port aggregation is called EtherChannel.
EtherChannel’s obfuscate individual P2P links from STP and transfer STP control to a single, logical Port-Channel interface.

EtherChannel Overview

Etherchannel is a link aggregation technique on Cisco devices (primarily switches) that allows you to bundle multiple physical links into a single logical link. The advantage of Etherchannels is that it provides fault tolerance and high bandwidth.

  • It is Link aggregation method
  • Defined by IEEE 802.3ad standard.
  • EtherChannel supports Fast, Gigabit, and 10 Gigabit Ethernet ports.
A maximum of 8 active ports are supported in a single EtherChannel. You can assign up to 16 physical interfaces to an EtherChannel but only 8 interfaces will be active at a time.
 If the ports are operating in full duplex, the maximum theoretical bandwidth supported is as follows:

  • Fast Ethernet – 1600 Mbps
  • Gigabit Ethernet – 16 Gbps
  • 10 Gigabit Ethernet – 160 Gbps
The maximum number of supported EtherChannels on a single switch is platform-dependent, though most support up to 64 or 128 EtherChannels.
Can be used to bundle:

  • L2 Access Ports
  • L2 VLAN Trunks
  • L3 Routed Ports (utilizing a single subnet)

Like VLAN Trunks, Etherchannels can either be statically defined or one can utilize dynamic protocols to create and maintain the channel.

For an EtherChannel to become active, all ports in the bundle must be configured identically, regardless of if the EtherChannel is being used with access or trunk ports. Port settings that must be identical include the following:

  • Speed settings
  • Duplex settings
  • STP settings
  • VLAN membership (for access ports)
  • Native VLAN (for trunk ports)
  • Allowed VLANs (for trunk ports)
  • Trunking encapsulation protocol (for trunk ports)

Etherchannel Load-Balancing

Traffic sent across an EtherChannel is not evenly distributed across all ports in the bundle. Instead, EtherChannel utilizes a load-balancing algorithm to determine the port to send the traffic out, based on one of several criteria:

  • Source IP address - src-ip
  • Destination IP address - dst-ip
  • Source and destination IP address - src-dst-ip
  • Source MAC address - src-mac
  • Destination MAC address - dst-mac
  • Source and Destination MAC address - src-dst-mac
  • Source TCP/UDP port number - src-port
  • Destination TCP/UDP port number - dst-port
  • Source and destination port number - src-dst-port
Etherchannels do not fragment Layer-2 frames
Load-balancing accomplished per-flow of traffic
Frames belonging to the same flow always traverse the same physical link
The default load-balancing method for a Layer-2 EtherChannel is either srcmac or src-dst-mac, depending on the platform.
The default method for a Layer-3 EtherChannel is src-dst-ip.

  • The load-balancing method must be configured globally on the switch:
Switch(config)# port-channel load-balance src-dst-mac
  • To display the currently configured load-balancing method:
Switch# show etherchannel load-balance
EtherChannel Load-balancing Configuration:
src-dst-mac
  • To view the load on each port in an EtherChannel (output abbreviated):
Switch# show etherchannel 1 port-channel
Index Load Port EC state
------+------+--------+------------
 0 55 Gi2/23 active
 1 3A Gi2/24 active
The load is rather cryptically represented in a hexadecimal value.

Keep in mind that the physical links remain the limiting factor. A single traffic flow won’t be able to exceed > 1000 Mbit (single Gigabit link).
An Etherchannel is the equivalent of adding more lanes to a highway. The bandwidth increases, but the speed limit doesn’t change. 

If you want to configure an EtherChannel then we have three options:

  • PAgP (Cisco proprietary)
  • LACP (IEEE standard)
  • Manual
PAgP and LACP are negotiation protocols that dynamically configure an Etherchannel. 
PAgP is a Cisco proprietary protocol so you can only use it between Cisco devices. 
LACP is an IEEE standard which many vendors support.
It’s also possible to configure a static EtherChannel without these protocols doing the negotiation of the link for you.
If you are going to create an EtherChannel you need to make sure that all interfaces have the same configuration.

EtherChannel – Manual Configuration

To manually configure two ports to join an EtherChannel:

Switch(config)# interface range gi2/23 - 24
 Switch(config-if)# channel-group 1 mode on

  • The remote switch must also have the EtherChannel manually configured as on. 
  • Remember that speed, duplex, VLAN, and STP configuration must be configured identically across all participating ports on both switches.
  • The channel-group number identifies the EtherChannel on the local switch.
  • This number does not need to match on both switches, though for documentation purposes it should.
  • Adding switch ports to a channel-group creates a logical port-channel interface. 
  • This interface can be configured by referencing the channel group number.
  • Changes made to the logical port-channel interface are applied to all physical switch ports in the channel-group.
Switch(config)# interface port-channel 1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan 50-100

To configure a port-channel as a Layer-3 interface:

Switch(config)# interface port-channel 1
Switch(config-if)# no switchport
Switch(config-if)# ip address 192.168.10.1 255.255.255.0

By default, a port-channel interface is administratively shutdown. To bring the port-channel online:

Switch(config)# interface port-channel 1
Switch(config-if)# no shut

Physical port properties, such as speed and duplex, must be configured on the physical interface, and not on the port-channel interface.

Dynamic Channeling with PAgP

  • PAgP = Port Aggregation Protocol
  • Cisco proprietary
  • Supports up to eight (8) active links in a channel
  • PAgP Modes
  • Auto = Passive/listening state for inbound PAgP frames
  • Desirable = Aggressive/initiating state which transmits PAgP frames
  • A PAgP channel will form in the following configurations:
Desirable <-----> desirable
desirable <-----> auto

A channel will not form if both sides are set to auto. Also, PAgP will not form a channel if the remote side is running LACP, or manually configured.
To create an EtherChannel using PAgP negotiation:

Switch(config)# interface range gi2/23 – 24
Switch(config-if)# channel-protocol pagp
Switch(config-if)# channel-group 1 mode desirable
Switch(config-if)# channel-group 1 mode auto

PAgP requires that speed, duplex, VLAN, and STP configuration be configured identically across all participating ports.

Dynamic Channeling With LACP

  • LACP = Link Aggregation Control Protocol
  • IEEE Standard (802.3ad)
  • Supports up to eight (8) active links in a channel
  • Supports hot-standby links
  • LACP Modes:
  • Passive = Passive/listening state for inbound LACP frames
  • Active = Aggressive/initiating state which transmits LACP frames
  • An LACP channel will form in the following configurations:
active <-----> active
active <-----> passive

A channel will not form if both sides are set to passive. Also, LACP will not form a channel if the remote side is running PAgP, or manually configured.
To create an EtherChannel using LACP negotiation:

Switch(config)# interface range gi2/23 – 24
Switch(config-if)# channel-protocol lacp
Switch(config-if)# channel-group 1 mode active
Switch(config-if)# channel-group 1 mode passive

  • LACP requires that speed, duplex, VLAN, and STP configuration be configured identically across all participating ports.
  • Recall that a maximum of 8 active ports are supported in a single EtherChannel. LACP supports adding an additional 8 ports into the bundle in a standby state, to replace an active port if it goes down.
LACP assigns a numerical port-priority to each port, to determine which ports become active in the EtherChannel. 
By default, the priority is set to 32768, and a lower priority is preferred. If there is a tie in port-priority, the lowest port number is preferred.
To change the LACP port-priority to something other than default:

Switch(config)# interface range gi2/23 – 24
Switch(config-if)# lacp port-priority 100

LACP also assigns a system-priority to each switch, dictated which switch becomes the decision-maker if there is a conflict about active ports. 
The default system-priority is 32768, and a lower priority is again preferred. If there is a tie in system-priority, the lowest switch MAC address is preferred.
To globally change the system-priority on a switch:

Switch(config)# lacp system-priority 500

Etherchannel Configuration Guidelines and Steps

  • All links in an Etherchannel must terminate between the same two switches
  • All link characteristics must be the same
Speed & Duplex settings
Configuration settings
  • Logical Port-Channel Interfaces
Dynamically created
Subsequent configuration changes should have done here
  • Ensure consistency between all potential links
  • Select an unused number for a Port-Channel interface
  • Bundle links into your Etherchannel

  • Designate a minimum number of links for the channel to become active:
Switch(config)#interface port-channel <id>
Switch(config-if)#port-channel min-links <value>
  • Designate the maximum number of LACP links allowed in bundle
Remaining links placed in hot-standby state
Switch(config)#interface port-channel <id>
Switch(config-if)#lacp max-bundle <1-8>

  • Some EtherChannel Monitoring Command:
show etherchannel summary
show interface port-channel <value>
show lacp neighbor detail
show lacp internal
show pagp neighbor

No comments:

Post a Comment