Cisco Dynamic Trunking Protocol (DTP)
Published: 01/08/2010
Reference trace files:
cisco_default_2950_dtp_dyn_auto.cap
cisco_default_2950_dtp_dyn_desirable.cap
cisco_default_2950_dtp_mode_trunk.cap
cisco_default_2950_dtp_mode_access.cap
In general, a switch port is designed to 1) carry traffic for a specific host in the form of an access port or 2) handle a bundle of traffic for lots of hosts from another switch in the form of a trunk port for eventual branching off of the individual connections to their appropriate paths downstream. So it's easy - set the interface to either access or trunk mode.
But we networking professionals don't like that. We want more options, more flexibility, more commands to type. It makes us look like we're doing something important and is sure to confuse the teenage intern who the CEO thinks is good enough to replace us.
Cisco switch ports are in one of several modes when it comes to figuring out whether to be an access or trunk port. It also might attempt to negotiate with the other end of the connection to set up a trunk link. This is dependent on the configuration and different switches may slightly vary in their defaults.
When running a trace on the wire, these will be show up as DTP frames appearing every 30 seconds in most cases. While the information contained within them are mostly the same including protocol version number, VTP domain, etc., it's the Status field value which indicates what the switch port is trying to do.
Dynamic Auto (DTP packet sent every 30 seconds)
switchport mode dynamic auto
A trunk link forms if the other side is either in trunk mode or dynamic desirable.
Dynamic Trunking Protocol
Version: 0x01
Domain: ACME_Lab
Type: Domain (0x0001)
Length: 13
Domain: ACME_Lab
Status: 0x04
Type: Status (0x0002)
Length: 5
Status: 0x04
Dtptype: 0xa5
Type: Type (0x0003)
Length: 5
Dtptype: 0xa5
Neighbor: 00:0e:84:cb:c7:c1
Type: Neighbor (0x0004)
Length: 10
Neighbor: Cisco_cb:c7:c1 (00:0e:84:cb:c7:c1)
|
Dynamic Desirable (DTP packet sent every 30 seconds)
switchport mode dynamic desirable
Begs the other side to please be a friend and do the right thing. A trunk link forms if the other side is set to trunk mode, dynamic auto, or dynamic desirable.
Dynamic Trunking Protocol
Version: 0x01
Domain: ACME_Lab
Type: Domain (0x0001)
Length: 13
Domain: ACME_Lab
Status: 0x03
Type: Status (0x0002)
Length: 5
Status: 0x03
Dtptype: 0xa5
Type: Type (0x0003)
Length: 5
Dtptype: 0xa5
Neighbor: 00:0e:84:cb:c7:c1
Type: Neighbor (0x0004)
Length: 10
Neighbor: Cisco_cb:c7:c1 (00:0e:84:cb:c7:c1)
|
Trunk Mode (DTP packet sent once every 30 seconds)
switchport mode trunk
A port configured in this manner tries to form a trunk with the other end of the link and starts tagging frames. A trunk link forms if the other side is set to trunk mode, dynamic auto, or dynamic desirable.
Dynamic Trunking Protocol
Version: 0x01
Domain: ACME_Lab
Type: Domain (0x0001)
Length: 13
Domain: ACME_Lab
Status: 0x81
Type: Status (0x0002)
Length: 5
Status: 0x81
Dtptype: 0xa5
Type: Type (0x0003)
Length: 5
Dtptype: 0xa5
Neighbor: 00:0e:84:cb:c7:c1
Type: Neighbor (0x0004)
Length: 10
Neighbor: Cisco_cb:c7:c1 (00:0e:84:cb:c7:c1)
|
Access Mode (DTP packet sent one time only)
switchport mode access
When configured for access mode, the port will send out a single DTP frame initially, but afterwards just stays quiet.
Dynamic Trunking Protocol
Version: 0x01
Domain: ACME_Lab
Type: Domain (0x0001)
Length: 13
Domain: ACME_Lab
Status: 0x02
Type: Status (0x0002)
Length: 5
Status: 0x02
Dtptype: 0xa5
Type: Type (0x0003)
Length: 5
Dtptype: 0xa5
Neighbor: 00:0e:84:cb:c7:c1
Type: Neighbor (0x0004)
Length: 10
Neighbor: Cisco_cb:c7:c1 (00:0e:84:cb:c7:c1)
|
Nonegotiate
switchport nonegotiate
"Nonegotiate" means the port is being extremely stubborn. It doesn't even send DTP frames out at all. The port at the other end of the wire just has to deal with it. Can be used for either permanent access or trunk modes with the commands switchport mode trunk or switchport mode access at the interface level.
Go back to the main articles list.