By default, VLANs are in Layer 2 mode.
Table 23-1. Interfaces Types
Type of Interface
10/100/1000 Ethernet, Gigabit
Ethernet, 10 Gigabit Ethernet
SONET (PPP encapsulation)
Management
Loopback
Null interface
Port Channel
VLAN
Configure Layer 2 (Data Link) Mode
Use the
switchport
individual interface. The user can not configure switching or Layer 2 protocols such as spanning tree
protocol on an interface unless the interface has been set to Layer 2 mode.
The following example displays the basic configuration found in a Layer 2 interface.
FTOS(conf-if)#show config
!
interface Port-channel 1
no ip address
switchport
no shutdown
FTOS(conf-if)#
To configure an interface in Layer 2 mode, use these commands in the INTERFACE mode:
Command Syntax
no shutdown
switchport
For information on enabling and configuring Spanning Tree Protocol, Refer to
(STP). To view the interfaces in Layer 2 mode, use the command
mode.
476
|
Interfaces
Possible
Requires
Modes
Creation
Layer 2
No
Layer 3
Layer 3
No
n/a
No
Layer 3
Yes
n/a
No
Layer 2
Yes
Layer 3
Layer 2
Yes, except for the
Layer 3
default VLAN
command in INTERFACE mode to enable Layer 2 data transmissions through an
Command Mode
INTERFACE
INTERFACE
Default State
Shutdown (disabled)
Shutdown (disabled)
Shutdown (disabled)
No shutdown (enabled)
Enabled
Shutdown (disabled)
No shutdown (active for Layer 2)
Shutdown (disabled for Layer 3)
Purpose
Enable the interface.
Place the interface in Layer 2 (switching) mode.
Spanning Tree Protocol
show interfaces switchport
in the EXEC