Configuring An Ethernet Interface As A Layer 2 Trunk - Cisco 4500M Software Manual

Software guide
Table of Contents

Advertisement

Configuring Ethernet Interfaces for Layer 2 Switching

Configuring an Ethernet Interface as a Layer 2 Trunk

Note
The default for Layer 2 interfaces is switchport mode dynamic auto. If the neighboring interface
supports trunking and is configured to trunk mode or dynamic desirable mode, the link becomes a
Layer 2 trunk. By default, trunks negotiate encapsulation. If the neighboring interface supports ISL and
802.1Q encapsulation and both interfaces are set to negotiate the encapsulation type, the trunk uses ISL
encapsulation.
To configure an interface as a Layer 2 trunk, perform this task:
Command
Step 1
Switch(config)# interface {fastethernet |
gigabitethernet | tengigabitethernet}
slot / port
Step 2
Switch(config-if)# shutdown
Step 3
Switch(config-if)# switchport trunk
encapsulation {isl | dot1q | negotiate}
Step 4
Switch(config-if)# switchport mode
{dynamic {auto | desirable} | trunk}
Step 5
Switch(config-if)# switchport access vlan
vlan_num
Step 6
Switch(config-if)# switchport trunk
native vlan vlan_num
Step 7
Switch(config-if)# switchport trunk
allowed vlan {add | except | all |
remove}
vlan_num [, vlan_num [, vlan_num [,....]]
Step 8
Switch(config-if)# switchport trunk
pruning vlan {add | except | none |
remove}
vlan_num [, vlan_num [, vlan_num [,....]]
Step 9
Switch(config-if)# no shutdown
Step 10
Switch(config-if)# end
Software Configuration Guide—Release 12.2(25)EW
12-6
Chapter 12
Purpose
Specifies the interface to configure.
(Optional) Shuts down the interface to prevent traffic flow until
configuration is complete.
(Optional) Specifies the encapsulation.
You must enter this command with either the isl or dot1q
Note
keyword to support the switchport mode trunk
command, which is not supported by the default mode
(negotiate).
Configures the interface as a Layer 2 trunk. (Required only if the
interface is a Layer 2 access port or to specify the trunking mode.)
(Optional) Specifies the access VLAN, which is used if the
interface stops trunking. The access VLAN is not used as the
native VLAN.
The vlan_num parameter is either a single VLAN number
Note
from 1 to 1005 or a range of VLANs described by two
VLAN numbers, the lesser one first, separated by a dash.
Do not enter any spaces between comma-separated vlan
parameters or in dash-specified ranges.
For 802.1Q trunks, specifies the native VLAN.
If you do not set the native VLAN, the default is used
Note
(VLAN 1).
(Optional) Configures the list of VLANs allowed on the trunk. All
VLANs are allowed by default. You cannot remove any of the
default VLANs from a trunk.
(Optional) Configures the list of VLANs allowed to be pruned
from the trunk (see the
"Understanding VTP Pruning" section on
page
27-3). The default list of VLANs allowed to be pruned
contains all VLANs, except for VLAN 1.
Activates the interface. (Required only if you shut down the
interface.)
Exits interface configuration mode.
Configuring Layer 2 Ethernet Interfaces
OL-6696-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

4500 series

Table of Contents