What is DTP, and which port modes form a trunk?
Show the answer
Say this first
DTP is Cisco's protocol for negotiating whether a link becomes a trunk. access never trunks.
trunk always trunks and still sends DTP. dynamic desirable actively asks to trunk. dynamic auto
trunks only if the other side asks. switchport nonegotiate stops DTP frames. Auto plus auto stays
access. Most current Catalyst switches default to dynamic auto, so I set every port to access or trunk
explicitly and add nonegotiate on trunks.
Go deeper
Result for each pair
| access | trunk | desirable | auto | |
|---|---|---|---|---|
| access | access | mismatch | access | access |
| trunk | mismatch | trunk | trunk | trunk |
| desirable | access | trunk | trunk | trunk |
| auto | access | trunk | trunk | access |
"Mismatch" means one side tags frames and the other does not: only untagged traffic works, and STP may
flag inconsistencies. A side set to trunk with nonegotiate against a dynamic side gives the same
mismatch, because the dynamic side never hears DTP.
Details interviewers like
- Dynamic trunking fails when the two switches have different VTP domain names; the switch logs
%DTP-5-DOMAINMISMATCH. - In
show interfaces trunk, an encapsulation ofn-802.1qmeans the trunk was negotiated. - Older platforms such as the Catalyst 2950 and 3550 defaulted to dynamic desirable.
- NX-OS and most other vendors do not run DTP. Against them, set the Cisco side to
trunk.
SW1# show interfaces GigabitEthernet1/0/24 switchport | include Administrative Mode|Operational Mode
Administrative Mode: dynamic auto
Operational Mode: static accessThey will ask next
Does
switchport mode trunkstop DTP?No. The port still sends DTP frames so the other side can follow. Only
switchport nonegotiate(or access mode) stops them.Why does a trunk to a router or a server need
switchport mode trunk?They do not speak DTP. A dynamic auto port facing them never becomes a trunk.
Traps
- Assuming
switchport mode trunkalone disables DTP. - Leaving user ports in dynamic auto. That is exactly what switch spoofing needs.