11-9

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
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 200
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/6
Building configuration...
!
Current configuration :33 bytes
interface FastEthernet 5/6
switchport access vlan 200
switchport mode access
end

This example shows how to verify the switch port configuration:

Switch# show running-config interface fastethernet 5/6 switchport
Name:Fa5/6
Switchport:Enabled
Administrative Mode:dynamic auto
Operational Mode:static access
Administrative Trunking Encapsulation:negotiate
Operational Trunking Encapsulation:native
Negotiation of Trunking:On
Access Mode VLAN:1 (default)
Trunking Native Mode VLAN:1 (default)
Administrative private-vlan host-association:none
Administrative private-vlan mapping:none
Operational private-vlan:none
Trunking VLANs Enabled:ALL
Pruning VLANs Enabled:2-1001
Switch#
Clearing Layer 2 Configuration

To clear the Layer 2 configuration on an interface, perform this task:

This example shows how to clear the Layer 2 configuration on the Fast Ethernet interface 5/6:

Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# default interface fastethernet 5/6
Switch(config)# end
Switch# exit
Command Purpose
Step1 Switch(config)# default interface {fastethernet |
gigabitethernet | tengigabitethernet}
slot
/
port

Specifies the interface to clear.

Step2 Switch(config-if)# end Exits interface configuration mode.
Step3 Switch# show running-config interface
{fastethernet | gigabitethernet |
tengigabitethernet}
slot
/
port

Displays the running configuration of the interface.

Step4 Switch# show interfaces [{fastethernet |
gigabitethernet | tengigabitethernet}
slot
/
port
]
switchport

Displays the switch port configuration of the interface.