User Manual

If this command is applied to a logical interface, the settings of every LAN/SFP port associated with that interface are changed.
If the port type is changed from an access port to a trunk port, the setting of the switchport access vlan command returns to the
default setting.
To specify the VLAN ID that is associated as a trunk port, use the switchport trunk allowed vlan command. To specify the
native VLAN, use the switchport trunk native vlan command.
[Example]
Set LAN port #1 as a trunk port.
SWP1(config)#interface ge1
SWP1(config-if)#switchport mode trunk
11.1.11 Set associated VLAN for trunk port (tagged port)
[Syntax]
switchport trunk allowed vlan all
switchport trunk allowed vlan none
switchport trunk allowed vlan add vlan-ids
switchport trunk allowed vlan except vlan-ids
switchport trunk allowed vlan remove vlan-ids
no switchport trunk
[Keyword]
all : vlanAssociate to all VLANs that are set by the vlan command
none : Dissociate from all VLANs
add : Associate to the specified VLAN
except : Associate to all VLANs that are set by the vlan command except for the specified
remove : Dissociate from the specified VLAN
[Parameter]
vlan-ids : <1-4094>
VLAN ID set by the vlan command
To specify multiple items, use "-" or "," as shown below
To select from VLAN #2 through VLAN #4: 2-4
To select VLAN #2 and VLAN #4: 2,4
[Initial value]
Depends on VLAN preset. Refer to 3.2 Default setting values on page 20.
[Input mode]
interface mode
[Description]
Sets the VLAN ID that is associated as a trunk port with the applicable interface.
If this is executed with the "no" syntax, all associated VLAN IDs are deleted and the port type is changed to access port.
[Note]
This command can be set only for a LAN/SFP port or logical interface for which the switchport mode trunk command is set.
If this command is applied to a logical interface, the settings of every LAN/SFP port associated with that interface are changed.
If the port type is changed to access port, the setting of this command returns to the default setting.
If this is set with "all" or "except" specified, the content of a subsequently changed vlan command is always applied.
If this is set with "all" or "except" specified, making the following settings will change the remaining affiliated VLAN IDs to
the settings that were specified by "add."
If you specify "remove" to delete a VLAN ID that is associated
If you use the switchport trunk native vlan command to specify an associated VLAN ID
If you make this setting with except specified, and then associate the VLAN ID that had been excluded by specifying add, the
associated VLAN ID is changed to the setting specified by add.
If you specify "remove" and then specify an unassociated VLAN ID, an error occurs.
126 | Command Reference |
L2 switching function