DTP: how trunks form on their own

Dynamic Trunking Protocol

Cisco switches can negotiate whether a link becomes a trunk, using DTP. Each port's switchport mode decides what it does:

ModeBehaviour
accessNever a trunk
trunkAlways a trunk; sends DTP to tell the other side
dynamic desirableActively asks to trunk
dynamic autoTrunks only if the other side asks (the default on many switches)
trunk + nonegotiateAlways a trunk and sends no DTP at all

Which combinations trunk?

accessdynamic autodynamic desirabletrunk
accessaccessaccessaccess(mismatch)
dynamic autoaccessaccesstrunktrunk
dynamic desirableaccesstrunktrunktrunk
trunk(mismatch)trunktrunktrunk

Two switches both left at dynamic auto never form a trunk: each waits for the other to ask.

In NetLab

▶ SW1
SW1>enable
SW1#show interfaces g0/1 switchport | include Mode
Administrative Mode: dynamic auto
Operational Mode: static access
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Capture Mode Disabled
SW1#show interfaces trunk
SW1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#interface g0/1
SW1(config-if)#switchport mode dynamic desirable
SW1(config-if)#end
*Mar  1 00:00:07.000: %SYS-5-CONFIG_I: Configured from console by console
SW1#show interfaces trunk | include Gi0/1
Gi0/1       desirable        802.1q         trunking      1
Gi0/1       1-4094
Gi0/1       1,10,20
Gi0/1       1,10,20

Remember: Best practice: hard-code every port. switchport mode trunk plus switchport nonegotiate on trunks, switchport mode access on user ports, so nobody can plug in a device that negotiates a trunk and reaches every VLAN.

Tip: VTP (VLAN Trunking Protocol) can copy VLAN lists between switches, but one mistake can wipe VLANs on the whole network. Most networks run it in transparent mode or turn it off and create VLANs on each switch.

HOME LABS COMMUNITY DASHBOARD