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 VLAN 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, 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 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 –
This is a default mode on the newer Cisco switches. 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 switchport mode is access or trunk. You must manually configure the neighboring 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||Dynamic desirable||trunk||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.
- Computer Networks | Set 1
- Computer Networks | Set 2
- Computer Networks | Set 5
- Computer Networks | Set 3
- Computer Networks | Set 4
- Computer Networks | Set 12
- Computer Networks | Set 6
- Computer Networks | Set 7
- Computer Networks | Set 8
- Computer Networks | Set 9
- Computer Networks | Set 10
- Computer Networks | Set 11
- Last Minute Notes - Computer Networks
- Internet Control Message Protocol (ICMP) | Computer Networks
- Commonly asked Computer Networks Interview Questions | Set 1
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.