By default, all non-modular Cisco Catalyst switches running IOS have all ports enabled as layer2 ports with DTP (Dynamic Trunking Protocol) enabled. The only exception here is for switches which have a dedicated out-of-band management port, this being a layer3 port, which cannot be converted to layer2. Dynamic Trunking Protocol is a protocol that allows two switches to negotiate the interconnecting links as trunk, and negotiates the trunking protocol used between then. The trunking protocol can be 802.1q or ISL, with ISL having priority over 802.1Q. With DTP there is no required configuration. It just happens. It looks like magic, but it’s not.
Depending on the switch you use there are two possible default port states:
- Dynamic Desirable (DTP Active), which means the port actively sends DTP messages, thus it initiates trunk formation.
- Dynamic Auto (DTP Passive), which means the port sits back and waits for DTP messages from the other end. It doesn’t respond and finalize the trunk formation until it’s initiated by the other side.
If you connected two switches which default is to have the ports in Dynamic Auto mode, as is the case for Catalyst 3750-X, no trunk will be formed as neither switch will initiate the DTP negotiation. This is why it’s common in trunk port configurations to specify the trunking protocol and administratively set the port as trunk. This ensures trunking will take place as desired. To configure trunking use the following commands:
switchport trunk encapsulation dot1q switchport mode trunk
Ports administratively configured as trunks still have DTP enabled, while ports administratively configured as access have DTP disabled. The command to disable DTP statically is switchport nonegotiate. Using this command makes it visible in the configuration, however when configuring an access port, the switchport mode access command is what disables DTP.