Interfaces | 225
To configure an interface in Layer 2 mode, use these commands in INTERFACE mode: 
For information about enabling and configuring STP, refer to Layer 2 on page 305.
To view the interfaces in Layer 2 mode, use the command 
show interfaces switchport in EXEC mode.
Configure Layer 3 (Network) Mode
When you assign an IP address to a physical interface, you place it in Layer 3 mode. To enable Layer 3 
mode on an individual interface, use the 
ip address command and no shutdown command in INTERFACE 
mode. You must configure the IP address and one of the interfaces in the system must be in Layer 3 mode 
before you configure or enter a Layer 3 protocol mode (for example, open shortest path first [OSPF]).
In all interface types except VLANs, the 
shutdown command prevents all traffic from passing through the 
interface. In VLANs, the 
shutdown command prevents Layer 3 traffic from passing through the interface. 
Layer 2 traffic is unaffected by the 
shutdown command. 
To view an example of a Layer 3 interface, use the 
show config command (Figure 13-5).
Figure 13-5.  show config Command Example of a Layer 3 Interface
If an interface is in the incorrect layer mode for a given command, an error message is displayed. For 
example, in Figure 13-6, the 
ip address command triggered an error message because the interface is in 
Layer 2 mode and the 
ip address command is a Layer 3 command only.
Figure 13-6.  Error Message When Trying to Add an IP Address to a Layer 2 Interface
To determine the configuration of an interface, use the show config command in INTERFACE mode or the 
various 
show interface commands in EXEC mode.
Command Syntax Command Mode Purpose
no shutdown
INTERFACE Enable the interface.
switchport
INTERFACE Place the interface in Layer 2 (switching) mode.
FTOS(conf-if)#show config
!
interface TenGigabitEthernet 1/5
 ip address 10.10.10.1 /24
 no shutdown
FTOS(conf-if)#
FTOS(conf-if)#show config
!
interface TenGigabitEthernet 1/2
 no ip address
 switchport
 no shutdown
FTOS(conf-if)#ip address 10.10.1.1 /24
% Error: Port is in Layer 2 mode TenGig 1/2.
FTOS(conf-if)#
Error message