EtherChannel Configuration: L2 and L3 Bundling with Load Balancing

Overview

This lab focuses on implementing and verifying EtherChannel technology to combine multiple physical links into logical bundles, thereby enhancing bandwidth and redundancy. Layer 2 EtherChannels were configured using both LACP and PAgP between access and distribution switches, while a Layer 3 EtherChannel was created between the distribution switches using static mode. Load balancing methods were reviewed and updated to utilize both source and destination IP addresses for improved traffic distribution.

Skills Demonstrated
Configuring Layer 2 EtherChannels using LACP (active mode)
Configuring Layer 2 EtherChannels using PAgP (desirable mode)
Implementing Layer 3 static EtherChannel with routed ports
Verifying EtherChannel states using summary commands
Modifying and confirming EtherChannel load-balancing behavior
Establishing IP routing and configuring static routes for inter-VLAN communication
Testing end-to-end connectivity across the topology
Tools Used
Cisco Packet Tracer
Switch and Route CLI
EtherChannel Summary and Load-Balance Commands
Ping Utility
Trunk and Routed Interfaces

1. Network Topology

I have set up a network topology to simulate access layer switches and distribution layer switches. All of the connections between these switches have redundant links, and because of STP, only one link will be active at a time while the other will be a backup.

To have both links be forwarding at the same time and increase potential bandwidth, I will be setting up Layer 2 EtherChannel configuration between the access layer switches (ASW) and the distribution layer switches (DSW), and Layer 3 EtherChannel configuration between the distribution layer switches.


2. Layer 2 EtherChannel Configuration

ASW1 → DSW1 EtherChannel Configuration (LACP)

Starting first on ASW1, looking at the port roles with the "show spanning-tree" command, we can see that G0/1 is the root port and is forwarding and G0/2 is an alternate port and won't forward or receive frames. Once configured with an EtherChannel, they will turn into one port channel interface which will be the root port and forward traffic using both physical interfaces.

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
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.1    P2p
Gi0/2            Altn BLK 4         128.26   P2p
Gi0/1            Root FWD 4         128.25   P2p
Fa0/2            Desg FWD 19        128.2    P2p

To configure both G0/1 and G0/2 together, I run the following commands and I will be using LACP protocol which allows for an active or passive mode. Once configured with EtherChannel I will also make the new port channel a trunk port.

ASW1> en
ASW1#> conf t
ASW1(config)# int range g0/1 - 2
ASW1(config-if-range)# channel-group 1 mode active
ASW1(config-if-range)# int po1
ASW1(config-if)# switchport mode trunk

Now when running the "show etherchannel summary" command we get the following output:

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)

Now on DSW1, I configure interfaces G1/0/3 and G1/0/4 to be EtherChannel and trunk ports as well:

DSW1> en
DSW1#> conf t
DSW1(config)# int range g1/0/3 - 4
DSW1(config-if-range)# channel-group 1 mode active
DSW1(config-if-range)# int po1
DSW1(config-if)# switchport mode trunk

Now when running the "show etherchannel summary" command on DSW1 we see the following output and a "P" flag letting us know it's set up correctly:

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(SU)           LACP   Gig1/0/3(P) Gig1/0/4(P)

And when running "show interface trunk" we can see that port Po1 is a trunk port:

Port        Mode         Encapsulation  Status        Native vlan
Po1         on           802.1q         trunking      1

Port        Vlans allowed on trunk
Po1         1-1005

Port        Vlans allowed and active in management domain
Po1         1

Port        Vlans in spanning tree forwarding state and not pruned
Po1         none

Finally, when running "show spanning-tree" we can see that those interfaces have been replaced with Po1 and are forwarding:

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    20481
             Address     0007.EC07.1D30
             Cost        4
             Port        1(GigabitEthernet1/0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24577  (priority 24576 sys-id-ext 1)
             Address     0002.161B.EBBC
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po1              Desg FWD 3         128.29   Shr
Gi1/0/1          Root FWD 4         128.1    P2p
Gi1/0/2          Altn BLK 4         128.2    P2p

ASW2 → DSW2 EtherChannel Configuration (PAgP)

Now I am going to make the same EtherChannel and trunk port configurations from ASW2 to DSW2, except I will be using the PAgP protocol which uses desirable and auto.

I run the following commands on ASW2:

ASW2> en
ASW2#> conf t
ASW2(config)# int range g0/1 - 2
ASW2(config-if-range)# channel-group 1 mode desirable
ASW2(config-if-range)# int po1
ASW2(config-if)# switchport mode trunk

Then I run the following commands on DSW2:

DSW2> en
DSW2#> conf t
DSW2(config)# int range g1/0/3 - 4
DSW2(config-if-range)# channel-group 1 mode active
DSW2(config-if-range)# int po1
DSW2(config-if)# switchport mode trunk

Now when running the "show etherchannel summary" command on DSW1 we see the following output and a "P" flag letting us know it's set up correctly:

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(SU)           PAgP   Gig1/0/3(P) Gig1/0/4(P)

And when running "show interface trunk" we can see that port Po1 is a trunk port:

Port        Mode         Encapsulation  Status        Native vlan
Po1         on           802.1q         trunking      1

Port        Vlans allowed on trunk
Po1         1-1005

Port        Vlans allowed and active in management domain
Po1         1

Port        Vlans in spanning tree forwarding state and not pruned
Po1         1

Finally, when running "show spanning-tree" we can see that those interfaces have been replaced with Po1 and are forwarding:

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    20481
             Address     0007.EC07.1D30
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    20481  (priority 20480 sys-id-ext 1)
             Address     0007.EC07.1D30
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po1              Desg FWD 3         128.29   Shr
Gi1/0/1          Desg FWD 4         128.1    P2p
Gi1/0/2          Desg FWD 4         128.2    P2p

3. Layer 3 EtherChannel Configuration

Now I will be configuring EtherChannel between the Layer 3 Switches DSW1 and DSW2 I will use the static mode this time.

I run the following commands first on DSW1:

DSW1> en
DSW1#> conf t
DSW1(config)# int range g1/0/1 - 2
DSW1(config-if-range)# channel-group 2 mode on

Then I run similar command on DSW2:

DSW2> en
DSW2#> conf t
DSW2(config)# int range g1/0/1 - 2
DSW2(config-if-range)# channel-group 2 mode on

Now when running "show spanning-tree" on either DSW1 or DSW2 we can see the EtherChannel active for both channel group 1 and 2:

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    20481
             Address     0007.EC07.1D30
             Cost        3
             Port        30(Port-channel2)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    24577  (priority 24576 sys-id-ext 1)
             Address     0002.161B.EBBC
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po1              Desg FWD 3         128.29   Shr
Po2              Root FWD 3         128.30   Shr

4. IP Addresses and Routing

Now in order to enable routing and a connection from the PCs to the server I must set up IP addresses and routing on the switches. I start running these commands on DSW1:

DSW1> en
DSW1#> conf t
DSW1(config)# int po2
DSW1(config-if)# no switchport
DSW1(config-if)# ip address 10.0.0.1 255.255.255.252
DSW1(config-if)# exit
DSW1(config)# ip routing
DSW1(config-if)# ip route 172.16.2.0 255.255.255.0 10.0.0.2

Now when running "show ip route" on DSW1 we can see the routes:

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/30 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, Port-channel2
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Vlan1
S       172.16.2.0 [1/0] via 10.0.0.2

Now I run similar commands on DSW2 to add IP addresses and routing:

DSW2> en
DSW2#> conf t
DSW2(config)# int po2
DSW2(config-if)# no switchport
DSW2(config-if)# ip address 10.0.0.2 255.255.255.252
DSW2(config-if)# exit
DSW2(config)# ip routing
DSW2(config-if)# ip route 172.16.1.0 255.255.255.0 10.0.0.1

Now when running "show ip route" on DSW2 we can see the routes:

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/30 is subnetted, 1 subnets
C       10.0.0.0 is directly connected, Port-channel2
     172.16.0.0/24 is subnetted, 2 subnets
S       172.16.1.0 [1/0] via 10.0.0.1
C       172.16.2.0 is directly connected, Vlan1

Now that the IP addresses are configured, PC1 can reach SRV1:


5. EtherChannel Load Balancing

Taking a look at the current load balancing on ASW1, ASW2, DSW1, and DSW2 we can see that it's balancing by src-mac:

ASW1> en
ASW1#> show etherchannel load-balance

EtherChannel Load-Balancing Operational State (src-mac):
Non-IP: Source MAC address
  IPv4: Source MAC address
  IPv6: Source MAC address

I'm going to load balance by src-dst-ip so I run the following command on ASW1, ASW2, DSW1, and DSW2:

ASW1> en
ASW1#> conf t
ASW1(config)# port-channel load-balance src-dst-ip

Now when running the "show etherchannel load-balance" command we can see it now load balanced by "src-dst-ip":

EtherChannel Load-Balancing Operational State (src-dst-ip):
Non-IP: Source XOR Destination MAC address
  IPv4: Source XOR Destination IP address
  IPv6: Source XOR Destination IP address