Use it to explain why a switch-to-switch link stays in access mode — both ends at the default dynamic auto.
Dynamic auto
switchport mode dynamic auto makes the port wait passively: it becomes a trunk only if the neighbour asks (trunk or desirable). Two auto ports stay access ports.
1. show interfaces <if> switchport on both ends — Administrative Mode and Operational Mode.
2. Both dynamic auto → stays access; set one side to trunk or desirable.
3. One side static access → never a trunk.
4. Neighbour is not a Cisco switch (router, firewall, server) → DTP does not apply; configure static trunk + nonegotiate.
5. show dtp interface <if> — DTP packets exchanged?
administrative mode on end A → administrative mode on end B → DTP frames exchanged → mode combination decides the result → operational mode trunk or access
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
switchport mode dynamic autoPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Commands Verify boundary
show interfaces Gi1/0/1 switchport | include Mode
show dtp interface Gi1/0/1
Step 2 Common mistakes Narrow the fault
- Expecting two auto ports to form a trunk — they stay access.
- Relying on DTP between switches from different vendors (only Cisco supports it).
Auto + auto = access, a common surprise on new switches. Auto ports are still a risk: a device that sends DTP desirable can turn them into trunks. Set end-device ports to switchport mode access.
show dtp interface <if>— DTP state, TOS/TAS/TNS, packets sent and received.show interfaces <if> switchport— Administrative Mode, Operational Mode, Negotiation of Trunking.show interfaces trunk— ports that ended up trunking.
ReferenceWhat it is1 section · depth on demand
What it is
switchport mode dynamic auto waits passively: it answers DTP but does not initiate. It becomes a trunk only if the neighbour is trunk or desirable. Two auto ports stay access. Default mode on many current Catalyst switches is dynamic auto.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
dynamic auto is the default, and it waits for the neighbour to ask
The Catalyst 9300 VLAN trunk guide lists dynamic auto as the default switchport mode on Ethernet interfaces. A port in this mode becomes a trunk only if the neighbour is set to trunk or dynamic desirable. Two dynamic auto ports never form a trunk, because neither side initiates.
C9300# show interfaces Gi1/0/12 switchport | include Mode|Negotiation
Administrative Mode: dynamic auto
Operational Mode: static access
Administrative Trunking Encapsulation: dot1q
Negotiation of Trunking: On
What this means for an unconfigured port
| Connected device | Result |
|---|---|
| PC or server | Access port in VLAN 1 |
Switch port left at default (dynamic auto) | Access: no trunk, the classic "uplink doesn't pass my VLANs" |
Switch port set to trunk or desirable | Trunk: the port now carries every allowed VLAN |
| A host that sends DTP frames | It can negotiate a trunk |
Security impact
Leaving user ports in dynamic auto lets anything that sends DTP "desirable" frames negotiate a trunk (switch spoofing). Combined with the default allowed list (all VLANs), that gives access to every VLAN on the switch.
Hardening
C9300(config)# interface range Gi1/0/1 - 44
C9300(config-if-range)# switchport mode access
C9300(config-if-range)# switchport access vlan 20
C9300(config)# interface range Te1/1/1 - 2
C9300(config-if-range)# switchport mode trunk
C9300(config-if-range)# switchport nonegotiate
C9300(config-if-range)# switchport trunk allowed vlan 10,20,30
Find ports still at the default
C9300# show interfaces status
C9300# show interfaces switchport | include ^Name|Administrative Mode: dynamic
Documented example, not captured output.
Quick reference
In dynamic auto mode a port is willing to become a trunk but never asks for it; it waits for the neighbour to propose. Two auto ports therefore stay access ports, which is a common cause of trunks that never come up after a cable is connected between two default-configured switches.
switchport mode dynamic auto (the default on many Catalyst models) waits passively and becomes a trunk only if the neighbour is desirable or trunk.
| Local \ Remote | dynamic auto | dynamic desirable | trunk | access |
|---|---|---|---|---|
| dynamic auto | Access | Trunk | Trunk | Access |
The security problem: an attacker running a DTP tool (e.g. Yersinia) can send desirable frames to an auto port and become a trunk, gaining access to all VLANs (switch spoofing). Set every user port to switchport mode access explicitly.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Switching → 802.1Q Trunking → DTP → Dynamic auto. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%