Dynamic Trunking Protocol (DTP)

The Dynamic Trunking Protocol(DTP) is a Cisco proprietary protocol. The Dynamic Trunking Protocol (DTP) automatically enabled on Catalyst 2960 and Catalyst 3560 Series switches. DTP manage trunk negotiation between two or more Cisco devices before actually forming the trunk connection. The benefit of DTP is to boost traffic on a trunked link.

Ethernet interfaces support different trunking modes. For example, we can set an interface to trunking, non-trunking, or negotiate trunking with the neighbor interface. The Dynamic Trunking Protocol (DTP) manage trunk negotiation. The default DTP configuration for Cisco Catalyst 2960 and 3560 switches is “dynamic auto” or “dynamic desirable” mode. The DTP is working on a point-to-point basis between network devices only. Some internetworking devices negotiate improperly and send wrong DTP frames, which causes misconfigurations. To keep away from this error, turn off Dynamic Trunking Protocol (DTP)on the interface connected to devices that do not support Dynamic Trunking Protocol (DTP).

A Non-Cisco Switches does not support Dynamic Trunking Protocol (DTP). The Dynamic Trunking Protocol (DTP)only negotiate if the port on the neighbor switch is configured in a trunk mode that supports DTP. To enable trunking from a Cisco switch that not support DTP, use the “switchport mode trunk” and “switchport nonegotiate” interface configuration mode commands. This causes the interface to become a trunk, but not generate DTP frames.
In the below figure, the switch0 and switch1 link become trunk because the F0/1 ports on switch0 and switch1 are configured as a trunk, therefore, they ignore all DTP packets. The F0/2 ports on switch1 and switch2 set to dynamic auto, so the DTP negotiation results in the access mode state. The ports in dynamic auto create an inactive trunk link.

dynamic trunking protocol

The Cisco Catalyst switches 2960 and 3560 Series interfaces support different trunking modes with the help of DTP, For example:-

Switchport mode access

A switch interface configured as an access mode prevents the use of trunking. This makes the port as a pure access port which does not allow VLAN tagging.

Switchport mode dynamic auto

if a switch port configured as the dynamic auto which makes the interface able to convert the port to a trunk port. The interface becomes a trunk interface so if the neighboring interface is set to trunk or desirable mode. The default switchport mode for all Ethernet interfaces is dynamic auto so in the default configuration “dynamic auto” mode the switch will not generate DTP messages on the interface. The dynamic auto interface will only listen for DTP messages from the neighboring switch’s interface. If the dynamic auto interface receives a DTP message from the interface of the neighbor switch, a port will change itself to the trunk. The configuration command for dynamic auto is following:-
• Sw1#configure terminal
• Sw1(config)#interface fa0/1
• Sw1(config-if)#switchport mode dynamic auto
• Sw1(config-if)#exit
• Sw1(config)#exit

Switchport mode dynamic desirable

A switch port configured as dynamic desirable mode will actively attempt to convert the link to trunk link using DTP. If the neighboring switch port is able to form a trunk, a trunk link will be established. The interface configured as dynamic desirable mode will also generate DTP messages on the interface. If the switch receives DTP messages from the other side switch, it will assume that another side port is capable of handling tagged frames and a trunk link will be established between both switches.
• Sw1#configure terminal
• Sw1(config)#interface fa0/1
• Sw1(config-if)#switchport mode dynamic desirable
• Sw1(config-if)#exit
• Sw1(config)#exit

Switchport mode trunk

This is a permanent mode for trunking on the switch. The interface becomes a trunk interface even if the neighboring interface is not a trunk interface.

• Sw1#configure terminal
• Sw1(config)#interface fa0/1
• Sw1(config-if)#switchport mode trunk
• Sw1(config-if)#exit
• Sw1(config)#exit
• Sw1#

Switchport nonegotiate

Port configures as nonegotiate prevents generating DTP frames. This command is required only when the interface switchport mode is access or trunk. You must manually configure the neighboring interface as a trunk interface to establish a trunk link.
• Sw1#configure terminal
• Sw1(config)#interface fa0/1
• Sw1(config-if)#switchport mode trunk
• Sw1(config-if)#switchport nonegotiate
• Sw1(config-if)#exit
• Sw1(config)#exit