networking

Kept in this browser · My desk

Stands for: Dynamic Trunking Protocol

Cisco's protocol by which two directly connected switch ports agree whether the link between them becomes an 802.1Q trunk.

A Catalyst 9300 port can be access, trunk, dynamic auto or dynamic desirable; dynamic auto, the default, becomes a trunk if the neighbour is trunk or desirable, and desirable actively asks. DTP frames go to the multicast address 01-00-0C-CC-CC-CC with a SNAP protocol type of 0x2004, and switchport nonegotiate stops a port from sending them.

What it is. DTP (Dynamic Trunking Protocol) is Cisco's protocol by which two directly connected switch ports agree whether the link between them becomes a trunk, carrying many VLANs (virtual local area networks) with 802.1Q (or, on older platforms, ISL, Inter-Switch Link) tags, or stays an access link carrying one. It is proprietary to Cisco, and its convenience, a cable plugged between two switches becomes a trunk by itself, is the source of its security problem.

The frame. Convery's 2002 slides describe the family of Cisco control protocols DTP belongs to: IEEE 802.3 frames with 802.2 LLC (Logical Link Control) and SNAP (Subnetwork Access Protocol) headers, DSAP (destination service access point) AA, SSAP (source service access point) AA and control 03, the Cisco OUI (organizationally unique identifier) 00 00 0C, multicast destinations that are variants of 0100.0ccc.cccc, and a source address drawn from a pool held in the chassis EPROM (erasable programmable read-only memory). DTP itself goes to 01-00-0C-CC-CC-CC with SNAP protocol type 0x2004. Wireshark's dissector names the fields carried inside: the domain (the VTP, VLAN Trunking Protocol, domain name), trunk administrative status and type, trunk operating status and type, and a sender identifier, so a single captured frame shows whether a neighbour is offering to trunk.

The modes, as a worked table. A Catalyst 9300 port can be access, trunk, dynamic auto or dynamic desirable. Access puts the port into permanent non-trunking mode; trunk puts it into permanent trunking mode and negotiates to convert the neighbour; dynamic auto becomes a trunk if the neighbour is trunk or desirable; dynamic desirable actively asks and becomes a trunk if the neighbour is trunk, desirable or auto. Reading the pairs: auto with auto stays an access link, since neither side asks; auto with desirable, desirable with desirable, and auto or desirable with trunk all become trunks; access with anything stays access. switchport nonegotiate stops a port from sending DTP frames, after which the neighbour must be configured as a trunk by hand. Cisco's guide adds that some internetworking devices forward DTP frames improperly, which can cause misconfigurations.

History. Convery's slides describe DTP in 2002 as automating ISL and 802.1Q trunk configuration between switches, not operating on routers and not supported on the 2900XL and 3500XL, with CatOS states Auto, On, Off, Desirable and Non-Negotiate. They warn that the default mode depends on the platform and should be read from the device (show interface switchport on IOS) rather than assumed. Today's default on the Catalyst 9300 is dynamic auto, and a trunk carries all VLANs, 1 to 4094, by default.

The security problem. A host that sends DTP frames announcing itself as desirable turns a port left at dynamic auto into a trunk, which by default carries all VLANs from 1 to 4094 in both directions: switch spoofing. The host then tags its own frames for any VLAN it wants and receives the flooded and broadcast traffic of all of them. Yersinia, presented by S21sec at Black Hat Europe 2005, made the DTP attack a menu item alongside STP (Spanning Tree Protocol), CDP (Cisco Discovery Protocol) and VTP attacks, and its authors' advice was to set all ports to DTP off. Notably, the National Vulnerability Database (NVD) returns no record for the protocol by name: DTP abuse is a configuration weakness, documented in hardening guides rather than in vulnerability records.

Hardening. Every hardening source says the same thing in different words: Cisco's 2008 campus guide (disable trunking on host ports, trunks on with no negotiation), the Yersinia authors in 2005 (set all ports to DTP off), and the National Security Agency (NSA) in 2022 (disable dynamic trunking, configure every port explicitly as access or trunk, and connect systems that do not handle VLAN-encapsulated frames to access-only ports). In practice that means switchport mode access on every host port, switchport mode trunk with switchport nonegotiate on every inter-switch link, and an explicit allowed-VLAN list on each trunk.

Misreadings. DTP is not VTP: DTP decides whether a link trunks, VTP distributes VLAN definitions, and both are Cisco protocols an attacker can speak. Turning DTP off does not stop double tagging, which needs no trunk on the attacker's port. And LLDP (Link Layer Discovery Protocol), the discovery protocol of IEEE (Institute of Electrical and Electronics Engineers) 802.1AB, advertises neighbours but negotiates no trunks. Neighbours: trunk port, 802.1Q, VLAN, VLAN hopping and native VLAN.

Also known as: dynamic trunking protocol, dynamic auto, dynamic desirable, switchport nonegotiate, trunk negotiation

Sources

← Back to D Back to the glossary