EtherChannel

From Teknologisk videncenter
Jump to: navigation, search

Link to CCNPv5 semester 3 chapter 3

EtherChannel

EtherChannel is a standard where you can bundle up to eight ethernet links of the same speed. IE. 10 Mbps, 100 Mbps, 1Gbps or 10 Gbps. If you bundle 4 ports of 100 Mbps you get a througoutput through the EtherChannel of up to 400 Mbps.

  • restrictions
    • The ports must have the same speed and duplex settings
    • The ports must be in the same VLAN or
    • The ports must all be trunks and have the same VLAN's allowed

You can bundle 2, 4 or 8 ports in the bundle. If a link fails the load carried by that link is moved to the other links.

Distributing traffic in the EtherChannel

The load between the links in the EtherChannel is not necessarily balanced equally. The load is divided between the channels using a hash algorithm. The algorithm can use different kind of input to the load balancing hash algorithm.

The load balance method is set system wide on the Switch.

Switch(config)# port-channel load-balance src-ip
Etherchannel load balancing hash input
Value Hash input Hash operation Switch models
src-ip Source IP Address bits 6500/4500/3750/3560/2970
dst-ip Destination IP Address bits 6500/4500/3750/3560/2970
src-dst-ip Source and Destination IP Address XOR 6500/4500/3750/3560/2970
src-mac Source MAC address bits 6500/4500/3750/3560/2970
dst-mac Destination MAC address bits 6500/4500/3750/3560/2970
src-dst-mac Source and Destination MAC address XOR 6500/4500/3750/3560/2970
src-port Source port number bits 6500/4500
dst-port Destination port number bits 6500/4500
src-dst-port Source and Destination port number XOR 6500/4500

HASH algorithm

src-mac example

If for example src-mac address is chosen as load balancing parameter and there are four links in the EtherChannel the two low order bits of the MAC address decides which of the four links in the EtherChannel the frame is forwareded over.

  • MAC address XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXX00 = Link 0
  • MAC address XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXX01 = Link 1
  • MAC address XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXX10 = Link 2
  • MAC address XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXX11 = Link 3

If the EtherChannel consists of eight links. Three bits are used

src-dst-ip example

The EtherChannel consists of two links. Therefore only on bit is used for the source and the destination address to calculate the hash. XOR see below is use to calculate the link where the frame is forwarded

  • Source IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX0 XOR Destination IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX0 = link 0
  • Source IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX0 XOR Destination IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX1 = link 1
  • Source IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX1 XOR Destination IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX0 = link 1
  • Source IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX1 XOR Destination IP XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXX1 = link 0
XOR

Exclusive OR

XOR with 2 bits
Input A Input B output
0 0 0
0 1 1
1 0 1
1 1 0

How the traffic is distributed through the links

Link load balancing in EtherChannel
Number of Ports 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

Link Aggregation Control Protocols

There are two different Link Aggregation Control Protocols

  • PAgP - Port Aggregation Protocol
    • Cisco proprietary protocol.
  • LACP - Link Aggregation Protocol
    • IEEE standard. 802.3ad

PAgP

PAgP packets are sent between Fast EtherChannel-capable ports to negotiate the forming of a channel. When PAgP identifies matched Ethernet links, it groups the links into an EtherChannel. The EtherChannel is then added to the spanning tree as a single bridge port.

PAgP manages EtherChannel. PAgP packets are sent every 30 seconds using multicast group MAC address 01-00-0C-CC-CC-CC with protocol value 0x0104. PAgP checks for configuration consistency and manages link additions and failures between two switches. It ensures that when an EtherChannel is created that all ports have the same type of configuration, because it is mandatory that all ports have the same speed, duplex setting, and VLAN information. Any port modification after the creation of the channel will also change all the other channel ports.

The last component of EtherChannel is the creation of the logical port. The logical port, or Agport, is composed of all the ports that make up the EtherChannel. The Agport’s functionality and behavior are no different than any other port. For instance, the spanning tree algorithm treats Agport as a single port.

Older switches such as 2950 only supports PAgP

LACP

LACP is part of an IEEE specification (802.3ad) that allows several physical ports to be bundled together, to form a single logical channel. LACP allows a switch to negotiate an automatic bundle by sending LACP packets to the peer. It performs a similar function as PAgP with Cisco EtherChannel. Because LACP is an IEEE standard, it can be used to facilitate EtherChannels in mixed-switch environments.

Interfaces can be set in any of several modes to control EtherChannel formation.

The following parameters are used in configuring LACP:

  • System priority
    • Each switch running LACP must have a system priority, which can be specified automatically or through the CLI. The switch uses the MAC address and the system priority to form the system ID.
  • Port priority
    • Each port in the switch must have a port priority, which can be specified automatically or through the CLI. The port priority and the port number form the port identifier. The switch uses the port priority to decide which ports to put in standby mode when a hardware limitation prevents all compatible ports from aggregating.
  • Administrative key
    • Each port in the switch must have an administrative key value, which can be specified automatically or through the CLI. The administrative key defines the ability of a port to aggregate with other ports, determined by the following:
      • The port’s physical characteristics, such as data rate, duplex capability, and point-to-point or shared medium
      • The configuration constraints that you establish

LACP attempts to configure the maximum number of compatible ports in a channel. In some instances, LACP is not able to aggregate all the ports that are compatible; for example, the remote system might have more restrictive hardware limitations. When this occurs, all the ports that cannot be actively included in the channel are put in hot standby state and used only if one of the channeled ports fails.

EtherChannel configuration modes

Etherchannel Configuration modes
PaGP LACP

AUTO:
This PAgP mode places an interface in a passive negotiating state in which the interface responds to the PAgP packets that it receives but it does not initiate PAgP negotiation. (default)

PASSIVE:
This LACP mode places a port in a passive negotiating state. In this state the port responds to LACP packets that it receives but it does not initiate LACP negotiation. (default)

DESIRABLE:
This PAgP mode places an interface in an active negotiating state in which the interface sends PAgP packets to try and make a PAgP peer.

Active: This LACP mode places an interface in an active negotiating state in which the interface sends LACP packets to try and make a LACP peer.

ON: This mode forces the interface to channel. No use for PAgP or LACP

ON: This mode forces the interface to channel. No use for PAgP or LACP

EtherChannel configuration

PAgP mode

port-channel load-balance dst-mac
!
interface fastethernet 0/1
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,100-199
 switchport mode trunk
 switchport nonegotiate
 duplex full
 speed 100
 channel-group 2 mode desireable
!
interface fastethernet 0/2
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 1,100-199
 switchport mode trunk
 switchport nonegotiate
 duplex full
 speed 100
 channel-group 2 mode desireable

explanation