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.
Dynamic Trunking Protocol (DTP)
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.
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.
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.
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.
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 →