Now on links to devices that don’t support DTP
the port will remain an access port
so on this link between switch 2 and router 2
the default mode is being used which is dynamic auto.
so DTP is enabled but it's using dynamic auto.
I’ll configure it to use desirable.
sh int g0/2 switchport
notice the administrative mode is dynamic desirable
but the operational mode is static access.
So it’s not trunking it's remained as an access port in the default VLAN of 1.
and that’s because router 2 isn’t configured to use DTP
this interfaces are routed interface
so the switch port interface
at the moment that interfaces is down, so let’s enable it
and see if it makes any difference.
But notice if we type the command sh switchport it’s not gonna work
sh int f0/0 this is a routed port not a switchport interface.
So it’s acting as a PC or traditional router on switch 2
sh int g0/2 switchport
notice the mode has remained a static access
even though it’s configured as desirable
that will be true for both dynamic auto and dynamic desirable.
Unless both sides can negotiate to use DTP
it will just remain an access port in the default VLAN which is VLAN 1.
Now let’s look at some negotiation
so let’s do some Wireshark captures
so I start capturing traffic on the hub, in this case on port 2
the switches are using gigabit 0/3, so sh int g0/3 switchport
at the moment its configured to use dynamic auto
in other words DTP but auto mode.
The same is true on switch 2, notice dynamic auto.
In the Wireshark captures we see Spanning Tree BPDUs
we see some CDP messages and notice here we see dynamic trunk protocol.
We can see a message from switch with MAC address ending in cc:03
configured for auto access mode
sh int g0/3
notice this is the Mac address of switch 2 ending in cc:03
so in the output, we can see the trunk status
values configured for auto access
it’s using ISL and the sender ID is switch 2.
We can also see a message from switch 1
notice MAC address ff0/3 sh int g0/3
so there’s the command, notice the MAC address ends in ff0/3.
This switch is also using DTP auto access mode scrolling down
we can see it wants to negotiate to use ISL
and there’s the MAC address of the switch.
So at the moment, neither side is initiating trunking.
So if we type sh int trunk
you’ll notice gigabit 0/3 is not in the list of trunk ports.
on either side sh int g0/3 switchport
at the moment it’s operating as an access port.
We can see that on both sides but if we change 1 side so int g0/3
switchport mode dynamic desirable sh int trunk
Notice that gigabit 0/3 is configured to use trunking
with ISL encapsulation because this side is configured as desirable
sh int trunk this side is configured as auto
so they’ve negotiated to set up a trunk.
In the Wireshark capture, I scroll down.
Here we have a message from switch 2
notice the mode is trunk desirable.
So the switch is initiating the trunking using ISL with switch 1.
Switch 1 is still using trunk auto
but switch 2 is using dynamic desirable trunking
so it’s initiating the trunking.
What happens if we change the encapsulation?
so int g0/3
switchport trunk encapsulation dot1q
sh int trunk on the left-hand side
notice the trunking is changed to dot1q
previously it did negotiate to use ISL.
in the Wireshark capture, scrolling up, we should see some messages.
Here’s switch 2 trunk desirable.
Wanting to use 802.1q rather than ISL.
so notice the trunk operating type is 802.1q
switch 2 is negotiating switch 1
which is still using dynamic auto to set up a trunk
and that’s whats happened.
Switch 1 is using auto mode
but is currently using trunking using 802.1q with switch 2
because switch 2 is configured with desirable mode
and is initiating the trunk.
So there some examples of using dynamic trunking protocol
to dynamically configure a trunk between 2 switches.
The recommendation once again is don’t use DTP
so turn off DTP and manually configure your trunk
and your encapsulation between both switches.