EasyManua.ls Logo

Cisco Catalyst 2950 - CLI: Defining the Allowed Vlans on a Trunk; Changing the Pruning-Eligible List

Cisco Catalyst 2950
376 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
8-23
Catalyst 2950 Desktop Switch Software Configuration Guide
78-11380-03
Chapter 8 Configuring VLANs
How VLAN Trunks Work
CLI: Defining the Allowed VLANs on a Trunk
By default, a trunk port sends to and receives traffic from all VLANs in the VLAN database. All VLANs,
1 to 1005, are allowed on each trunk. However, you can remove VLANs from the allowed list, preventing
traffic from those VLANs from passing over the trunk. To restrict the traffic a trunk carries, use the
switchport trunk allowed vlan remove vlan-list interface configuration command to remove specific
VLANs from the allowed list.
A trunk port can become a member of a VLAN if the VLAN is enabled, if VTP knows of the VLAN,
and if the VLAN is in the allowed list for the port. When VTP detects a newly enabled VLAN and the
VLAN is in the allowed list for a trunk port, the trunk port automatically becomes a member of the
enabled VLAN. When VTP detects a new VLAN and the VLAN is not in the allowed list for a trunk
port, the trunk port does not become a member of the new VLAN.
Beginning in privileged EXEC mode, follow these steps to modify the allowed list of a 802.1Q trunk:
Changing the Pruning-Eligible List
The pruning-eligible list applies only to trunk ports. Each trunk port has its own eligibility list. VTP
Pruning must be enabled for this procedure to take effect. The Enabling VTP Pruning section on
page 8-15 describes how to enable VTP pruning.
Beginning in privileged EXEC mode, follow these steps to remove VLANs from the pruning-eligible list
on a trunk port:
Command Purpose
Step 1
configure terminal Enter global configuration mode.
Step 2
interface interface_id Enter interface configuration mode and the port to be added to the
VLAN.
Step 3
switchport mode trunk Configure VLAN membership mode for trunks.
Step 4
switchport trunk allowed
vlan remove vlan-list
Define the VLANs that are not allowed to transmit and receive on the
port.
The vlan-list parameter is a range of VLAN IDs. Separate
nonconsecutive VLAN IDs with a comma and no spaces; use a hyphen
to designate a range of IDs. Valid IDs are from 2 to 1001.
Step 5
end Return to privileged EXEC.
Step 6
showinterfaceinterface-id
switchport allowed-vlan
Verify your entries.
Step 7
copy running-config
startup-config
Save the configuration.
Command Purpose
Step 1
configure terminal Enter global configuration mode.
Step 2
interface interface-id Enter interface configuration mode, and select the trunk port for which VLANs
can be pruned.

Table of Contents