Cisco 2950G 24 Software Configuration Guide - Page 355
Defining the Allowed VLANs on a Trunk, vlan-list, interface-id, Trunking VLANs Enabled
UPC - 746320687711
View all Cisco 2950G 24 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 355 highlights
Chapter 14 Configuring VLANs Configuring VLAN Trunks This example shows how to configure the Fast Ethernet interface 0/4 as an 802.1Q trunk. The example assumes that the neighbor interface is configured to support 802.1Q trunking. Switch# configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# interface fastethernet0/4 Switch(config-if)# switchport mode dynamic desirable Switch(config-if)# end Defining the Allowed VLANs on a Trunk By default, a trunk port sends traffic to and receives traffic from all VLANs. All VLAN IDs, 1 to 4094 when the EI is installed, and 1 to 1005 when the SI is installed, 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. Note You cannot remove VLAN 1 or VLANs 1002 to 1005 from the allowed VLAN 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 an 802.1Q trunk: Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Command Purpose configure terminal Enter global configuration mode. interface interface-id Enter interface configuration mode and the port to be configured. switchport mode trunk Configure the interface as a VLAN trunk port. switchport trunk allowed vlan {add | all | except | remove} vlan-list (Optional) Configure the list of VLANs allowed on the trunk. For explanations about using the add, all, except, and remove keywords, refer to the command reference for this release. The vlan-list parameter is either a single VLAN number from 1 to 4094 or a range of VLANs described by two VLAN numbers, the lower one first, separated by a hyphen. Do not enter any spaces between comma-separated VLAN parameters or in hyphen-specified ranges. All VLANs are allowed by default. You cannot remove any of the default VLANs (1 or 1002 to 1005) from a trunk. end Return to privileged EXEC mode. show interfaces interface-id switchport Verify your entries in the Trunking VLANs Enabled field of the display. copy running-config startup-config (Optional) Save your entries in the configuration file. To return to the default allowed VLAN list of all VLANs, use the no switchport trunk allowed vlan interface configuration command. 78-14982-01 Catalyst 2950 Desktop Switch Software Configuration Guide 14-19