Back to Command Reference
Interface ConfigDomain 2.0

switchport nonegotiate

Completely halts the transmission of Dynamic Trunking Protocol (DTP) frames out of a physical interface. This is a critical security hardening step to prevent malicious actors from tricking a switchport into forming an unauthorized trunk link.

Quick Reference

Execution ModeSwitch(config-if)#
Target Protocol BlockedDynamic Trunking Protocol (DTP)
Prerequisite Modesmode access or mode trunk
Negation Commandno switchport nonegotiate

Syntax Breakdown

switchport nonegotiate

This is a standalone execution command that does not require any trailing variables or arguments.

By default, even if you statically configure a port as switchport mode trunk, the Cisco ASIC will still broadcast DTP frames into the wire every 30 seconds to let the neighbor device know it is a trunk. The nonegotiate command silences this completely, creating a true, quiet, static link.

CLI Deployment Scenarios

Scenario 1: Silencing a Core Trunk Link

You have established a hardcoded trunk between two core switches and want to disable the unnecessary DTP overhead.

Switch(config)# interface GigabitEthernet1/0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport nonegotiate
! The trunk remains active, but DTP transmission is now halted.

Scenario 2: Hardening an Edge Access Port

You are locking down an edge port connected to a public lobby wall jack to ensure it cannot be manipulated into a trunk.

Switch(config)# interface FastEthernet0/10
Switch(config-if)# switchport mode access
Switch(config-if)# switchport nonegotiate

CCNA Exam Gotchas

[!]

The "Dynamic" Conflict Error

If an interface is sitting in its default dynamic auto or dynamic desirable state, and you attempt to execute switchport nonegotiate, Cisco IOS will throw a hard error: "Command rejected: Conflict between 'nonegotiate' and 'dynamic' status." You must statically define the port as access or trunk first.

[!]

Symmetrical Configuration Required

If you disable DTP on Switch A, but leave Switch B in dynamic auto mode, Switch B will never form a trunk because it is no longer receiving the DTP trigger frames from Switch A. If you use nonegotiate on a trunk, both sides of the link must be manually configured as switchport mode trunk.