Config Lab: Trunking Puzzle 1

Wendell Odom
By Wendell Odom September 3, 2021 15:05

You can memorize VLAN trunking commands by staring at a table – but you will remember them much better if you try different combinations in sample labs, especially if you try them from the CLI of some gear or simulator. This is a great lab to do on your gear for that reason. The lab: look at a few different contrived VLAN trunking requirements that are meant to make you exercise your memory of VLAN trunking configuration options, and then check the status to find out if the link is actually trunking.

All about Config Labs

The blog has a series of lab exercises called “Config Labs.” Each lab presents a topology with the relevant initial configuration for each device. The lab also lists new requirements, after which you should create the additional configuration to meet those requirements. You can do the lab on paper, in a text editor, or use software tools like Cisco Packet Tracer or Cisco Modeling Labs.

Once you have created your answer, you can click various tabs at the bottom of this post to see the lab answers, comments about the lab, and other helpful information.

The Lab Exercise

Requirements

Configure IEEE 802.1Q trunking between the devices shown in the figure. The specific rules for this lab are:

  • Configure SW1’s trunks so that they will actively attempt to form trunks with attached switches.
  • Configure the trunk between SW2 and SW3 using manual trunking and disable DTP.
  • Configure SW4’s trunks to use manual trunking.
  • Assume all interfaces shown in the lab are up and working.

 

Figure 1: Four Switches with Trunks

 

Initial Configuration

 

Examples 1, 2, 3, and 4 show the beginning configuration state of SW1, SW2, SW3, and SW4.

Example 1: SW1 Config

 

Example 2: SW2 Config

 

Example 3: SW3 Config

 

Example 4: SW4 Config

Answer Options - Click Tabs to Reveal

You can learn a lot and strengthen real learning of the topics by creating the configuration – even without a router or switch CLI. In fact, these labs were originally built to be used solely as a paper exercise!

To answer, just think about the lab. Refer to your primary learning material for CCNA, your notes, and create the configuration on paper or in a text editor. Then check your answer versus the answer post, which is linked at the bottom of the lab, just above the comments section.

You can also implement the lab using the Cisco Packet Tracer network simulator. With this option, you use Cisco’s free Packet Tracer simulator. You open a file that begins with the initial configuration already loaded. Then you implement your configuration and test to determine if it met the requirements of the lab.

(Use this link for more information about Cisco Packet Tracer.)

Use this workflow to do the labs in Cisco Packet Tracer:

  1. Download the .pkt file linked below.
  2. Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
  3. Add your planned configuration to the lab.
  4. Test the configuration using some of the suggestions below.

Download this lab’s Packet Tracer File

You can also implement the lab using Cisco Modeling Labs – Personal (CML-P). CML-P (or simply CML) replaced Cisco Virtual Internet Routing Lab (VIRL) software in 2020, in effect serving as VIRL Version 2.

If you prefer to use CML, use a similar workflow as you would use if using Cisco Packet Tracer, as follows:

  1. Download the CML file (filetype .yaml) linked below.
  2. Import the lab’s CML file into CML and then start the lab.
  3. Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
  4. Add your planned configuration to the lab.
  5. Test the configuration using some of the suggestions below.

Download this lab’s CML file!

 

Network Device Info:

Device Lab Port  CML Port
SW1 G1/0/1 G0/1
SW1 G1/0/2 G0/2
SW2 G1/0/1 G0/1
SW2 G1/0/2 G0/2
SW2 G1/0/3 G0/3
SW3 G1/0/1 G0/1
SW3 G1/0/2 G0/2
SW4 G1/0/1 G0/1
SW4 G1/0/2 G0/2
SW4 G1/0/3 G0/3

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)

Answers

Figure 1: Four Switches with Trunks

 

Example 5: SW1 Config

 

Example 6: SW2 Config

 

Example 7: SW3 Config

 

Example 8: SW4 Config

Commentary, Issues, and Verification Tips (Click Tabs to Reveal)

Commentary

When configuring trunking between switches, a few questions need to be answered, including: Should dynamic trunking be used? And if so, which device should initiate the trunk? If not, and manual trunking is enabled, should you also disable DTP?

For this lab, you are tasked with configuring several trunks between devices. Obviously, in a real environment, the trunking encapsulation and mode will be more consistent across the network; however, we require you to understand how to configure the various trunking modes for this lab.

First, the lab requirements tell you to make SW1 actively attempt to form a trunk with its neighboring switches. This mode is called dynamic desirable on Cisco switches and is configured with the switchport mode dynamic desirable command.

Second, the lab requirements tell you to configure the switch SW1 interface between itself (Gi1/0/2) and SW3 (Gi1/0/2) to use manual trunking and disable DTP. To do so, configure the Gi0/2 interface on both SW1 and SW3 to manually trunk using the switchport mode trunk command. Then, to disable DTP, you use the switchport nonegotiate command.

Finally, the lab also asks you to configure SW4’s interfaces to use manual trunking. To do so, you should configure these ports on SW4 like SW2 and SW3 in this lab, except that you do not disable DTP.

Known Issues in this Lab

This section of each Config Lab Answers post hopes to help with those issues by listing any known issues with Packet Tracer related to this lab. In this case, the issues are:

# Summary Detail
1 PT may require the switchport trunk encapsulation command for trunking Packet Tracer LAN switches operate like older Cisco switch generations in that they support both ISL and 802.1Q trunking. To make a trunk work in this lab, you may need to configure the switchport trunk encapsulation dot1q command on each switch interface. Depending on the PT version and switch model used in PT, you also may not need the command.

 

Why Would Cisco Packet Tracer Have Issues?

(Note: The below text is the same in every Config Lab.)

Cisco Packet Tracer (CPT) simulates Cisco routers and switches. However, CPT does not run the same software as real Cisco routers and switches. Instead, developers wrote CPT to predict the output a real router or switch would display given the same topology and configuration – but without performing all the same tasks, an actual device has to do. On a positive note, CPT requires far less CPU and RAM than a lab full of devices so that you can run CPT on your computer as an app. In addition, simulators like CPT help you learn about the Cisco router/switch user interface – the Command Line Interface (CLI) – without owning real devices.

CPT can have issues compared to real devices because CPT does not run the same software as Cisco devices. CPT does not support all commands or parameters of a command. CPT may supply output from a command that differs in some ways from what an actual device would give. Those differences can be a problem for anyone learning networking technology because you may not have experience with that technology on real gear – so you may not notice the differences. So this section lists differences and issues that we have seen when using CPT to do this lab.

Beyond comparing your answers to this lab’s Answers post, you can test in Cisco Packet Tracer (CPT) or Cisco Modeling Labs (CML). In fact, you can and should explore the lab once configured. For this lab, once you have completed the configuration, try these verification steps. 

  • Each device should now be successfully trunking on all interfaces connecting to the other switches. To verify, issue the show interfaces trunk command on each device. Note that you need to check the status on both ends of the link.
  • Alternately, use the show interfaces interface switchport command, which will show a more detailed display of the encapsulation and mode that an interface is currently using.

More Labs with Related Content!

Config Lab: Data and Voice VLAN 2
Config Lab: Basic VLANs
Wendell Odom
By Wendell Odom September 3, 2021 15:05
Write a comment

4 Comments

  1. Ray December 14, 17:58

    I’m not sure why but using the unchanged .pkt file, every time I try to set SW2 g1/0/2, SW3 g1/0/2 & SW4 (g1/0/1 & g1/0/2) to switchport mode trunk, I get the following error:

    Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode.

    I also get an error when attempting to set SW2 & SW3 interfaces to switchport nonegotiate.
    Command rejected: Conflict between ‘nonegotiate’ and ‘dynamic’ status.

    Reply to this comment
    • certskills December 17, 16:50

      Ray,
      See the tab “Known Packet Tracer Issues” for the detail on setting the trunk encapsulation so that the trunking works.
      On your second point, I didn’t know that, but it’s a Packet Tracer issue as well. Real switches wouldn’t give that error. I’ll do a little testing (maybe after Christmas at this point) and update the Packet Tracer Issues tab for that one as well.
      Wendell

      Reply to this comment
    • adil December 20, 14:08

      use the command switchport trunk encapsulation dot1q in interface config mode

      Reply to this comment
  2. Best January 29, 07:25

    As far as I understand it the reason you are getting that error is because the switch being used can be configured to use either CISCO ISL or IEEE dot1q as its trunking encapsulation protocols. Since that is the case you must first specify the encapsulation protocol to be used on the interface and before you can manually set the interface to always trunk.

    SW2(config)# interface g1/0/2
    SW2(config-if)# switchport trunk encapsulation dot1q
    SW2( config-if)# switchport mode trunk
    SW2(config-if)# switchport nonegotiate

    A more modern CISCO Switch will only support dot1q as its trunking encapsulation protocol. Since that is the case you no longer have to specify the encapsulation protocol and just just have to specify the interface administrative mode.

    SW2(config)# interface g1/0/2
    SW2( config-if)# switchport mode trunk
    SW2(config-if)# switchport nonegotiate

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories