Friday, August 2, 2013

EtherChannel – Quick and Dirty

EtherChannel allows you to aggregate several switch links into a single, fast, fault-tolerant, logical interface. 16 links can be defined for an EtherChannel, however, a maximum of 8 will be active at any one time.  The other links are placed on standby.

While having multiple links between two switches can possibly create bridging loops, EtherChannel avoids this by bundling the links into a single logical interface.  This logical interface can be configured as an access or trunk interface.

For ports to be members of the same EtherChannel, there are some restrictions. Ports must:

  • Belong to the same VLAN
  • Have identical STP settings
  • Have identical speed/duplex settings
  • Note: In addition, if the EtherChannel is to be used as a trunking interface, all ports must be in trunking mode, have the same native VLAN, and pass the same set of VLANs.

The full duplex maximum bandwidth for 8 links is as follows:

  • Fast EtherChannel (FEC): 1600 Mbps
  • Gigabit EtherChannel (GEC): 16Gbps
  • 10-Gigabit EtherChannel (10GEC): 160Gbps
  • Note:  This is theoretical; maximum bandwidth is not likely to be achieved due to unequal load balancing, and other factors.

Load Balancing

 

EtherChannel load balancing across the links can occur in a number of configurable methods for optimization in your environment. IP addresses, MAC addresses, and TCP/UDP port numbers can be leveraged. The complete list is:

  • Source IP (src-ip)
  • Destination IP (dst-ip)
  • Source and Destination IP (src-dst-ip)
  • Source MAC (src-mac)
  • Destination MAC (dst-mac)
  • Source and Destination MAC (src-dst-mac)
  • Source Port (src-port)
  • Destination Port (dst-port)
  • Source and Destination Port (src-dst-port)

When more than one item is utilized in the load balancing method,  an XOR operation occurs, and for 2 links, the last bit is utilized.  Four links uses the last two bits, and eight links use the last three.  Below shows two switches with an EtherChannel with four links, configured to use the Source and Destination IP (src-dst-ip) method of load balancing.  The four different examples show how the links are used as different devices communicate across the two switches.

EtherChannelLoadBalancing

 

For best results, it is recommended to consider using MAC addresses or the Source IP address as your load-balancing method.  However, this all depends on your environment. For example, a router always uses it’s burned-in MAC address, so the destination MAC address remains the same for all frames destined through the router.  When two routers are forwarding traffic to each other, MAC addresses remain constant, so only one link is used.  Using IP addresses as the load-balancing method instead may be a better idea.  If most of the traffic is between the same two IP addresses, use IP port numbers instead.

If EtherChannel traffic consists of non-IP traffic, distribution according to MAC address is recommended.

If a frame can’t meet load-balancing criteria, switch reverts to “next lowest” method. For instance is MAC traffic is sent across an EtherChannel that’s configured to load-balance by IP addressing, MAC addresses will be used instead.

To prevent loops, inbound (received) broadcasts and multicasts are not sent back out any of the links.  Outbound frames are load-balanced normally.

 

EtherChannel Negotiation: PAgP vs. LACP

 

There are two EtherChannel negotiation protocols.  Port Aggregation Protocol (PAgP) is a Cisco-proprietary protocol, while Link Aggregation Control Protocol (LACP) is standards based.

PAgP dynamically modifies the EtherChannel if one of the ports’ VLAN, speed, etc. is changed so that all of the links in the EtherChannel match. PAgP can be configured in active mode (desirable), which actively attempts negotiation.  Passive mode (auto, the default) only negotiates an EtherChannel if the far end initiates it.

LACP assigns roles to end points.  The switch with the lowest system priority makes decisions about what ports will participate in the EtherChannel at any given time.  If you’re familiar with STP, this is similar to the way the Root Bridge is elected.  Ports are selected and become active in the EtherChannel according to their port priority. LACP Active mode (active) – actively negotiates, while passive mode (passive) negotiates only if the far end initiates it.

Lastly, the “on” mode forces the EtherChannel to be formed; no PAgP/LACP negotiation occurs when this mode is utilized.

Here’s a configuration Video:

PAgP EtherChannel Configuration

6 comments:

  1. I came here while preparing for the CCNP switching exam.Nice post

    ReplyDelete
  2. To be completely precisely Cisco's devices can support more than 16 EtherChannels:
    - 4500/4000 (with Supervisor Engine II or later) or 6500/6000 series switches running Cisco OS support up to 64 EtherChannels,
    - 4500/4000 (with Supervisor Engine I and II) or 6500/6000 series switches running Catalyst OS support up to 126 EtherChannels.

    But for the sake of examination maximum amount of EtherChannels is reduced to 16.

    ReplyDelete
    Replies
    1. Thanks for that information Michal, but I think what you are referring to is the number of EtherChannels supported by a given platform? What we are discussing here is the maximum number of links inside of a single EtherChannel.

      Delete
    2. Yes, you are right. Sorry for the mess, I read that too fast. Anyway, post is written in a very familiar style.

      Delete
    3. Yes, it either looks familiar because I copied it over from my old blog, Networks-Wetworks.com, or that I borrowed a large portion of the content from the CCNP BCMSN or SWITCH book. Hard to be original about hard facts.

      Delete