17 VLANs
17.2 Configuration of the basic VLAN functionality
17.2.1 List of configuration commands
The following table describes the commands used to configure basic VLAN functionality.
Table 17-6 List of configuration commands
Command name
name
state
switchport access
switchport mac
switchport mode
switchport protocol
switchport trunk
vlan
17.2.2 Configuring VLANs
Points to note
You can create a VLAN. To create a new VLAN, specify the VLAN ID and VLAN type.
If the VLAN type is omitted, a port VLAN is created. A VLAN ID list can also be used
to perform batch setup of multiple VLANs.
The
VLAN is specified, only the mode is switched. The VLAN configuration mode allows
VLAN parameters to be set.
Note that the following explains common settings that do not depend on the VLAN
type. For details about port VLANs, protocol VLANs, and MAC VLANs, see the
subsequent sections.
Command examples
1.
(config)# vlan 10
Creates a port VLAN with VLAN ID 10, and switches to the VLAN configuration mode
for VLAN 10.
2.
(config-vlan)# name "PORT BASED VLAN 10"
(config-vlan)# exit
Sets the name of the created port VLAN 10 to
3.
(config)# vlan 100-200
Creates port VLANs in batch mode by using VLAN IDs 100 to 200. The command
258
Description
Sets a VLAN name.
Sets the VLAN status (started/stopped).
Sets the access port VLAN.
Sets MAC VLAN port information.
Sets the type of a port (access, protocol, MAC, or trunk).
Sets the VLAN for protocol ports.
Sets the VLAN for a trunk port.
Creates a VLAN. Also, sets items pertaining to a VLAN in VLAN
configuration mode.
vlan
configuration command switches to VLAN configuration mode. If a created
PORT BASED VLAN 10
.