Dynamic Trunking Protocol (DTP) Explained

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

Ethernet interfaces support different trunking modes. For example, we can set an interface for trunking, non-trunking, or negotiation of trunking with the neighbor interface. The Dynamic Trunking Protocol (DTP) manages trunk negotiation. The default DTP configuration for Cisco Catalyst 2960 and 3560 switches is “dynamic auto” or “dynamic desirable” mode.

The DTP works only on a point-to-point basis between network devices. Some internetworking devices negotiate improperly and send wrong DTP frames, which causes miss-configurations. To avoid 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 negotiates if the port on the neighbor switch is configured in a trunk mode that supports DTP. To enable trunking from a Cisco switch that does 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 figure below, the switch0 and switch1 links become trunk because the F0/1 ports on switch0 and switch1 are configured as trunk; therefore, they ignore all DTP packets. The Fa0/2 ports on switch1 and switch2 are 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 a pure access port that does not allow VLAN tagging.

Switchport mode dynamic auto

if a switch port is configured as the dynamic auto, the interface can convert the port to a trunk port. The interface becomes a trunk interface 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 the 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 the dynamic desirable mode will actively attempt to convert the link to the trunk link using DTP. A trunk link will be established if the neighboring switch port can form a trunk. The interface configured as the 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 can handle 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.

• 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 configuration as nonegotiate prevents generating DTP frames. This command is required only when the interface switchport mode is accessed or trunk. To establish a trunk link, you must manually configure the neighboring interface as a trunk interface.

• 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