Specifications
2-878
Catalyst 4500 Series Switch Cisco IOS Command Reference—Release IOS XE 3.3.0XO(15.1(1)XO)
OL_28738 -01
Chapter 2 Cisco IOS Commands for the Catalyst 4500 Series Switches
switchport trunk
• The no option is saved to NVRAM so that the user does not have to manually select the ports to
disable the tagging operation each time that the switch reboots.
• When the switchpo rt t run k nati ve v lan ta g command is enabled and active, all packets on the
native VLAN are tagged, and incomi ng untagged data packets a re dropped. Untagged control
packets are accepted.
Examples This example shows how to cause a port interface that is configured as a switched interface to
encapsulate in 802.1Q trunkin g format regardless of its default trunking forma t in trunking mode:
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)#
This example shows how to enable 802 .1Q tagging on a port:
Switch(config-if)# switchport trunk native vlan tag
Switch(config-if)#
This example shows how to configure a secure MAC-address and a maximum limit of secure MAC
addresses on Gigabit Etherne t port 1 for all VLANs:
Switch(config)# interface gigabitethernet1/1
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 3
This example shows how to configure a se cure MAC-address on Gigabit Eth ernet port 1 in a specific
VLAN or range of VLANs:
Switch(config)# interface gigabitethernet1/1
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport port-security
Switch(config-if)# vlan-range 2-6
Switch(config-if-vlan-range)# port-security maximum 3
This example shows how to configure a se cure MAC-address in a VLAN on Giga bit Ethernet port 1:
Switch(config)# interface gigabitethernet1/1
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security mac-address sticky
Switch(config-if)# vlan-range 2-6
Switch(config-if-vlan-range)# port-security mac-address 1.1.1
Switch(config-if-vlan-range)# port-security mac-address sticky 1.1.2
Switch(config-if-vlan-range)# port-security mac-address sticky 1.1.3
You can verify your settings by using the show port-secu rity interface vlan pr ivileged EXEC
command.
Related Commands Command Description
show interfaces switchport Displays the administrative and operational status of a
switching (nonrouting) port.