Both layer 2 EtherChannel and layer 3 EtherChannel use the same set of commands to create the channel, either through static configuration or using a dynamic protocol (LACP or PAgP). Today’s lab provides a little exercise on all three options (static, PAgP, LACP), in the context of L2 EtherChannels, but it helps you prepare for both L2 and L3 EtherChannel configuration.
Requirements
This lab uses a small LAN with three switches, all acting as layer 2 switches. Several pairs of switches connect with a pair of links that operate as 802.1Q trunks. Your job: make each pair of links operate as a layer 2 EtherChannel.
As a bit of a twist, the initial configuration for this lab pre-configures some details. Your job is to determine the correct configuration that should be added to the initial configuration. By starting out with some configuration, you not only have to think about a nice orderly configuration, but also the impacts of existing configuration on the final EtherChannel configuration.
The specific rules for this lab are:
- Configure the three EtherChannels shown in the figure as follows:
- Dist1 – Dist2: manually configured.
- Dist1 – Access 1: Use LACP, with Dist1 initiating the negotiations and Access1 not initiating the negotiations.
- Dist2 – Access 2: Use PAgP, with Dist2 initiating the negotiations and Access2 not initiating the negotiations.
- All physical links between switches already use 802.1Q trunking per the initial configurations.
- Ensure that the Port Channels act as trunks:
- Use 802.1Q trunking instead of ISL.
- Configure all switches to dynamically negotiate trunking, and all switches to initiate that negotiation.
Figure 1: Distribution/Access Switch Topology
Initial Configuration
Examples 1, 2, 3 and 4 show the beginning configuration state of Dist1, Dist2, Access1 and Access2.
Example 1: Dist1 Config
hostname Dist1 ! vlan 2,3,4 ! interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode dynamic desirable channel-group 10 mode on ! interface GigabitEthernet0/2 switchport access vlan 2 switchport trunk encapsulation dot1q switchport mode dynamic desirable channel-group 10 mode on ! interface GigabitEthernet0/3 switchport trunk encapsulation dot1q switchport mode dynamic desirable channel-group 20 mode active ! interface GigabitEthernet1/0 switchport trunk encapsulation dot1q switchport mode dynamic desirable switchport access vlan 2 channel-group 20 mode active
Example 2: Dist2 Config
hostname Dist2 ! vlan 2,3,4 ! interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode dynamic desirable channel-group 10 mode on ! interface GigabitEthernet0/2 switchport trunk encapsulation dot1q switchport mode dynamic desirable switchport access vlan 2 channel-group 10 mode on ! interface GigabitEthernet0/3 switchport trunk encapsulation dot1q switchport mode dynamic desirable channel-group 20 mode auto ! interface GigabitEthernet1/0 switchport trunk encapsulation dot1q switchport mode dynamic desirable switchport access vlan 2 channel-group 20 mode auto
Example 3: Access1 Config
hostname Access1 ! vlan 2,3,4 ! interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode dynamic desirable channel-group 20 mode desirable ! interface GigabitEthernet0/2 switchport trunk encapsulation dot1q switchport mode dynamic desirable switchport access vlan 2 channel-group 20 mode desirable
Example 4: Access2 Config
hostname Access2 ! vlan 2,3,4 ! interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode dynamic desirable channel-group 20 mode auto ! interface GigabitEthernet0/2 switchport trunk encapsulation dot1q switchport mode dynamic desirable switchport access vlan 2 channel-group 20 mode auto
Answer on Paper, or Maybe Test in Lab
Next, write your answer on paper. Or if you have some real gear, or other tools, configure the lab with those tools.
To test your solution, if you happen to try it with real gear, you can verify that each of the EtherChannels are up and operational using the appropriate dynamic protocol using the show etherchannel summary command.
Note: As of when this post was published, VIRL did not support LACP to negotiate a trunk. The LACP configuration shown in the answers post is correct, but if you test in VIRL, you will not see a working EtherChannel between Dist1 and Access1.
Note: IOS tends to copy interface configuration over to the automatically-creates portchannel interface, and for good reason. However, that feature means that in your lab, or when using VIRL, you may see slightly different initial configuration based on the timing of when the configuration is added to the switches. So, if you do this lab in VIRL or any other environment, focus more on the final configuration rather than the interim state or the initial configuration state.
Do this Lab with Cisco’s VIRL
You can do these labs on paper and still get a lot out of the lab. As an extra help, we have added files for the Virtual Internet Routing Lab (VIRL) software as well. The .VIRL file found here is a file that when used with VIRL will load a lab topology similar to this lab’s topology, with the initial configuration shown in the lab as well. This section lists any differences between the lab exercise and the .VIRL file’s topology and configuration.
Download this lab’s VIRL file!
The virl topology matches this lab topology exactly. The host info does as well.