OcNOS-RON : Layer 2 Guide : Layer 2 Command Reference : VLAN and Private VLAN Commands : switchport trunk allowed
switchport trunk allowed
Use this command to set the switching characteristics of the interface to trunk.
For a VLAN range, specify two VLAN identifiers: the lowest and then the highest separated by a hyphen. For a VLAN list, specify the VLAN identifiers separated by commas. Do not enter spaces between the hyphens or commas.
Use the no parameter to remove all VLAN identifiers configured on this port.
Command Syntax
switchport trunk allowed vlan all
switchport trunk allowed vlan none
switchport trunk allowed vlan add VLAN_ID
switchport trunk allowed vlan except VLAN_ID
switchport trunk allowed vlan remove VLAN_ID
no switchport trunk
Parameters
all
Allow all VLANs to transmit and receive through the interface.
none
Allow no VLANs to transmit and receive through the interface.
add
Add these VLANs to the member set.
VLAN_ID
VLAN identifier(s) <2-4094>. You can specify a single VLAN, a VLAN range, or a VLAN list.
except
All VLANs except these VLANs are part of the member set.
VLAN_ID
VLAN identifier(s) <2-4094>. You can specify a single VLAN, a VLAN range, or a VLAN list.
remove
Remove these VLANs from the member set.
VLAN_ID
VLAN identifier(s) <2-4094>. You can specify a single VLAN, a VLAN range, or a VLAN list.
Default
Received frames that cannot be classified in the previous step based on the acceptable frame type parameter (access/trunk) are discarded.
Command Mode
Interface mode
Applicability
This command was introduced before OcNOS version 1.3.
Examples
The following shows adding a single VLAN to the port’s member set.
(config)#interface eth0
(config-if)#switchport trunk allowed vlan add 2
The following shows adding a range of VLANs to the port’s member set.
(config)#interface eth0
(config-if)#switchport trunk allowed vlan add 2-4
Last modified date: 07/13/2023