Dynamic Trunking Protocol (DTP)
Trunk ports are ports that are used to carry the traffic of more than one VLAN. The port which connects two different switches and the switches have more than one VLAN configured then that port should be made trunk. If all the VLANs are allowed then trunk ports will carry traffic of all the VLANs including native VLANs for which the traffic goes untagged otherwise only the allowed VLANs traffic will be carried by the trunk link. The trunk link traffic would be encapsulated or tagged either by ISL or 802.1Q.
By default, all switch ports are access ports therefore to make a port trunk, the user should manually make it trunk by using DTP.
Dynamic Trunking Protocol –
Dynamic Trunking Protocol is CISCO proprietary protocol used for negotiating a trunk link between two switches as well as the encapsulation type of either 802.1q or ISL (Generally, 802.1q is used because ISL has more overhead than 802.1q). Of course, It is a layer 2 (data link) protocol and is enabled by default.
Here are the different options available while configuring a switch interface:-
switchport mode access (DTP mode OFF) –
This mode puts the switch interface into permanent non-trunking mode regardless of whether the neighbouring interface is a trunk port or trying to become a trunk port that is why it is known as DTP mode OFF. The port is a dedicated layer 2 access port.
switchport mode trunk (DTP mode ON) –
It puts the interface into trunking mode. The interface will become a trunk interface even if the neighbouring ports are trunk or not that is why it is called DTP mode ON.
switchport mode dynamic auto –
This is a default mode on the older CISCO switches. This mode makes the interface able to convert to a trunk link. The interface will become a trunk link if the neighbouring interface is set to trunk or desirable mode. If both switches interface mode is auto, then the trunk will not be formed.
switchport mode dynamic desirable –
By this mode, the interface will actively attempt to convert the link into a trunk link. The interface will become a trunk port if the neighbouring interface is set to trunk, desirable or auto.
switchport nonegotiate –
This mode prevents the interface from generating DTP frames. This command is used only when the switch port mode is access or trunk. You must manually configure the neighbouring interface as a trunk interface to establish a trunk link.
Now, let’s see the scenarios in which the switch interface will either become a trunk or access interface.
Dynamic Auto access trunk trunk access Dynamic desirable trunk trunk trunk access trunk trunk trunk trunk limited connectivity access access access limited connectivity access
By observing this, it is clear that whenever you receive a DTP packet that requests to form a trunk, your interface will be in trunk mode.