
CLI Commands
The following table summarizes the equivalent CLI commands for items in the
VLAN/VLAN Membership
page.
Example
Console(config)#vlan database
Console(config-vlan)#vlan 105 name RD5 media ethernet
Console(config-vlan)#exit
Console(config)#interface ethernet 1/1
Console(config-if)#switchport allowed vlan add 105,7,9 tagged
Console(config-if)#exit
Console(config)#exit
Console#show vlan id 105
VLAN Name Status Ports/Channel groups
---- ----- -------- --------------------------------
105 RD5 active Eth1/ 1 Eth1/ 2 Eth1/ 3 Eth1/ 4 Eth1/ 5
Eth1/ 6 Eth1/ 7 Eth1/ 8 Eth1/ 9 Eth1/10
Console#
Port Settings
On the
Port Settings
page, you can specify the default port VLAN ID (PVID) for each port on your switch. All untagged packets entering the switch are tagged
by default with the ID specified by the port's PVID.
The
Port Settings
page is set up in a table format. For each port listed in the
Port
column, the following options are available:
l
PVID
—
Specifies the VLAN ID assigned to untagged frames received on the port. To assign a VLAN ID as the port's PVID, the port must be an untagged
VLAN member.
Command
Usage
vlan database
Allows you to enter VLAN database mode.
vlan
vlan-id
[name
vlan-name
]
media ethernet [state {suspend |
active}]
Configures a VLAN.
Use the
no form
command to restore the default or delete a VLAN.
interface vlan
vlan-id
Allows you to enter interface configuration mode for VLANs and to
configure a physical interface.
switchport allowed vlan {add
vlan-list
[tagged | untagged] |
remove
vlan-list
}
Configures untagged and tagged ports.
The parameter
vlan-list
is the list of VLAN identifiers being added.
Separate nonconsecutive VLAN identifiers with a comma and no spaces;
use a hyphen to designate a range of IDs.
switchport forbidden vlan {add
vlan-list
| remove
vlan-list
}
Configures forbidden VLANs for a port.
show vlan [id
vlan-id
| name
vlan-
name
]
Shows VLAN information.