Christmas Offer - Every Learner Must Check Out - Flat 88% OFF on All Access Pass
00
days
:
00
hours
:
00
minutes
:
00
seconds
PyNet Labs- Network Automation Specialists

What is DTP – Dynamic Trunking Protocol?

Author : PyNet Labs
Last Modified: January 25, 2024 
Dynamic Trunking Protocol Featured Image

Introduction

The word trunking may be familiar to network engineers or students studying networking. Multiple VLANs (virtual LANs) may share the same physical connection between switches using the practice known as trunking. With this method, you may separate various traffic types for security and performance reasons while conserving ports, cables, and bandwidth. But how do switches recognize the VLANs of the incoming and outgoing frames, and which VLANs are allowed on a trunk link? That’s where trunking protocols come into action.

DTP in networking is one of the most widely used trunking protocols. Dynamic Trunking Protocol is a Cisco proprietary protocol that operates at OSI Layer 2. In this blog, we will explain the DTP in detail along with different modes, its working, why we need DTP, and its benefits and drawbacks. Let’s begin!

What is DTP in networking?

DTP in networking stands for Dynamic Trunking Protocol. Switches can automatically create a trunk link using this layer 2 protocol without the need for manual configuration. A trunk link is a link that utilizes a tagging mechanism like IEEE 802.1Q or Cisco ISL to transmit traffic from different VLANs.

DTP operates by exchanging DTP frames between two nearby interfaces. The interfaces may agree on whether or not to use trunking and what kind of encapsulation to apply based on the DTP frames.

We have explained the basic explanation of DTP in networking. let’s focus on different DTP modes.

Switch Port Modes

Below we have explained different DTP modes in a tabular form.

DTP ModeDescription
Dynamic DesirableBy sending a negotiation message to the neighboring port, the switch port actively attempts to convert the link into a trunk link in this mode. A trunk link will be created if the port that is connected to the other port has the ability to build a trunk.
A trunk connection will be created between two switches if the switch receives DTP messages from the other side switch and believes that the port can handle tagged frames.
Dynamic AutoIf the switch port gets a negotiation message from the neighboring port, it may convert to a trunk link using this mode. If the nearby port is configured in trunk or dynamic desirable mode, the switch port becomes a trunk port. The trunk link won’t be established if both ports are in dynamic auto mode.
TrunkRegardless of whether the neighboring port is a trunk port or not, this mode purely trunks the switch port. This mode is sometimes referred to as DTP mode ON.
To create a trunk link between two switches, a trunk mode interface may also negotiate with the neighbor side switch interface.
NonegotiateIn this mode, the switch port is not able to generate or respond to DTP frames. It is used only when the switch port mode is accessed or trunk. To establish a trunk link, the neighboring port has to be manually configured as a trunk port.
AccessRegardless of whether the neighboring port is a trunk port or attempting to become a trunk port, this mode permanently disables the switch port from functioning as a trunk port. DTP mode OFF is another name for this mode.

Now we have a detailed understanding of different types of DTP modes. The following table summarizes the possible outcomes of DTP negotiation based on the switch port modes:

Trunk ModeDynamic AutoDynamic DesirableTrunkAccess
Dynamic AutoAccessTrunkTrunkAccess
Dynamic DesirableTrunkTrunkTrunkAccess
TrunkTrunkTrunkTrunkLimited Connectivity
AccessAccessAccessLimited ConnectivityAccess

Let’s now understand the benefits and some of the drawbacks that are associated with dynamic trunking protocol.

How does DTP Protocol work?

DTP operates by the exchange of DTP frames between two neighboring interfaces. The DTP frames include details like:

  • The interface’s DTP mode
  • The interface accepts the encapsulation type
  • The interface’s native VLAN
  • The link’s status (up or down)

Based on this information, the interfaces can decide whether to form a trunk link or not.

Let’s take an example for better understanding. Let’s say an Ethernet wire connects two switches. Switch B’s interface is in dynamic auto mode, whereas Switch A’s interface is in dynamic desirable mode. How DTP works in this situation is described by the following steps:

  1. Switch A requests the creation of a trunk link by sending switch B a DTP frame.
  2. Switch B determines its own mode upon receiving the DTP frame from switch A. It accepts to build a trunk link to switch A since it is configured to operate in dynamic auto mode.
  3. Switch B confirms that it wants to create a trunk link by sending a DTP frame to switch A.
  4. Receiving the DTP frame from switches B and A confirms that the interfaces agree to create a trunk link.
  5. Switch A and switch B establish a trunk link.

Benefits of Dynamic Trunking Protocol

Some of the benefits of using DTP are:

  • DTP simplifies trunk links’ configuration and management by enabling switches to negotiate trunking without human involvement automatically. This may decrease human errors and save time.
  • Switches may dynamically adjust via DTP to network topology or configuration changes. For instance, DTP may recognize a switch port mode change from access to the trunk and update the nearby switch appropriately.
  • Additionally, DTP provides compatibility across various Cisco switch models that support various trunking encapsulation techniques. DTP may negotiate a common encapsulation mechanism for the trunk link, for instance, if one switch only supports ISL and another switch only supports 802.1Q.

Drawbacks of Dynamic Trunking Protocol

Some of the drawbacks of using DTP are:

  • Because it is a Cisco proprietary protocol, switches from other manufacturers cannot use it.
  • Permitting illegal devices to create trunk links with switches and access several VLANs may pose security problems.
  • It may affect performance by creating extra network traffic and using both CPU and bandwidth resources.

Frequently Asked Questions

Q1 – What is DTP and VTP?

DTP is Dynamic Trunking Protocol, which negotiates trunk links between switches, whereas, VTP is the VLAN Trunking Protocol, which synchronizes VLAN information across switches.

Q2 – What are the different types of DTP in networking?

Mainly, there are five types of DTP, or one can say five types of modes in DTP. These are:

  • Dynamic Desirable
  • Dynamic Auto
  • Trunk
  • Nonegotiate
  • Access

Q3 – What is the default DTP for Cisco?

DTP is enabled by default, and your switches’ interfaces will be in “dynamic auto” or “dynamic desirable” mode. This implies that anytime you get a DTP packet asking to construct a trunk, your interface will be in trunk mode.

Q4 – What is the best practice of DTP?

The best practice of Dynamic Trunking Protocol is to disable it on all ports that are not intended for trunking. This prevents unauthorized VLAN hopping and improves network security.

Conclusion

In this blog post, we have learned about DTP in networking, a Cisco proprietary protocol that is used to negotiate trunking on a link between two VLAN-aware switches. We have seen why we need Dynamic Trunking Protocol, what are the different DTP modes, how it works, and the benefits and drawbacks of it.

Recent Blog Post

Leave a Reply

Your email address will not be published. Required fields are marked *

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram