DTP stands for Dynamic Trunking Protocol. The main goal is to form a trunk link based on the configuration of adjacent port. If DTP is enabled on a port, switch will send DTP packets with current configuration of the port and will listen for DTP packet from its neighbor. DTP configuration is sent every 30 seconds.
Port modes
There are two types of port modes:
– Administrative – the one that is configured on a port
– Operational – the one in which a port operates
Administrative mode | Port configuration | Operational mode(s) |
---|---|---|
Access |
|
Access only |
Trunk |
|
Trunk only |
Dynamic Desirable |
|
Access, Trunk |
Dynamic Auto |
|
Access, Trunk |
In order to verify operational mode of a port use to following command:
Switch# show interfaces Ethernet0/3 switchport | i Mode:
Administrative Mode: dynamic desirable
Operational Mode: trunk
DTP operation
DTP can work in two modes:
– active – DTP packets are sent out of the interface
– passive – device wait for DTP packets
If on a port DTP is enabled DTP packet arrives on this port, then the device will send its DTP packet evaluate DTP information from its peer. If trunk mode in DTP packet is compatible with local trunk configuration, trunk will be formed.
Port configuration | DTP | DTP mode |
---|---|---|
|
no | N/A |
|
yes | active |
|
yes | active |
|
yes | passive |
In my opinion, it is best not to use DTP at all and make sure that a port is either access or trunk and never dynamic.
Administrative modes
Access. DTP disabled. No DTP packets are sent. Received DTP packets are ignored.
Trunk. DTP enabled – port sends its configuration in DTP packets, but no changes to the port operation mode can be made based on DTP packets from the neighbor device
Dynamic auto. Listens for DTP packets. If one is received, switch will send its DTP configuration for this port. If trunk setting is negotiable (trunk encapsulation must be same on both sides), trunk will be formed. By default, ISL encapsulation is preferred over dot1q. If no DTP packet is received, the port will remain in access operational mode.
Dynamic desirable. Sends DTP packets and listens for DTP packets. If trunk setting is negotiable (trunk encapsulation can be same on both sides), trunk will be formed. By default, ISL encapsulation is preferred over dot1q. f no DTP packet is received, the port will remain in access operational mode.
NOTE: A port in Dynamic auto/desirable starts in Access operational mode. This is important if BPDUGuard is enabled. If this is the case and there is a switch on the other end that sends (R)STP BPDUs, the port will be put in Error Disable state – trunk will never be formed.
Disabling DTP
Command switchport nonegotiated will disable DTP on static trunk interface.
Configuration compatibility
Main problem with DTP it allows incompatible configurations. For example:
1) static trunk <-> static access
2) a pair of trunks with different encapsulation mode, which can cause a network failure in redundant topology.
NOTE: No logs will be generated in case of incompatible configuration.
Switchport Mode | Auto | Desirable | Trunk | Non-Negotiate (trunk) | Access |
Auto | Access | Trunk | Trunk | Unexpected Results | Access |
Desirable | Trunk | Trunk | Trunk | Unexpected Results | Access |
Trunk | Trunk | Trunk | Trunk | Trunk | Unexpected Results |
Non-Negotiate (trunk) | Unexpected Results | Unexpected Results | Trunk | Trunk | Unexpected Results |
Access | Access | Access | Unexpected Results | Unexpected Results | Access |
DTP verification
Switch# show dtp interface Ethernet0/3
DTP information for Ethernet0/3:
TOS/TAS/TNS: TRUNK/DESIRABLE/TRUNK
TOT/TAT/TNT: ISL/NEGOTIATE/ISL
Neighbor address 1: AABBCC002030
Neighbor address 2: 000000000000
Hello timer expiration (sec/state): 6/RUNNING
Access timer expiration (sec/state): 276/RUNNING
Negotiation timer expiration (sec/state): never/STOPPED
Multidrop timer expiration (sec/state): never/STOPPED
FSM state: S6:TRUNK
# times multi & trunk 0
Enabled: yes
In STP: no
Statistics
----------
50 packets received (50 good)
0 packets dropped
0 nonegotiate, 0 bad version, 0 domain mismatches,
0 bad TLVs, 0 bad TAS, 0 bad TAT, 0 bad TOT, 0 other
93 packets output (93 good)
50 native, 43 software encap isl, 0 isl hardware native
0 output errors
0 trunk timeouts
1 link ups, last link up on Sun Sep 15 2019, 07:12:12
0 link downs
Abbreviations are:
– TOS = Trunk Operational Status
– TAS = Trunk Administrative Status
– TNS = Trunk Negotiation Status
– TOT = Trunk Operational (encapsulation) Type
– TAT = Trunk Adminstrative (encapsulation) Type
– TNT = Trunk Negotiation (encapsulation) Type
Pingback: Blog Summary | cisco networking