11-7
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter11 Configuring Layer 2 Ethern et 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
This example shows how to verify the trunk configuration:
Switch# show interfaces fastethernet 5/8 trunk
Port Mode Encapsulation Status Native vlan
Fa5/8 desirable n-802.1q trunking 1
Port Vlans allowed on trunk
Fa5/8 1-1005
Step11 Switch# show running-config interface
{fastethernet | gigabitethernet |
tengigabitethernet}
slot
/
port
Displays the running configuration of the interface.
Step12 Switch# show interfaces [fastethernet |
gigabitethernet | tengigabitethernet]
slot
/
port
switchport
Displays the switch port configuration of the interface.
Step13 Switch# show interfaces [{fastethernet |
gigabitethernet | tengigabitethernet}
slot
/
port
] trunk
Displays the trunk configuration of the interface.
Command Purpose