DTP Modes and Protocol Explained

A switch port can work in two modes: access mode and trunk mode. In access mode, it forwards frames without VLAN information. In trunk mode, it attaches VLAN information to all frames before forwarding them. DTP( Dynamic Trunk Protocol) is a Cisco proprietary trunking protocol. It dynamically changes the switchport's mode based on the connected device.

A switch port in access mode is called an access port. In trunk mode, it is called a trunk port. A trunk link carries traffic from multiple VLANs. It connects two trunk ports. A trunk port adds VLAN information to frames before forwarding them. Only another trunk port can understand these modified frames. A switch port in access mode does not understand modified frames. If you connect a trunk port to an access port, it blocks all communication between both ports.

Let us take an example. You connect two switches. Both switches have VLANs. PC-1, PC-2, PC-5, and PC-6 are members of VLAN-10. PC-3, PC-4, PC-7, and PC-8 are members of VLAN-20.

DTP practice lab

You connect port 8 of the first switch to port 8 of the second switch, change the default mode on port 8 to trunk mode on the first switch, and keep the default mode on port 8 of the second switch. With this setup, PC-1 and PC-2 cannot communicate with PC-5 and PC-6, even though they are members of the same VLAN. Similarly, PC-3 and PC-4 can not access PC-7 and PC-8, even though they are members of the same VLAN.

Wrong DTP configuration

The reason behind it is the incorrect port configuration. The first switch forwards traffic from both VLANs to the second switch, but the second switch drops all traffic. The first switch's port 8 is a trunk port. It adds VLAN information to all frames before forwarding them to the second switch. The second switch's port 8 is an access port. In access mode, a port does not understand the tagged frames. You can fix this issue by changing the default mode to trunk mode on port 8 of the second switch.

DTP correct configuration

DTP protocol

In an extensive network, manually managing trunk connections is a tedious task. You may accidentally plug in a trunk link to an access port. DTP solves this problem. It dynamically manages trunk connections. Based on the remote port, it automatically updates the configuration of the local trunk port. For example, if the remote port is an access port, it configures the local trunk port to send the frames without VLAN information. If the remote port is a trunk port, it configures the local trunk port to send the frames with VLAN information. To identify the remote port, it uses DTP messages.

DTP modes

DTP protocol supports five modes: On or Trunk, Desirable, Auto, Off, and No-Negotiate.

On or Trunk mode

In on or trunk mode, it always assumes the remote port is a trunk port. Since it assumes the remote port as a trunk port, it starts the local port in trunk mode and keeps it in this mode. It generates DTP messages and adds VLAN information to frames. If the remote port is an access port, this mode can block all communication between both ports.

Desirable mode

In desirable mode, it starts the local port in access mode. It generates DTP messages and sends them to the remote port. If the remote port replies to DTP messages, it assumes the remote port is a trunk port and changes the local port's mode to trunk mode. If the remote port does not reply to DTP messages, it assumes the remote port is an access port and keeps the local port in access mode.

Auto mode

In auto mode, it starts the local port in access mode and passively listens for DTP messages from the remote side. If it receives a DTP message from the remote port, it assumes the remote port is a trunk port and changes the local port's mode to trunk mode. It is the default mode on trunk-capable ports on Cisco switches.

No-negotiate

In no-negotiate mode, it starts the local port in trunk mode and adds VLAN information to frames. In this mode, it does not generate and send DTP messages. DTP is a Cisco proprietary protocol. It works only on Cisco switches. If you connect a Cisco switch to a non-Cisco switch, the non-Cisco switch will not understand DTP messages. In that situation, you can use this mode.

Off

In off mode, it starts the local port in access mode and keeps the port open. In this mode, it neither generates DTP messages nor adds VLAN information to frames.

DTP configuration

The 'switchport mode' command configures the DTP mode. It runs in interface configuration mode. It uses the following syntax.

switch(config)# interface type slot_#/port_#
switch(config-if)# switchport mode trunk|dynamic desirable|dynamic auto|nonegotiate

Conclusion

Dynamic Trunk Protocol (DTP) is an essential protocol for managing VLAN communications across multiple switches in a network. It is a Cisco proprietary protocol and works only on Cisco switches. It works in five modes: On, Trunk, Desirable, Auto, No-negotiate, and Off. By understanding these modes, you can effectively configure switch ports to ensure proper connectivity between devices across multiple VLANs. The dynamic nature of DTP helps to prevent misconfigurations that can lead to traffic blocking and communication failures.

ComputerNetworkingNotes CCNA Study Guide DTP Modes and Protocol Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us ComputerNetworkingNotes@gmail.com