Configuring VLANs
How to Configure VLANs
Defining the Allowed VLANs on a Trunk
Command
1.
configure terminal
2.
interface interface-id
3.
switchport mode trunk
4.
switchport trunk allowed vlan {add | all
| except | remove} vlan-list
5.
end
Changing the Pruning-Eligible List
Command
1.
configure terminal
2.
interface interface-id
3.
switchport trunk pruning vlan {add |
except | none | remove} vlan-list
[,vlan[,vlan[,,,]]
4.
end
Configuring the Native VLAN for Untagged Traffic
Command
1.
configure terminal
2.
interface interface-id
3.
switchport trunk native vlan vlan-id
4.
end
Purpose
Enters global configuration mode.
Specifies the port to be configured, and enters interface configuration
mode.
Configures the interface as a VLAN trunk port.
(Optional) Configures the list of VLANs allowed on the trunk.
Returns to privileged EXEC mode.
Purpose
Enters global configuration mode.
Selects the trunk port for which VLANs should be pruned, and enters
interface configuration mode.
Configures the list of VLANs allowed to be pruned from the trunk. (See
VTP Pruning, page
300.)
Returns to privileged EXEC mode.
Purpose
Enters global configuration mode.
Defines the interface that is configured as the IEEE 802.1Q trunk, and
enters interface configuration mode.
Configures the VLAN that is sending and receiving untagged traffic
on the trunk port.
Returns to privileged EXEC mode.
287