7-15
Catalyst 6500 Series Switch Cisco IOS Software Configuration Guide—Release 12.1 E
78-14099-04
Chapter 7 Configuring LAN Ports for Layer 2 Switching
Configuring LAN Interfaces for Layer 2 Switching
This example shows how to configure the Fast Ethernet port 5/6 as an access port in VLAN 200:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# interface fastethernet 5/6
Router(config-if)# shutdown
Router(config-if)# switchport
Router(config-if)# switchport mode access
Router(config-if)# switchport access vlan 200
Router(config-if)# no shutdown
Router(config-if)# end
Router# exit
This example shows how to verify the configuration:
Router# show running-config interface fastethernet 5/6
Building configuration...
!
Current configuration:
interface FastEthernet5/6
no ip address
switchport access vlan 200
switchport mode access
end
Router# show interfaces fastethernet 5/6 switchport
Name: Fa5/6
Switchport: Enabled
Administrative Mode: static access
Operational Mode: static access
Administrative Trunking Encapsulation: negotiate
Operational Trunking Encapsulation: native
Negotiation of Trunking: Enabled
Access Mode VLAN: 200 (VLAN0200)
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: ALL
Router#
Step 6 Router(config-if)# switchport access vlan vlan_ID Places the LAN port in a VLAN.
With Release 12.1(13)E and later releases, the
vlan_ID value can be 1 to 4094, except for reserved
VLANs (see Table 9-1 on page 9-2).
With 12.1 E releases earlier than Release 12.1(13)E,
the vlan_ID value can be 1 to 1005.
Router(config-if)# no switchport access vlan Reverts to the default VLAN (VLAN 1).
Step 7 Router(config-if)# no shutdown Activates the interface. (Required only if you shut down
the interface.)
Step 8 Router(config-if)# end Exits configuration mode.
Step 9 Router# show running-config interface
[type1 slot/port]
Displays the running configuration of the interface.
Step 10 Router# show interfaces [type1 slot/port]
switchport
Displays the switch port configuration of the interface.
1. type = ethernet, fastethernet, gigabitethernet, or tengigabitethernet
Command Purpose