PurposeCommand or Action
Displaysthe switch port configuration of the interface in the
AdministrativeMode and the Administrative Trunking Encapsulation
fieldsof the display.
showinterfaces interface-id switchport
Example:
Switch# show interfaces
Step 7
gigabitethernet1/0/2 switchport
Displaysthe trunk configuration of the interface.
showinterfaces interface-id trunk
Example:
Switch# show interfaces
Step 8
gigabitethernet1/0/2 trunk
(Optional)Saves your entriesin theconfiguration file.copyrunning-config startup-config
Step 9
Example:
Switch# copy running-config
Toreturn an interface to its default configuration, use the
defaultinterface interface-id interface configuration
command.To reset all trunking characteristics of a trunking
interfaceto the defaults, use the no switchport trunk
interfaceconfiguration command. To disable trunking, use
theswitchport mode access interface configuration command
toconfigure theport asa static-accessport.
Note
startup-config
Related Topics
FeatureInteractions, on page 66
Example:Configuring an IEEE802.1Q Trunk, on page 80
Defining the Allowed VLANs on a Trunk
VLAN1 is the default VLAN on all trunk ports in all Cisco switches, and it has previously been a requirement
thatVLAN 1 always be enabled on every trunk link. You can use the VLAN 1 minimization feature to disable
VLAN1 on any individual VLAN trunk link so that no user traffic (including spanning-tree advertisements)
issent orreceived on VLAN1.
SUMMARY STEPS
1. configureterminal
2. interfaceinterface-id
3. switchportmode trunk
4. switchporttrunk allowed vlan {add|all |except |none |remove}vlan-list
5. end
6. showinterfaces interface-id switchport
7. copyrunning-config startup-config
Catalyst 2960-XR Switch VLAN Configuration Guide, Cisco IOS Release 15.0(2)EX1
OL-29440-01 69
Configuring VLAN Trunks
Configuring an Ethernet Interface as a Trunk Port