In this lab, I built a redundant switched network using EtherChannel and Spanning Tree Protocol (STP). EtherChannel was used to combine multiple physical links into a single logical PortChannel, providing higher bandwidth and link redundancy between switches.
I configured both Layer 2 and Layer 3 EtherChannels. Layer 2 PortChannels were configured as trunks to carry multiple VLANs, while the Layer 3 PortChannel provided a routed connection between multilayer switches. I also configured STP priorities and path costs to control which switches and links are preferred for each VLAN.
The network also uses VTP to distribute VLAN information, PortFast and BPDU Guard on access ports, and source-destination IP load balancing across EtherChannel links.
In this lab, I practiced:
Configuring EtherChannel using PAgP and combining physical interfaces into PortChannels.
Creating both Layer 2 and Layer 3 EtherChannels.
Configuring PortChannels as trunk links and allowing the required VLANs.
Using source-destination IP addresses for EtherChannel load balancing.
Configuring STP root primary and root secondary switches for different VLANs.
Adjusting STP path costs to control preferred forwarding paths.
Creating Layer 2 redundancy for switch and link failures.
Configuring PortFast on access ports for end devices.
Enabling BPDU Guard to protect access ports from unexpected STP BPDUs.
Using VTP to distribute VLAN information between switches.
The lab uses an access and distribution switch design with multiple redundant links between multilayer switches and access switches.
EtherChannel was used where higher bandwidth and link redundancy were required. Multiple physical interfaces were combined into logical PortChannels, allowing the network to use the available links as a single connection. Source-destination IP load balancing was configured so traffic could be distributed across the links based on the source and destination IP addresses.
STP was configured to provide Layer 2 redundancy while preventing switching loops. Different multilayer switches were selected as the primary and secondary STP roots for different VLANs. This distributes VLAN traffic across the network while providing an alternative path if the preferred switch or link fails.
VTP was also configured with MLS-2 as the VTP server and the other switches as VTP clients. VLANs 10, 20, 30, and 40 were created on the VTP server and distributed to the client switches.
Access ports connected to end devices were configured with PortFast and BPDU Guard. PortFast allows end devices to move to the forwarding state quickly, while BPDU Guard protects the network if a BPDU is received on an access port.
MLS-0
\\
\\
MLS-1
// \\
// \\
MLS-2 ==== MLS-3
|| ||
|| ||
SW-1 SW-2
The following configurations contain the commands only relevant to the objectives of this lab.
en
conf t
hostname MLS-1
interface range fast0/1-2
shutdown
no switchport
channel-group 1 mode desirable
no shutdown
exit
interface Po1
ip address 10.1.1.1 255.255.255.252
no shutdown
exit
port-channel load-balance src-dst-ip
do write
en
conf t
hostname MLS-2
interface range fast0/1-2
shutdown
no switchport
channel-group 1 mode desirable
no shutdown
exit
interface Po1
description To MLS-1
ip address 10.1.1.2 255.255.255.252
no shutdown
exit
interface range fast0/3-4
shutdown
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 2 mode desirable
no shutdown
exit
interface Po2
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
interface range fast0/5-6
shutdown
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 3 mode desirable
no shutdown
exit
interface Po3
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
port-channel load-balance src-dst-ip
spanning-tree vlan 1 root primary
vtp mode server
vtp domain xco
vtp password 123
vlan 10
vlan 20
vlan 30
vlan 40
exit
do write
en
conf t
hostname MLS-3
interface range fast0/1-2
shutdown
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode desirable
no shutdown
exit
interface range fast0/3-4
shutdown
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 2 mode desirable
no shutdown
exit
interface Po1
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
port-channel load-balance src-dst-ip
spanning-tree vlan 10 root primary
spanning-tree vlan 20 root primary
spanning-tree vlan 30 root secondary
spanning-tree vlan 40 root secondary
vtp mode client
vtp domain xco
vtp password 123
do write
en
conf t
hostname SW-1
interface range fast0/1-2
shutdown
switchport mode trunk
channel-group 1 mode desirable
no shutdown
exit
interface Po1
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
port-channel load-balance src-dst-ip
interface gig0/1
spanning-tree cost 25
exit
interface range fast0/3-24
switchport mode access
spanning-tree portfast
spanning-tree bpduguard enable
exit
vtp mode client
vtp domain xco
vtp password 123
do write
en
conf t
hostname MLS-4
interface range fast0/1-2
shutdown
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 1 mode desirable
no shutdown
exit
interface Po1
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
interface range fast0/3-4
shutdown
switchport trunk encapsulation dot1q
switchport mode trunk
channel-group 2 mode desirable
no shutdown
exit
interface Po2
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
port-channel load-balance src-dst-ip
spanning-tree vlan 10 root secondary
spanning-tree vlan 20 root secondary
spanning-tree vlan 30 root primary
spanning-tree vlan 40 root primary
vtp mode client
vtp domain xco
vtp password 123
do write
en
conf t
hostname SW-1
interface range fast0/1-2
shutdown
switchport mode trunk
channel-group 1 mode desirable
no shutdown
exit
interface Po1
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
port-channel load-balance src-dst-ip
interface gig0/1
spanning-tree cost 25
exit
interface range fast0/3-24
switchport mode access
spanning-tree portfast
spanning-tree bpduguard enable
exit
vtp mode client
vtp domain xco
vtp password 123
do copy run start
I verified the configurations using commands below on the switches. The following results show the main verification checks I used. I repeated these commands on all switches to make sure everything is correctly configured.
MLS-2
show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0060.3EB8.373B
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)
Address 0060.3EB8.373B
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 12 128.27 P2p
Po3 Desg FWD 12 128.29 P2p
Po2 Desg FWD 12 128.28 P2p
VLAN0010
Spanning tree enabled protocol ieee
Root ID Priority 24586
Address 0060.5C8E.3674
Cost 12
Port 28(Port-channel2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 0060.3EB8.373B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po3 Desg FWD 12 128.29 P2p
Po2 Root FWD 12 128.28 P2p
VLAN0020
Spanning tree enabled protocol ieee
Root ID Priority 24596
Address 0060.5C8E.3674
Cost 12
Port 28(Port-channel2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32788 (priority 32768 sys-id-ext 20)
Address 0060.3EB8.373B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po3 Desg FWD 12 128.29 P2p
Po2 Root FWD 12 128.28 P2p
VLAN0030
Spanning tree enabled protocol ieee
Root ID Priority 24606
Address 00E0.B0CB.B582
Cost 12
Port 29(Port-channel3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32798 (priority 32768 sys-id-ext 30)
Address 0060.3EB8.373B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po3 Root FWD 12 128.29 P2p
Po2 Desg FWD 12 128.28 P2p
VLAN0040
Spanning tree enabled protocol ieee
Root ID Priority 24616
Address 00E0.B0CB.B582
Cost 12
Port 29(Port-channel3)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32808 (priority 32768 sys-id-ext 40)
Address 0060.3EB8.373B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po3 Root FWD 12 128.29 P2p
Po2 Desg FWD 12 128.28 P2p
MLS-3
show 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: 3
Number of aggregators: 3
Group Port-channel Protocol Ports
------+-------------+-----------+----------------------------------------------
1 Po1(RU) PAgP Fa0/1(P) Fa0/2(P)
2 Po2(SU) PAgP Fa0/3(P) Fa0/4(P)
3 Po3(SU) PAgP Fa0/5(P) Fa0/6(P)
MLS-3
show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
During the EtherChannel configuration, I initially forgot to configure the PortChannels as trunks and allow the required VLANs on them.
Although the VLANs were successfully propagated through VTP, the expected STP information for the VLANs was not appearing correctly on some switches. I checked the configuration and status of the physical interfaces and PortChannels and found that the required VLANs had not been allowed on the PortChannels.
I corrected the issue by configuring the affected PortChannels as trunks and allowing VLANs 1, 10, 20, 30, and 40:
interface Po1
switchport mode trunk
switchport trunk allowed vlan 1,10,20,30,40
exit
I applied the same configuration to the relevant PortChannels on the other switches. This also reinforced an important point: creating an EtherChannel does not by itself guarantee that the required VLAN traffic will pass through it. The logical PortChannel must also have the appropriate Layer 2 configuration.
The lab successfully demonstrated a redundant switched network using EtherChannel and STP.
The physical links were successfully bundled into Layer 2 and Layer 3 PortChannels using PAgP, providing higher aggregate bandwidth and redundancy. The trunk PortChannels carried the required VLANs, while source-destination IP load balancing was used to distribute traffic across the bundled links.
STP root primary and secondary roles were configured per VLAN, allowing VLAN traffic to use different preferred paths while maintaining an alternative path for failover. STP path costs were also used to influence path selection.
VTP successfully distributed the configured VLAN information from the VTP server to the client switches. Finally, PortFast and BPDU Guard were configured on access ports to improve end-device connectivity and provide protection against unexpected STP BPDUs.
The verification commands confirmed that the EtherChannels were operational, the expected STP roles and paths were selected, and the configured load-balancing method was active.
The complete Packet Tracer project and the related configuration files are available on my GitHub repository.