Pcornel
H3 · Practical network exams · Cisco IOS / IOS XE

DTP · Finals

Configuration first, verification second, theory third. Reference templates require task-specific adaptation.

Content version 1.1-draft

Keyboard shortcuts

/ Finals search · Ctrl K global command palette · Alt E Exam Mode · Alt G Golden Scripts · Alt T Exam Topics · Alt V Verify · Esc close dialog.

Skills Exam

Quick explanation

Dynamic Trunking Protocol negotiates switchport trunking. Dynamic desirable actively attempts negotiation; dynamic auto waits for a compatible peer. Static trunking can operate without DTP.

Configuration

Replace highlighted placeholders. Configure only the variants required by the task.

Prerequisites and dependency links
  • Both endpoints must support DTP for negotiated trunking.
  • Use consistent native and allowed VLANs.
Dynamic desirable / auto Recommended / essential starting point
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: dtp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic desirable
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic auto
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Dynamic desirable / desirable Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: dtp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic desirable
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode dynamic desirable
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 exit
end
Static trunk without DTP Task-specific configuration — essential if selected
Start in privileged EXEC; block enters and exits configuration mode. Section link

Alternative group: dtp-method. Select the applicable method; do not apply mutually exclusive variants in sequence.

  • On a switch with fixed 802.1Q encapsulation, omit the encapsulation selection command if it is not supported. Match native VLAN and allowed VLANs at both ends.
enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 switchport nonegotiate
 exit
end
Command parameters
[INTERFACE]
Local interface name including type and number, or an SVI as appropriate.
[NATIVE-VLAN]
Matching native VLAN ID on trunk peers.
[ALLOWED-VLANS]
Comma-separated VLAN IDs and ranges; replace the whole list only when intended.
Peer configuration — Other switch

Peer blocks use the peer's own local interfaces and identifiers. Shared values must agree; other placeholders are interpreted from that device's perspective.

Shared: NATIVE-VLAN, ALLOWED-VLANS

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport trunk native vlan [NATIVE-VLAN]
 switchport trunk allowed vlan [ALLOWED-VLANS]
 no shutdown
 switchport nonegotiate
 exit
end

Show / Verify

Primary verification Section link
show interfaces [INTERFACE] switchport
Example output
Administrative Mode: dynamic desirable
Operational Mode: trunk
Negotiation of Trunking: On

Distinguish administrative negotiation from the operational mode.

Detailed verification Section link
show interfaces trunk
Example output
Gi0/1   desirable   802.1q   trunking   99

Confirm the trunk actually formed.

Detailed verification Section link
show dtp interface [INTERFACE]
Example output
DTP information for GigabitEthernet0/1:

Inspect the negotiation state where the platform supports this command.

Connectivity verification

Layer 2 endpoint test

After sending traffic between the intended hosts, verify that the expected MAC addresses are learned on the correct VLAN and interface.

show mac address-table vlan [VLAN-ID]
show interfaces [INTERFACE] switchport

Common mistakes

  • Auto/auto does not initiate a trunk.
  • A static non-negotiating trunk requires a compatible static configuration on its peer.
  • DTP support and defaults vary by device.

Quick reference and default values

DTP compatibility
LocalRemoteTrunk?
DesirableAutoYes
DesirableDesirableYes
AutoAutoNo
Trunk (DTP on)Auto or desirableYes
Trunk (nonegotiate)Static trunkYes
AccessAnyNo negotiated trunk
Remove configuration — separate, potentially disruptive actions

Disable dynamic trunking by using access mode

Stops trunking and may disconnect downstream VLANs.

enable
configure terminal
interface [INTERFACE]
 switchport
 switchport mode access
 switchport access vlan [VLAN-ID]
 exit
end

Related reference

Networking technical reference · Interface types · Connectivity verification
Documentation references consulted

Reset checklist?

Command block

Back to Top

Confirmation

Confirm action

Continue?