Table Of Contents
Configuring Layer 2 Interfaces
Configuring a Range of Interfaces
Defining a Range Macro
Configuring Layer 2 Optional Interface Features
Interface Speed and Duplex Configuration Guidelines
Configuring the Interface Speed
Configuring the Interface Duplex Mode
Configuring a Description for an Interface
Configuring a Layer 2 Interface as a Layer 2 Trunk
Configuring a Layer 2 Interface as Layer 2 Access
Configuring Layer 2 Interfaces
The Cisco MWR 2941 has an onboard layer 2 Gigabit Ethernet switch and supports HWICs with layer 2 interfaces.To configure the layer 2 interfaces on the Cisco MWR 2941, complete the following tasks:
•
Configuring a Range of Interfaces
•
Defining a Range Macro
•
Configuring Layer 2 Optional Interface Features
Configuring a Range of Interfaces
The interface range command allows you to configure multiple interfaces at once. Follow these steps to configure an interface range.
|
Command
|
Purpose
|
Step 1
|
enable
Example:
Router#
|
Enter enable mode.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
Router(config)#
|
Enter configuration mode.
|
Step 3
|
interface range interface slot/port - port
Example:
Router(config)# interface range GigabitEthernet 0/1 - 3
|
Use the interface-range command to select a range of interfaces to configure. You can specify a range that includes both VLANs and physical interfaces.
|
Defining a Range Macro
A range macro allows you to create a name that defines a range of interfaces on the Cisco MWR 2941. Follow these steps to configure an interface range macro.
|
Command
|
Purpose
|
Step 1
|
enable
Example:
Router#
|
Enter enable mode.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
Router(config)#
|
Enter configuration mode.
|
Step 3
|
define interface-range macro interface slot/port - port
Example:
Router(config)# define interface-range first_three GigabitEthernet0/1 - 2
|
Use the define interface range command to create the macro.
|
Configuring Layer 2 Optional Interface Features
•
Interface Speed and Duplex Configuration Guidelines
•
Configuring the Interface Speed
•
Configuring the Interface Duplex Mode
•
Configuring a Description for an Interface
•
Configuring a Layer 2 Interface as a Layer 2 Trunk
•
Configuring a Layer 2 Interface as Layer 2 Access
Interface Speed and Duplex Configuration Guidelines
Use the following guidelines when you configure an interface speed and duplex mode:
•
Speed and duplex commands apply only to FastEthernet interfaces. They do not apply to the onboard Gigabit Ethernet ports.
•
If both ends of the line support autonegotiation, use the default autonegotiation settings.
•
If one interface supports auto negotiation and the other end does not, configure duplex and speed on both interfaces; do not use the auto setting on the supported side.
•
Both ends of the line need to be configured to the same setting; for example, both hard-set or both auto-negotiate. Mismatched settings are not supported.
Caution 
Changing the interface speed and duplex mode configuration might shut down and re-enable the interface during the reconfiguration.
Configuring the Interface Speed
Follow these steps to configure the speed of a layer 2 interface.
|
Command
|
Purpose
|
Step 1
|
enable
Example:
Router#
|
Enter enable mode.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
Router(config)#
|
Enter configuration mode.
|
Step 3
|
interface interface slot/port
Example:
Router(config)# interface fastethernet 1/0
|
Enter configuration mode for the interface that you want to modify.
|
Step 4
|
speed [10 | 100 | auto ]
Example:
Router(config-if)# speed auto
|
Specify the interface speed. You can set an interface to 10 Mbps, 100 Mbps, or autonegotiate.
|
Configuring the Interface Duplex Mode
Follow these steps below to set the duplex mode of a layer 2 interface.
|
Command
|
Purpose
|
Step 1
|
enable
Example:
Router#
|
Enter enable mode.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
Router(config)#
|
Enter configuration mode.
|
Step 3
|
interface interface slot/port
Example:
Router(config)# interface fastethernet 1/0
|
Enter configuration for the interface that you want to modify.
|
Step 4
|
duplex [auto | full | half]
Example:
Router(config-if)# duplex auto
|
Use the duplex command to set the interface to send traffic at full duplex, half duplex, or to autonegotiate its duplex setting.
|
Note
If you set the port speed to auto on a 10/100-Mbps Ethernet interface, the interface auto-negotiates the speed and duplex settings. You cannot change the duplex mode of interfaces set to auto-negotiation.
Configuring a Description for an Interface
You can add a description of an interface to help you remember its function. The description appears in the output of the following commands: show configuration, show running-config, and show interfaces.
|
Command
|
Purpose
|
Step 1
|
enable
Example:
Router#
|
Enter enable mode.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
Router(config)#
|
Enter configuration mode.
|
Step 3
|
interface interface slot/port
Example:
Router(config)# interface fastethernet 1/0
|
Enter configuration for the interface that you want to modify.
|
Step 4
|
description description
Example:
Router(config-if)# description newinterface
|
Use the description command to assign a description to the interface.
|
Configuring a Layer 2 Interface as a Layer 2 Trunk
Follow these steps to configure an interface as a Layer 2 trunk.
|
Command
|
Purpose
|
Step 1
|
enable
Example:
Router#
|
Enter enable mode.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
Router(config)#
|
Enter configuration mode.
|
Step 3
|
interface interface slot/port
Example:
Router(config)# interface fastethernet 1/0
|
Enter configuration for the interface that you want to modify.
|
Step 4
|
shutdown
Example:
Router(config-if)# shutdown
|
Shut down the interface.
|
Step 5
|
switchport mode trunk
Example:
Router(config-if)# switchport mode trunk
|
Use the switchport mode trunk command to configure the interface as a Layer 2 trunk.
Note The encapsulation is always set to dot1q.
|
Step 6
|
switchport trunk native vlan vlan
Example:
Router(config-if)# switchport trunk native vlan 1
|
If you are configuring an 802.1Q trunk, specify the native VLAN. Otherwise, proceed to the .
|
Step 7
|
switchport trunk allowed vlan add vlan
Example:
Router(config-if)# switchport trunk allowed vlan add vlan1, vlan2, vlan3
|
Use the switchport trunk allowed vlan command to configure the list of VLANs allowed on the trunk. The add, except, none, or remove keywords specify the action to take for the specified VLANs.
Note All VLANs are allowed by default. You cannot remove any of the default VLANs from a trunk.
|
Step 8
|
no shutdown
Example:
Router(config-if)# no shutdown
|
Activate the interface.
|
Step 9
|
end
Example:
Router#
|
Exit configuration mode.
You can use the show running-configuration command to verify the layer 2 trunk configuration.
|
Configuring a Layer 2 Interface as Layer 2 Access
Follow these steps to configure a Fast Ethernet interface as Layer 2 access.
|
Command
|
Purpose
|
Step 1
|
enable
Example:
Router#
|
Enter enable mode.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
Router(config)#
|
Enter configuration mode.
|
Step 3
|
interface interface slot/port
Example:
Router(config)# interface fastethernet 1/0
|
Enter configuration for the interface that you want to modify.
|
Step 4
|
shutdown
Example:
Router(config-if)# shutdown
|
Shut down the interface.
|
Step 5
|
switchport mode access
Example:
Router(config-if)# switchport mode access
|
Use the switchport mode access command to configure the interface as a layer 2 access.
|
Step 6
|
switchport access vlan vlan
Example:
Router(config-if)# switchport access vlan 1
|
Use the switchport access vlan command to specify an access VLAN for access ports.
|
Step 7
|
no shutdown
Example:
Router(config-if)# no shutdown
|
Activate the interface.
|
Step 8
|
end
Example:
Router#
|
Exit configuration mode.
|

Note
You can use the show running-config interface command and the show interfaces command to verify layer 2 access configuration.