Specifications

2-849
Catalyst 4500 Se ries S wit ch C is co IO S C om mand R efer ence —Re lease I OS XE 3 .3.0 XO(1 5.1 (1)XO)
OL_28738 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
switchport
switchport
To modify the switching characteristics of a Layer 2 switch interface, use the switchport command. To
return the interface to the routed-interface status and cause all further Layer 2 configuration to be erased,
use the no form of this command without parameters.
switchport [access vlan vlan_num] | [nonegotiate] | [voice vlan {vlan_id | dot1p | none |
untagged}]
no switchport [access | nonegotiate | voice vlan]
Syntax Description
Defaults The default settings are as follows:
Switchport tr unking mo de is enabled.
Dynamic negotiation parameter is set to auto.
Access VLANs and trun k interface na tive VLANs are a default VLAN correspondi ng to the plat form
or interface hardware.
All VLAN lists include all VLANs.
No voice VLAN is enabled.
Command Modes Interface configur ation mode
Usage Guidelines The no sw it ch port command shuts the port down and then reenables it, which may generate messages
on the device to which the port is connected.
The no form of the switchport access command resets the access mode VLAN to the appropriate default
VLAN for the device. The no form of the switchport nonegotiate command removes the nonegotiate
status.
When you are usin g the n onegotiate keyword, DISL/DTP negotiation packets will not be sent on the
interface. The device will trunk or not trunk according to the mode parameter given: access or trunk.
This command will return an error if you attempt to execute it in dynamic (auto or desirable) mode.
The voice VLAN is automatically set to VLA N 1 unless you use one of the opti onal keywords.
access vlan vlan_num (Optional) Sets the VLAN when the interface is in access mode; valid values
are from 1 to 1005.
nonegotiate (Optional) Specifies that the DI SL/DTP negotiation packets will not be sent
on the interface.
voice vlan vlan_id (Optional) Specifies the number of the VLAN; valid values are from 1 to
1005.
dot1p (Optional) Specifies that the PVID packets are tag ged as priority.
none (Opti onal) Specifies th at the telephone and voice VLA N do not
communicate.
untagged (Optional) Specifies the untagged PVID packets.