Overview

13 DTP and VTP

This chapter explains two Cisco-proprietary protocols that streamline VLAN deployment and interswitch connectivity: Dynamic Trunking Protocol (DTP) and VLAN Trunking Protocol (VTP). Although no longer called out by name in the CCNA blueprint, both are foundational to configuring and verifying VLANs across multiple switches and to building reliable trunks. The material clarifies where each protocol fits, how they interact with standard switch features, and why understanding their defaults, behaviors, and risks is essential for both the exam and real networks.

DTP negotiates a switchport’s operational role (access or trunk) based on its administrative setting and its neighbor’s configuration. Beyond hard-set access or trunk modes, dynamic auto (default) listens but does not actively try to trunk, while dynamic desirable seeks to form trunks; two auto ports remain access, but desirable paired with trunk/auto/desirable becomes a trunk. Historic encapsulation negotiation (802.1Q vs ISL) is largely moot on modern gear that uses 802.1Q. Because DTP frames can be abused to force unauthorized trunking, best practice is to disable negotiation—either by setting access mode or by using switchport nonegotiate—even on ports later used as trunks. DTP operates only between Cisco switches; links to routers or non-Cisco devices require manual trunk configuration.

VTP distributes VLAN database changes among switches that share a VTP domain, using a configuration revision number to ensure everyone converges to the latest state; messages travel only over trunk links. Switches can run in server, client, transparent, or off mode, and VTP has three versions. Version 3 is preferred: it introduces a primary server that alone can change VLANs (preventing accidental overwrites), supports extended-range VLANs, and adds a true off mode. VTP’s poor reputation stems from older deployments where a newly connected switch with a higher revision could wipe out the enterprise VLAN database; mitigations include resetting the revision before joining and, better yet, using version 3’s primary server model. Used carefully—especially in large environments—VTP reduces manual effort and configuration errors, while transparent or off mode suits networks that choose not to synchronize VLANs.

Two connected switches negotiate their ports’ operational mode by sending DTP messages. Both ports use the default administrative mode of dynamic auto, resulting in an access link; SW1 G0/0 and SW2 G0/0 operate as access ports.
SW1 and SW2 negotiate to form a trunk link. SW1 G0/0’s administrative mode is dynamic desirable and SW2 G0/0’s is dynamic auto. The result is an operational mode of trunk.
An attacker sends malicious DTP messages to SW1 to form a trunk. This gives the attacker access to all VLANs in the LAN, presenting a security threat.
A missing VLAN on SW2 prevents PC1 from communicating with PC2. 1) PC1 sends a frame to PC2. 2) SW2 drops the frame because VLAN 4 isn’t in its VLAN database.
VLANs created on SW1 are propagated to other switches in the VTP domain “Manning”. 1) SW1 creates VLANs 2, 3, and 4, updating its revision number to 3 (incrementing by 1 each time it creates a VLAN). 2) SW1 sends VTP messages to other switches in the VTP domain. 3) SW2 and SW3 add VLANs 2, 3, and 4 to their VLAN databases, updating their revision number to match SW1’s.
SW2, in transparent mode, forwards VTP messages but does not synchronize its VLAN database. 1) SW1 creates VLAN 5 and updates its revision number. 2) SW2 forwards SW1’s VTP messages to SW3, but doesn’t synchronize its VLAN database. 3) SW3 syncs its VLAN database to match SW1 and updates its revision number.
SW4 is connected to the network and overwrites the VLAN databases of SW1, SW2, and SW3. 1) SW4 is connected to the LAN. 2) SW4 sends VTP messages to the other switches. 3) Because SW4 has a higher revision number (50 vs. 5), SW1, SW2, and SW3 synchronize their VLAN databases to match SW4. Hosts in VLANs 10, 20, and 30 will be unable to communicate over the network because their VLANs no longer exist.

Summary

  • Dynamic Trunking Protocol (DTP) allows Cisco switches to automatically determine the operational mode of their ports.
  • A port’s administrative mode is how it is configured with the switchport mode command, and its operational mode is the mode it operates in (access or trunk).
  • Use the show interfaces interface switchport command to view the administrative and operational modes of a port.
  • A port configured with switchport mode access will always operate as an access port, and a port configured with switchport mode trunk will always operate as a trunk port.
  • switchport mode dynamic auto and switchport mode dynamic desirable configure the port to use DTP to determine its operational mode.
  • dynamic auto mode does not actively try to form a trunk with its neighbor but will form a trunk if the neighbor’s mode is trunk or dynamic desirable.
  • dynamic desirable mode actively tries to form a trunk with its neighbor, and will form a trunk if the neighbor’s mode is trunk, dynamic auto, or dynamic desirable.
  • DTP is considered a security vulnerability and should be disabled. It is considered best practice to manually configure each port’s mode and disable DTP with switchport nonegotiate on each port.
  • VLAN Trunking Protocol (VTP) allows Cisco switches to synchronize their VLAN database — the file that stores information about VLANs on the switch (vlan.dat).
  • The VTP revision number is used to keep track of the latest version of the VLAN database. Each time a change is made, the revision number is incremented by 1. A switch will synchronize to match a higher revision number, but not a lower (or equal) one.
  • The VTP domain is the group of switches in a LAN that share the same VTP domain name; a switch will only synchronize with another switch in the same domain.
  • By default, a switch has no domain name; it is said to be in domain NULL. In this state, the switch can create/modify/delete VLANs, but it won’t send VTP messages to other switches.
  • You can configure a switch’s VTP domain name with the vtp domain domain-name command.
  • Use the show vtp status command to view the current state of VTP on the switch.
  • A switch can operate in one of four VTP modes: server, client, transparent, and off. Use the vtp mode mode command to configure the mode (server is the default).
  • A switch in VTP server mode can create/modify/delete VLANs. It will advertise changes to its VLAN database, and synchronize its VLAN database upon receiving an advertisement with a higher revision number.
  • A switch in VTP client mode cannot create/modify/delete VLANs, but otherwise behaves the same as a server.
  • A switch in VTP transparent mode can create/modify/delete VLANs, but operates independently from other switches in the VTP domain. It will forward VTP messages between switches in the VTP domain, but will not send its own VTP messages or synchronize its VLAN database with other switches.
  • A switch in VTP off mode can create/modify/delete VLANs, but does not participate in VTP at all.
  • There are three versions of VTP: 1, 2, and 3. Versions 1 and 2 are very similar, but version 3 brought many improvements.
  • VTP version 3 introduced off mode; before, VTP couldn’t be disabled. The closest thing was to configure all switches in VTP transparent mode.
  • In VTP version 3, only one switch in the domain can create, modify, and delete VLANs: the primary server. Switches in the domain will only synchronize with the primary server. Other servers are called secondary servers; they function the same as VTP clients.
  • Use the vtp primary command (in privileged EXEC mode) on a VTP server to make it the primary server. There can only be one; if you configure vtp primary on a second server, the first one will revert to being a secondary server.
  • VTP version 3 is the only version that supports extended-range VLANs (VLANs 1006 to 4094). Versions 1 and 2 only support normal-range VLANs (VLANs 1 to 1005).
  • One risk of VTP is that a newly-connected switch with a higher revision number can overwrite the VLAN database of all switches in the LAN. Version 3 solves this problem because switches will only synchronize with the primary server.
  • To reset a switch’s VTP revision number to 0, you can change the domain name to a different one and then back to the original. Alternatively, you can change the mode to transparent or off, and then back to server or client, but this only works in versions 1 and 2.

FAQ

What is DTP and how do administrative and operational port modes differ?DTP (Dynamic Trunking Protocol) is a Cisco-proprietary protocol that helps two connected switches agree whether a link should operate as an access or trunk. Administrative mode is what you configure on the port (for example, access, trunk, dynamic auto, dynamic desirable). Operational mode is what the port is actually using after any DTP negotiation (for example, access or trunk). If you manually set access or trunk, operational and administrative modes match; with dynamic modes, DTP negotiation determines the operational mode.
Which DTP administrative modes are available, and when will a trunk form?Administrative modes: access, trunk, dynamic auto (default), dynamic desirable. Trunking outcomes: - access + any = access (access+trunk is an invalid mismatch) - trunk + trunk = trunk - trunk + dynamic desirable = trunk - trunk + dynamic auto = trunk - dynamic desirable + dynamic desirable = trunk - dynamic desirable + dynamic auto = trunk - dynamic auto + dynamic auto = access (default behavior) Tip: dynamic auto does not actively try to trunk; dynamic desirable does.
How can I check a port’s DTP status and whether it’s negotiating?Use show interfaces INTERFACE switchport. Key fields: Administrative Mode (configured mode), Operational Mode (current mode), and “Negotiation of Trunking” (On means the port is sending DTP). Example fields to look for: Administrative Mode: dynamic auto/desirable/access/trunk; Operational Mode: static access or trunk; Negotiation of Trunking: On/Off.
Why and how should I disable DTP?Reason: Security and noise reduction. An attacker can send malicious DTP frames to form a trunk and gain access to multiple VLANs. Two ways to disable: - Configure the port as an access port: switchport mode access (stops sending DTP) - Explicitly disable negotiation: switchport nonegotiate (prevents DTP even if the port is later made a trunk) Best practice: Use switchport nonegotiate on user-facing ports.
Does DTP work with routers or non-Cisco switches?No. DTP is Cisco-proprietary and only runs on Cisco switches. To trunk to a router (“router-on-a-stick”) or a non-Cisco switch, manually configure trunking (for example, switchport mode trunk) and disable DTP if needed (switchport nonegotiate).
What is VTP and how does it synchronize VLANs?VTP (VLAN Trunking Protocol) automatically propagates VLAN database changes among Cisco switches in the same VTP domain. Switches share VLAN information (stored in flash as vlan.dat) using VTP messages over trunk ports. The Configuration Revision number increments with each change; switches synchronize to the highest valid revision they receive from their domain. Use show vtp status to view domain, mode, version, and revision.
What are the VTP modes (server, client, transparent, off)?- Server (default): Can create/modify/delete VLANs, advertises changes, and syncs to higher revisions. - Client: Cannot create/modify/delete VLANs, but otherwise behaves like a server (advertises and syncs). - Transparent: Manages its own VLANs locally, does not advertise or sync its own database, but forwards VTP messages for the same domain. Its revision number remains 0. - Off: VTP disabled entirely; no advertising, syncing, or forwarding of VTP messages.
Which VTP versions exist and what’s new in version 3?VTP has versions 1, 2, and 3 (default is 1). Version 3 adds notable improvements: - Primary/secondary server model (only the primary can change VLANs) - Support for extended-range VLANs (1006–4094) across the domain - “Off” mode to truly disable VTP Recommendation: Prefer VTP version 3 when using VTP.
What is the VTP primary server and how do I set it?In VTP version 3, only the primary server can create/modify/delete VLANs. Other servers act as secondary (similar to clients for VLAN changes). Set it in privileged EXEC mode with: vtp primary. Only one primary exists per domain; making another switch primary demotes the previous one to secondary.
Why is VTP considered risky and how do I mitigate it?Risk: A newly connected switch with a higher VTP revision (same domain) can overwrite the network’s VLAN database, causing outages. Mitigations: - Reset the switch’s VTP revision to 0 before joining the network by any of: - Change the VTP domain to something else, then back - Toggle mode to transparent and back to server/client (VTPv1/v2) - Toggle mode to off and back to server/client (VTPv1/v2) - Use VTP version 3 with a designated primary server; switches only sync to the primary, preventing accidental overwrites.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Acing the CCNA Exam, Volume 1 ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Acing the CCNA Exam, Volume 1 ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Acing the CCNA Exam, Volume 1 ebook for free