Hands-On Lab: Setting Switchports to Dynamic Trunking Modes

This hands-on lab configures switchport dynamic desirable and dynamic auto modes, demonstrating how Dynamic Trunking Protocol automatically negotiates whether a link becomes a trunk or remains an access port, and covers why relying on DTP is generally discouraged in production networks.

Dynamic Trunking ProtocolSwitchport Dynamic DesirableSwitchport Dynamic Auto

~3 min read · Updated Sep 22, 2026

Lab Objective

Configure both dynamic desirable and dynamic auto switchport modes between two switches, observe which combinations successfully negotiate a trunk automatically via DTP, and identify the one combination that does not.

Lab Purpose

Before explicitly configuring switchport mode trunk, as done in earlier labs, engineers should understand how Dynamic Trunking Protocol (DTP) can negotiate this automatically — and, just as importantly, why most production environments disable DTP entirely in favor of explicit configuration for security and predictability.

Lab Topology

Switch1 ---- Gi1/0/24 ---- Gi1/0/24 ---- Switch2

Link currently has no explicit switchport
mode configured on either side

Task 1: Configure Dynamic Desirable on Both Sides

Set Gi1/0/24 on both switches to dynamic desirable, and verify whether a trunk forms.

Task 2: Configure Dynamic Auto on Both Sides

Change both sides to dynamic auto, and verify whether a trunk forms this time.

Task 3: Configure One Side Desirable and the Other Auto

Set Switch1 to dynamic desirable and Switch2 to dynamic auto, and verify the result.

Task 4: Identify the Non-Negotiating Combination

Explain which combination of dynamic modes does NOT result in a trunk forming, based on the pattern observed.

Solution and Verification

Switch1(config)# interface gigabitethernet1/0/24
Switch1(config-if)# switchport mode dynamic desirable

Switch2(config)# interface gigabitethernet1/0/24
Switch2(config-if)# switchport mode dynamic desirable

Switch1# show interfaces gigabitethernet1/0/24 switchport | include Mode

Administrative Mode: dynamic desirable
Operational Mode: trunk
-- Desirable + Desirable successfully negotiates
-- a trunk, since both sides actively offer

Switch1(config)# interface gigabitethernet1/0/24
Switch1(config-if)# switchport mode dynamic auto

Switch2(config)# interface gigabitethernet1/0/24
Switch2(config-if)# switchport mode dynamic auto

Switch1# show interfaces gigabitethernet1/0/24 switchport | include Mode

Administrative Mode: dynamic auto
Operational Mode: static access
-- Auto + Auto does NOT form a trunk -- neither
-- side actively initiates, so both remain
-- passively waiting and default to access mode

Switch1(config)# interface gigabitethernet1/0/24
Switch1(config-if)# switchport mode dynamic desirable

Switch2(config)# interface gigabitethernet1/0/24
Switch2(config-if)# switchport mode dynamic auto

Switch1# show interfaces gigabitethernet1/0/24 switchport | include Mode

Operational Mode: trunk
-- Desirable + Auto DOES form a trunk, since
-- the desirable side actively initiates and
-- the auto side responds when asked

Key Takeaway

DTP negotiation mirrors the PAgP negotiation logic covered in an earlier EtherChannel lab: Desirable+Desirable and Desirable+Auto both form a trunk, while Auto+Auto never does, since neither side takes the initiative. In practice, most security-conscious production networks disable DTP entirely (using switchport nonegotiate alongside explicit trunk or access mode), since relying on automatic negotiation on an access port an attacker could physically reach represents an unnecessary risk.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring Static Routing via IP Addresses

This hands-on lab configures static routes using a next-hop IP address rather than an outgoing interface, the generally preferred syntax, and compares the resulting routing table entry against the interface-based approach from the previous lab.

Continue

Hands-On Lab: Configuring Static Routing via Interfaces

This hands-on lab configures static routes using an outgoing interface rather than a next-hop IP address, demonstrating this approach's suitability for point-to-point links and its important limitation on multi-access networks.

Continue

Hands-On Lab: Installing a Wireless LAN Controller

This hands-on lab performs the initial setup of a Wireless LAN Controller, joins a lightweight access point to it, and creates a centrally managed WLAN, demonstrating the controller-based architecture that scales far beyond standalone access points.

Continue

Hands-On Lab: Installing a Wireless Access Point

This hands-on lab covers physically connecting and performing the initial configuration of a standalone wireless access point, including setting up an SSID, applying WPA3 security, and verifying wireless clients can associate and reach the wired network.

Continue

Hands-On Lab: Configuring and Allowing Inter-VLAN Routing — SVI

This hands-on lab configures inter-VLAN routing using Switch Virtual Interfaces on a Layer 3 switch, enabling IP routing directly on the switch itself and comparing this approach against the router-on-a-stick method from the previous lab.

Continue

Hands-On Lab: Configuring Inter-VLAN Routing (Router on a Stick)

This hands-on lab configures inter-VLAN routing using a single router interface divided into subinterfaces, connecting to a switch trunk to route traffic between two VLANs through one physical link.

Continue