TechKnowSurge
Cisco CCNA 2.2 Cisco CCNA 2.1
VideoNetworkFree

DEMO: Dynamic Trunking Protocol (DTP)

Dynamic Trunking Protocol (DTP) controls how Cisco switch ports negotiate trunk links with neighboring devices. This content covers the key switchport mode commands and how to enable or disable DTP on a Catalyst 2960 interface.

Complete this video to capture a CTF flag worth 1 point.

About this video

Dynamic Trunking Protocol (DTP) is a Cisco proprietary mechanism that allows switch ports to negotiate their operating mode—access or trunk—with a neighboring device. Understanding the available DTP modes and when to use each one is essential for correctly configuring inter-switch links and controlling how VLANs are carried across a network. Configuration takes place at the interface level on the switch, where a single command determines both the port's behavior and how it communicates that preference to the far end. The switchport mode command offers four primary options. Setting a port to access locks it as an access port and signals the other side to do the same. Setting it to trunk forces the port into trunking mode and encourages the neighbor to trunk as well. Dynamic auto, which is the default on a Catalyst 2960, passively adapts to whatever the other side prefers and will only form a trunk if the neighbor actively requests one. Dynamic desirable actively attempts to negotiate a trunk link with the connected device. When both sides are set to dynamic auto, no trunk forms and the link defaults to access mode. In scenarios where trunk links are managed manually and DTP negotiation is undesirable—whether for security reasons or administrative consistency—the switchport nonegotiate command disables DTP frame transmission entirely. The port remains a trunk but stops sending negotiation traffic to the neighbor. To verify DTP behavior and support troubleshooting efforts, the show dtp interface command displays packet counters and status information for a specific interface, making it straightforward to confirm whether DTP is active and how the port is negotiating with the far end.

What you'll learn

What's covered

Dynamic Trunking Protocol (DTP)

Aligned to

Cisco CCNA
2.2 Configure and verify interswitch connectivity
2.1 Configure and verify VLANs (normal range) spanning multiple switches

Key terms

Dynamic Trunking Protocol
DTP
A Cisco proprietary protocol that automatically negotiates whether to establish a VLAN trunk link between two switches. DTP allows switches to dynamically determine trunking mode, though it is often disabled in production environments for security reasons.
Virtual LAN
VLAN
A logical grouping of network devices that behave as if they are on the same network regardless of physical location.
Switch
A network device that connects devices within a LAN and forwards traffic based on MAC addresses.
Trunk Port
A switch port that carries traffic for multiple VLANs over a single link by tagging frames with their VLAN ID, used between switches or between a switch and a router. All VLANs are tagged except the native VLAN.
Access Port
A switch port that belongs to a single data VLAN and sends and receives untagged frames, used for connecting end devices such as PCs and printers. An access port may additionally carry a tagged voice VLAN for an IP phone without becoming a trunk.
Dynamic Auto
A DTP mode in which a switch port passively waits to form a trunk, becoming a trunk only if the neighboring port actively requests it.
Dynamic Desirable
A DTP mode in which a switch port actively attempts to negotiate a trunk link with the neighboring port.
Nonegotiate
A switch port setting that disables DTP frame transmission, fixing the port as a trunk without negotiating with the neighboring device.

Topics

Dynamic Trunking Protocol Vlan Trunking Cisco Catalyst Switch Port Configuration Networking Cisco Ios

Transcript

Getting into the interface

We're going to configure dynamic trunking protocol on a switch, or specifically a switch port. Here I have a Catalyst 2960 that is up on my screen already, and we're going to program one of the ports on the 2960.

I took a look at the running config on a couple of these ports. 047 is a trunk port already, so let's say we're now configuring fast ethernet 048. That is the interface that we're going to actually configure on here.

First of all, I'm going to get into the interface, so I have to go into global configuration mode, and then I'm going to get into the interface, which is interface fa 048.

The switchport mode options

Let's just look at some of the commands here. It's switchport mode, and then I can hit question mark: I can turn it into an access, dynamic, or a trunk. By default this is set up as dynamic auto.

Let's first of all set this as an access port. If I'm going to say switchport mode access, now no matter what, this interface is going to be an access port, and it's going to try to convince the other side, through this dynamic trunking protocol, through communication to the other side, it's going to try to say, hey, why don't you be an access port as well.

Another mode that we can go into is trunk, and if I do switchport mode trunk, now what it's going to do is try to convince the other side, you should be a trunk as well.

And then we have the dynamic, so let's do switchport mode dynamic, and I'll hit question mark. As I mentioned, the auto I can type in here, I can say dynamic auto, but that is default on a 2960. I'm going to just program this in anyways. Now at this point in time what it's going to do is it's just going to adjust to whatever the other side is going to be. If the other side happened to be a dynamic auto as well, then it'll be an access port, but other than that it will just work with the other side on whatever its preference is.

Then another thing that we can set up is the desirable. What it will do is it's going to talk to the other side. I'll just do a tab here to finish it off, and so now this one is going to try to become a trunk port, so it's going to communicate with the other side and try to become a trunk port.

Turning DTP off

I'm going to turn this into a trunk, so in the future I will probably want this to be a trunk line. I'm going to say switchport mode trunk, I'll hit OK with that, and now it's a trunk line.

Now let's say I don't really want it to try to convince the other side to be a trunk. Maybe I don't want DTP to be up and running at all, that it's just going to be a trunk port and I'm going to manually configure the other side to be a trunk port as well. If I want to do that and turn off DTP altogether, I'm going to type in switchport non-negotiate. So I'll type that in and I'll hit enter, and now it's not even going to send out these DTP frames to talk to the other side to try to communicate and convince them to be anything. It's just going to be a trunk port, and that's what it is.

Checking with show dtp interface

There's one other command. I'm going to end out of this, and I'm going to type in show dtp interface and then the interface number, so interface, and this is fa zero. Hit enter, and now I can see the packets and the information on this that is being sent out.

Now remember, we did have that other trunk line, the fa 047, so let's take a look and see what it is saying. We'll do fa 047, we hit enter, and we see that in fact there have been some packets sent, packets received, and some information now on this trunk line, and what this trunk line is doing. So this is a good command for some troubleshooting, to figure out what's going on on that interface.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →