Cisco Catalyst 4500 Series Configuration Manual page 1144

Ios software configuration guide isco ios xe 3.9.0e and ios 15.2(5)ex
Hide thumbs Also See for Catalyst 4500 Series:
Table of Contents

Advertisement

switchport
Usage Guidelines
The no switchport 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 using the nonegotiate 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 VLAN 1 unless you use one of the optional keywords.
If you use the switchport voice vlan command for an interface, the interface cannot join a port channel.
When you use the switchport voice vlan command, the output for the show running-config command
changes to show the voice VLAN set.
Before you configure the switchport voice vlan name command, note the following:
Examples
The following example shows how to cause the port interface to stop operating as a Cisco-routed port
and convert to a Layer 2-switched interface:
Switch(config-if)# switchport
Switch(config-if)#
The following example shows how to cause a port interface in access mode, which is configured as a
switched interface, to operate in VLAN 2:
Switch(config-if)# switchport access vlan 2
Switch(config-if)#
The following example shows how to cause a port interface, which is configured as a switched interface,
to refrain from negotiating in trunking mode and act as a trunk or access port (depending on the mode
set):
Switch(config-if)# switchport nonegotiate
Switch(config-if)#
The following example shows how to set the voice VLAN for the interface to VLAN 2:
Switch(config-if)# switchport voice vlan 2
Switch(config-if)#
The following example shows how to set the voice VLAN for the interface to VLAN test.
Switch# configure terminal
Switch(config-vlan)# vlan 55
Switch(config-vlan)# name test
Switch(config-vlan)# end
Switch# configure terminal
Switch(config)# interface GigabitEthernet5/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport voice vlan name test
Switch(config-if)# end
Catalyst 4500 Series Switch Cisco IOS Command Reference—Release XE 3.9.xE and 15.2(5)Ex
2-1094
The VLAN ID and VLAN name association should be configured and present in the VLAN database
(See example below).
Different switches can have a different ID for the same name. The VLAN name is internally
converted to the VLAN ID.
Chapter 2

Advertisement

Table of Contents
loading

Table of Contents