EtherChannel

Layer2 and Layer3 Ether Channels, L2 grouping of switched ports and L3 is a grouping of routed ports acting as a single port with a single IP address

Layer2 EtherChannel

Traffic using the EtherChannel will load balance among the physical interfaces in the group. An algorithm is used to determine which traffic will use which physical interface and is based on 'flows' which is basically means "communication between 2 nodes in the network" (say between a PC and a Printer) Frames in the SAME flow will be forwarded using the SAME PHYSICAL interface (if frames in the same flow were forwarded using different interfaces, some frames sould arrive at the destination out or order, causing problems.Some applications could handle that but others could not) To determine which interface is used for the particular 'flow' is based on configurable inputs:

  • Source OR Destination MAC address

  • Source OR Destination IP address

  • Source AND Destination MAC address

  • Source AND Destination IP address

  • (Some switches also use L4 inputs such as TCP and UDP ports)

Other EtherChannel Names:

  • Port Channel

  • LAG (Link Aggregation Group)

Load Balancing - Check

SW2#show etherchannel load-balance

From above we can see that the load balancing is using the "Source AND Destination IP" algorithm. This means that lets sy all traffic from 10.1.1.1 going to destination 10.1.1.20 will ALWAYS use a specific physical interface within the EtherChannel

Load Balancing - Adjust Settings

SW2(config)#port-channel load-balance ?
  dst-ip       Dst IP Addr
  dst-mac      Dst Mac Addr
  src-dst-ip   Src XOR Dst IP Addr
  src-dst-mac  Src XOR Dst Mac Addr
  src-ip       Src IP Addr
  src-mac      Src Mac Addr

## As can be seen from this and the above - Cisco cant seem to make up their minds
with regard to 'etherchannel' or 'port channel' - go figure!!

SW1# show etherchannel load-balance SW1(config)# port-channel load-balance <method>

EtherChannel Protocols

There are 3 methods:

  1. PAgP (Port Aggregation Protocol) - this is Cisco's proprietary protocol. Only can be done between 2 or more Cisco switches. Dynamically negotiates the creation/maintenance of the EtherChannel (like DTP for trunks)

  2. LACP (Link Aggregation Protocol) - Industry Standard (IEEE 802.3ad)- Also dynamically negotiates the creation and maintenance of the EtherChannel. This is the preferred protocol to use especially across vendor switches.

  3. Static EtherChannel - hard-coded and not recommended as a protocol is not used to determine if an EtherChannel should be formed. Interfaces statically configured to form and EtherChannel

Up to 8 interfaces can be configured into an EtherChannel (LACP allows up to 16 but only 8 will be active, the other 8 in standby mode waiting for an active interface to fail)

Lets See How To Configure Each Method

The configuration for each is almost identical - just have to change out some keywords

PAgP Configuration

NOTE !! CHANNEL-GROUP command is used to configure the etherchannel but the name of the VIRTUAL interface that is CREATED, is "Port-channel" as seen above The "channel-group 1" number has to MATCH the member interfaces (gi0/0 - 3) BUT does NOT have to match the channel-group number on the other switch (eg, channel-group1 on SW1 CAN form am etherchannel with channel-group 33 on DWS1 !!!

LACP Configuration

Static Configuration

Exactly the same, just change the "mode" from whatever it was to "ON"

Configuration Commands

ASW1(config)# interface port-channel 1 ASW1(config-if) switchport trunk encapsulation dot1q ASW1(config-if) switchport mode trunk ASW1(config-if) do show interfaces trunk

SW2(config)#interface range gi0/1 - 2
SW2(config-if-range)#channel-group 10 mode ?
  active     Enable LACP unconditionally
  auto       Enable PAgP only if a PAgP device is detected
  desirable  Enable PAgP unconditionally
  on         Enable Etherchannel only
  passive    Enable LACP only if a LACP device is detected

SW2(config-if-range)#channel-group 10 mode active
Creating a port-channel interface Port-channel 10

SW2(config-if-range)#
*Jul 14 15:21:39.614: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to down
*Jul 14 15:21:39.618: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to down
*Jul 14 15:21:46.951: %EC-5-L3DONTBNDL2: Gi0/2 suspended: LACP currently not enabled on the remote port.
*Jul 14 15:21:47.396: %EC-5-L3DONTBNDL2: Gi0/1 suspended: LACP currently not enabled on the remote port.

We will do the same on Switch3 (LACP currently not enabled) and then check the status of the EtherChannel

VERIFY COMMANDS:

SW2#show etherchannel summary SW2#show etherchannel port-channel

OK - now we can see that EtherChannel is working we can now configure the individual ports as (in this case) trunk ports.

#Etherchnnel Trunk Port Config
interface range gi0/1 -2
switchport trunk encapsulation dot1q
switchport mode trunk
switchport trunk allowed vlan 1-5
no negotiation auto
speed 1000
duplex full

Layer3 EtherChannel - Multilayer Switches

Have replaces ASW1 and DSW1 with multilayer switches. Instead of a Layer 2 connection between them use a lawyer 3 connection. Modern network design often leans towards using L3 connections between switches, because that way SPANNING TREE wont be an issue anywhere in the network!! We could have 4 switches interconnected in a mesh, and if we are connecting them with Layer 3 routed ports, all interfaces will be up and forwarding, none will have to be disabled due to Spanning Tree

If we look at the smaller diagram, even though the 4 etherchannels are L2 thay can cause L2 broadcast storms ansd so Spanning Tree will block one of these to STOP L2 loops

LAB

ASW1#sh spanning-tree
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    20481
             Address     0007.EC07.1D30
             Cost        8
             Port        25(GigabitEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     0005.5E1E.5B9D
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Gi0/2            Altn BLK 4         128.26   P2p
Gi0/1            Root BKN*4         128.25   P2p *TYPE_Inc
Fa0/1            Desg FWD 19        128.1    P2p
Fa0/2            Desg FWD 19        128.2    P2p

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ASW1(config)#int range gi0/1 - 2
ASW1(config-if-range)#channel-group 1 mode active
Creating a port-channel interface Port-channel 1

ASW1(config-if-range)#int po1
ASW1(config-if)#switchport mode trunk

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ASW1(config-if)#do sh run
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
 switchport mode trunk
 channel-group 1 mode active
!
interface GigabitEthernet0/2
 switchport mode trunk
 channel-group 1 mode active
!
interface Vlan1
 no ip address
 shutdown

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

ASW1(config-if)#do sh etherchannel summary
Flags:  D - down        P - 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
        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(SD)           LACP   Gig0/1(I) Gig0/2(I) ====>>> Showing in individaul mode (I) 
====->we havent configured the other half of the etherchannel yet :)
ASW1(config-if)#
ASW1#

Last updated