DXS-1210 Series Smart Managed Switch CLI Reference Guide
363
Switch# configure terminal
Switch(config)#interface eth 1/0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)#
48-8
switchport trunk allowed vlan
This command is used to configure the VLANs that are allowed to receive and send traffic on the
specified interface in a tagged format. Use the no form of this command to revert to the default setting.
switchport trunk allowed vlan {all | [add | remove | except] VLAN-ID [, | -]}
no switchport trunk allowed vlan
Parameters
all
Specifies that all VLANs are allowed on the interface.
add
Specifies to add the specified VLAN list to the allowed VLAN list.
remove
Specifies to remove the specified VLAN list from the allowed VLAN list.
except
Specifies that all VLANs except the VLANs in the exception list are
allowed.
VLAN-ID
Specifies the allow VLAN list or the VLAN list to be added to or
removed from the allow VLAN list.
,
(Optional) Specifies a series of VLANs, or separate a range of VLANs
from a previous range. No space is required before and after the
comma.
-
(Optional) Specifies a range of VLANs. No space is required before
and after the hyphen.
Default
By default, all VLANs are allowed.
Command Mode
Interface Configuration Mode.
Command Default Level
Level: 12.
Usage Guideline
This command only takes effect when the interface is set to trunk mode. If a VLAN is allowed on a
trunk port, the port will become the tagged member of the VLAN. When the allowed VLAN option is
set to all, the port will be automatically added to all the VLAN created by the system.
Example
This example shows how to configure interface eth1/0/1 as a tagged member of VLAN 1000.
Switch# configure terminal
Switch(config)#interface eth 1/0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan add 1000
Switch(config-if)#