38
VLAN Commands Set
Switch Commands
Level Description
Example
vlan database
P
Enter VLAN configure
mode
switch#
vlan database
Vlanmode
[portbase| 802.1q |
gvrp]
V
To set switch VLAN
mode.
switch(vlan)#
vlanmode portbase
or
switch(vlan)#
vlanmode 802.1q
or
switch(vlan)#
vlanmode gvrp
no vlan
V
No VLAN
Switch(vlan)#
no vlan
Ported based VLAN configuration
vlan port-based
grpname
[Group Name]
grpid
[GroupID]
port
[PortNumbers]
V
Add new port based
VALN
switch(vlan)#
vlan port-based
grpname test grpid 2 port 2-4
or
switch(vlan)#
vlan port-based
grpname test grpid 2 port 2,3,4
show vlan
[GroupID]
or
show vlan
V
Show VLAN
information
switch(vlan)#
show vlan 23
no vlan group
[GroupID]
V
Delete port base
group ID
switch(vlan)#
no vlan group 2
IEEE 802.1Q VLAN
vlan 8021q name
[GroupName]
vid
[VID]
V
Change the name of
VLAN group, if the
group didn
‘t exist, this
command can
‘t be
applied.
switch(vlan)#
vlan 8021q name
test vid 22
vlan 8021q port
[PortNumber]
access-link untag
[UntaggedVID]
V
Assign a access link
for VLAN by port, if the
port belong to a trunk
group, this command
can
‘t be applied.
switch(vlan)#
vlan 8021q port 3
access-link untag 33