Cisco Systems 4500 Switch User Manual


  Open as PDF
of 1504
 
15-7
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 15 Configuring Layer 2 Ethernet Interfaces
Configuring Ethernet Interfaces for Layer 2 Switching
This example shows how to configure the Fast Ethernet interface 5/8 as an 802.1Q trunk. This example
assumes that the neighbor interface is configured to support 802.1Q trunking and that the native VLAN
defaults to VLAN 1:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface fastethernet 5/8
Switch(config-if)# shutdown
Switch(config-if)# switchport mode dynamic desirable
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# no shutdown
Switch(config-if)# end
Switch# exit
This example shows how to verify the running configuration:
Switch# show running-config interface fastethernet 5/8
Building configuration...
Current configuration:
!
interface FastEthernet5/8
switchport mode dynamic desirable
switchport trunk encapsulation dot1q
end
This example shows how to verify the switch port configuration:
Switch# show interfaces fastethernet 5/8 switchport
Name: Fa5/8
Switchport: Enabled
Administrative Mode: dynamic desirable
Operational Mode: trunk
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Enabled
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Step 8
Switch(config-if)# switchport trunk
pruning vlan {add | except | none |
remove}
vlan_num[,vlan_num[,vlan_num[,....]]
(Optional) Configures the list of VLANs allowed to be pruned
from the trunk (see the “VLAN Trunking Protocol” section on
page 13-7). The default list of VLANs allowed to be pruned
contains all VLANs, except for VLAN 1.
Step 9
Switch(config-if)# no shutdown
Activates the interface. (Required only if you shut down the
interface.)
Step 10
Switch(config-if)# end
Exits interface configuration mode.
Step 11
Switch# show running-config interface
{fastethernet | gigabitethernet |
tengigabitethernet} slot/port
Displays the running configuration of the interface.
Step 12
Switch# show interfaces [fastethernet |
gigabitethernet | tengigabitethernet]
slot/port switchport
Displays the switch port configuration of the interface.
Step 13
Switch# show interfaces [{fastethernet |
gigabitethernet | tengigabitethernet}
slot/port] trunk
Displays the trunk configuration of the interface.
Command Purpose