Aman Kumar

Dynamic Trunking Protocol

Dynamic Trunking Protocol is a set of rules and properties that is used for carrying the traffic over the network when there is more than one VLAN (virtual local area network) in the network. This protocol was developed by the company named CISCO Systems. In the Dynamic Trunking Protocol, any interface can be set to two different modes or settings such as trunking or non-trunking. The current interface can also be used to negotiate trunking with the other nearby interfaces. There are various switch port modes of this protocol specified by the company like Access DTP, Trunk DTP, etc that are used for various conditions.

:::

:::section{.main}

Introduction

DTP stands for Dynamic Trunking Protocol. The Dynamic Trunking Protocol is a networking protocol that is owned by CISCO Systems and is used for the purpose of manipulating trunking links when there is more than one LAN. The trunking layer works under Layer 2 of The OSI networking model. In the Dynamic Trunking Protocol, any interface can be set to two different modes or settings such as trunking or non-trunking. The current interface can also be used to negotiate trunking with the other nearby interfaces. There are various switch port modes of this protocol specified by the company like Access DTP, Trunk DTP, etc that are used for various conditions.

:::

:::section{.main}

Switch Port Modes

In the Dynamic Trunking Protocol, the trunking between the CISCO Catalyst switches can be established using the various switch port modes that we are going to discuss now. It communicates with the interface and ensures the interface about the trunking nature like if the interface will always be trunked or not, or if there is a need to negotiate the trunk. Let us see the various switch port modes one by one to understand them in a better way.

Access (DTP mode OFF)

The Access DTP mode is independent of the neighboring interfaces, which means that the interface does not depend on the neighboring interface (whether it is the trunk interface or not). The Access DTP mode does not work like a trunk interface. This mode allows only one VLAN by that particular port. When the interface is in access mode, the access mode becomes a non-trunk interface.

Trunk (DTP mode ON)

The Trunk switch port mode is used for enabling the interface into trunking mode which transforms the interface into a trunk interface even if the neighboring ports are trunk or not. In this mode, there is no effect of the neighbor being a trunk mode interface or not. The interface transforms into a trunk interface whether the neighboring ports are trunk or not. Since there is an automatic transformation, the Trunk switch port mode is called DTP MODE on.

Dynamic Auto

The Dynamic Auto mode is used to convert a particular interface into a trunk link. This switch port mode is the default mode that can be found on the older switches of CISCO. This interface can be converted into a trunk link if the mode of interfaces that are nearby to that particular interface is in trunk mode or in desirable mode. There is a condition in it. If the mode of both switch modes is in auto mode, then there will be no formation of any trunk between them.

Dynamic Desirable

We use the Dynamic Desirable mode to transform the trunk, desirable, or auto interface into a trunk interface. In this switch port mode, the interface tries its best to convert the link into a trunk link.

Non-negotiate

The Non-negotiate command can be used when in the situation there is a switch port mode in access mode or trunk mode. The switch port mode is used to prevent the interface by a method of generating the Dynamic Trunking Protocol frames. In this mode, we can configure the neighbor interface manually to a trunk interface that can be alternatively used to establish a trunk link.

Given below is a table that shows various scenarios for turning a switch interface into a trunk interface or access interface.

Dynamic AutoDynamic desirableTrunkAccess
Dynamic Autoaccesstrunktrunkaccess
Dynamic desirabletrunktrunkaccessaccess
trunktrunktrunktrunklimited connectivity
accessaccessaccesslimited connectivityaccess

As we can see in the above table, we have various scenarios in which we can transform the normal interface into a trunk and an access interface. For example, we can see that the switch interface transforms into the access interface in case of dynamic auto and so on.

:::

:::section{.main}

Working on DTP

Now let us see how the Dynamic Trunking Protocol works. Given below is the working process with proper explanation and illustration for understanding the DTP in a better way.

working-on-dtp

In the above illustration, there are two switches. The first switch and second switch are represented as S1 and S2. The first interface S1 is in dynamic desirable mode initially. As we know, if the switch is in dynamic desirable mode, the switch port will try to form a trunk. This interface forms a trunk if the other interfaces apart from that particular interface are in any trunk, dynamic auto mode, or dynamic desirable form. If the other interfaces are in static access mode then the interface will form a trunk.

S1 switchport modeS1 switchport modeOperational mode
Dynamic desirabletrunktrunk
Dynamic desirableDynamic desirabletrunk
Dynamic desirableDynamic autotrunk
Dynamic desirableaccessaccess

Case 2: When S1 is in dynamic auto mode

S1 switchport modeS1 switchport modeOperational mode
Dynamic autotrunktrunk
Dynamic autoDynamic desirabletrunk
Dynamic autoDynamic autoaccess
Dynamic autoaccessaccess

Explanation
When the switch port is in dynamic auto mode, it does not form an access or trunk port. The switch port first checks the other interfaces that they are trying to form. And according to this, the switch port forms a trunk or access port.

In the table shown above, S1 is in dynamic auto mode, and after that, it will form a trunk because there is no other interface in dynamic desirable or trunk mode. In S2, it is in the access mode or dynamic mode, which will result in the formation of an access port.

Case 3: When the trunk and access are configured manually.

trunk-and-access-configured-manually

In the image shown above, we can see that the S1 interface is configured as a trunk manually. And the interface S2 is an access port manually. But this will not work, because the trunk and access can not be configured together manually.

  • Summarization Table
Dynamic autoDynamic DesirableTrunkAccess
AccessTrunkTrunkAccess
TrunkTrunktrunkAccess
TrunkTrunkTrunkLimited Connectivity
AccessAccessLimited ConnectivityAccess

:::

:::section{.main}

Different Combinations of Switch Port Modes Configured in Two Connecting Interfaces

Now let us see the various combinations of Switch Port modes with different configurations of interfaces between them.

1. Both interfaces are configured with a “dynamic desirable” mode

When the two interfaces are connected together and are configured in DTP dynamic desirable mode, then a DTP message will be generated by the interface. In this, there is the transparency of both interfaces to each other. They can see each other interface and can form a trunk. There will be a formation of a trunk link between the two switches.

trunk-link-between-two-switches

2. One Interface is Configured with “dynamic desirable” Mode and Another Interface is Configured with “dynamic auto” Mode

When the switch mode is in DTP dynamic auto mode, the DTP message will not get generated by the switch interface. This mode is responsible for listening only passively to DTP messages. Even if there is any DTP message received from the other side switch, a formation of a trunk link can be seen there.

When there are two modes of an interface, one is DTP “dynamic desirable” mode and the other is the dynamic auto” mode, the DSP message will be generated by the dynamic desirable mode. And the interface with dynamic auto mode will be able to see other interfaces that will be able to form a trunk. The link established between the two switches is shown below:

link-between-two-switches

3. Both Interfaces are Configured with “dynamic auto” Mode

When the interfaces are in connecting interfaces and they are in DTP dynamic auto mode, the DTP message will not be generated by any of the two interfaces. Also, they are unable to see each other if they are able to form a trunk or not.

trunk-link-not-formed

4. Both Interfaces are Configured with “trunk” Mode

When the interfaces are in trunk mode, an exchange of DTP messages will take place. Also, the trunk link will be formed between the two switches.

both-interfaces-configured-with-trunk

5. One Interface is Configured with “trunk” Mode and Another Interface is Configured with “dynamic desirable” Mode

When the two interfaces are configured as trunk mode and dynamic desirable mode, an exchange of DTP messages takes place and also the trunk link is generated between the switches.

interface-configured-with-trunk-dynamic-mode

6. One Interface is Configured with “trunk” Mode and Another Interface is Configured with “dynamic auto” Mode

When the two interfaces are configured as trunk mode and dynamic auto mode respectively, the DTP message will get exchanged, and also the trunk link will form between those two switches.

interface-with-trunk-and-dynamic-auto

:::

:::section{.main}

Dynamic Trunking Protocol (DTP) Negotiated Interface Modes

The DTP Negotiation Interface Modes consists exchange of Dynamic Trunking Protocol frames. This exchange of frames occurs between the two neighboring interfaces. Whenever the interface is in the dynamic desirable mode or in the dynamic auto mode, the interface starts DTP negotiation for selecting its own modes of trunking operation.

When the interface is in access mode or in trunk mode, the interface participates in the DTP process. The interface participates in the DTP process by responding to Dynamic Trunking Protocol frames if the interface receives any. Given below is the table that shows the selection of operational modes by the interface that depends on the trunking administrative mode and shows the result of that Dynamic Trunking Protocol process.

Dynamic autoDynamic DesirableTrunkAccessAccess
Dynamic AutoAccessTrunkTrunkAccess
Dynamic DesirableTrunkTrunkTrunkAccess
TrunkTrunkTrunkTrunkLimited connectivity
AccessAccessAccessAccessAccess

:::

:::section{.summary}

Conclusion

  • The DTP (Dynamic Trunking Protocol) consists of rules and properties that can be used to carry the signals over the network when there is more than one VLAN.
  • The Dynamic Trunking Protocol was developed by CISCO Systems.
  • There are various switch port modes of DTP such as Access (DTP mode OFF), Trunk (DTP mode ON), Dynamic Auto, Dynamic Desirable mode, and Non Negotiate mode.
  • The DTP Negotiation Interface Modes consist exchange of Dynamic Trunking Protocol frames and this exchange of frames occurs between the two neighboring interfaces.
  • When the interface is in access mode or trunk mode, the interface participates in the DTP process.

Author