port trunk allow-pass vlan
Function
The port trunk allow-pass vlan command adds a trunk interface to the specified VLANs.
The undo port trunk allow-pass vlan command deletes a trunk interface from the specified VLANs.
By default, a trunk interface is in VLAN 1.
Format
port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }
undo port trunk allow-pass vlan { { vlan-id1 [ to vlan-id2 ] }&<1-10> | all }
(Port group view)port trunk allow-pass vlan vlan-id3 [ step step-number [ increased | decreased ] ]
(Port group view)undo port trunk allow-pass vlan vlan-id3 [ step step-number [ increased | decreased ] ]
Parameters
Parameter |
Description |
Value |
---|---|---|
vlan-id1 [ to vlan-id2 ] |
Adds a trunk interface to specified VLANs.
|
The value of vlan-id1 is an integer that ranges from 1 to 4094. The value of vlan-id2 is an integer that ranges from 1 to 4094. |
all |
Adds a trunk interface to or deletes it from all VLANs. |
- |
vlan-id3 | Specifies the ID of the start VLAN to be bound to the member port of a port group. |
The value is an integer that ranges from 1 to 4094. |
step step-number | Specifies the step for the increase or decrease in the value of the VLAN ID. With this parameter specified, the member ports in a port group can be bound to VLANs starting from the one identified by vlan-id3 in an ascending or descending order at a step specified by step-number. This facilitates the subsequent user configuration. For example: A port group has 10 member ports. You can configure increased, and set vlan-id3 to 1 and step-number to 1 in the port trunk allow-pass vlan command. After this configuration, member port 1 joins VLAN 1; member port 2 joins VLAN 2... By analogy, member port 10 joins VLAN 10. |
The value is an integer that ranges from 1 to 4094. |
increased | Specifies an increase in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group. |
By default, Layer 2 ports are bound to the VLANs in an ascending order. |
decreased | Specifies a decrease in the values of VLAN IDs starting from the one identified by vlan-id3 at a step specified by step-number to bind the VLANs to the member ports of a port group. When setting decreased, ensure that the value of vlan-id3 is greater than or equal to the number of the member ports of the port group. |
- |
Usage Guidelines
Usage Scenario
A trunk interface can join multiple VLANs and connects to a network device. To allow all packets from one or multiple VLANs to pass through a trunk interface, the trunk interface must be added to the VLANs using the port trunk allow-pass vlan command.
Prerequisites
The link-type of the interface is configured to trunk.
Precautions
The command cannot be used on a member interface of an Eth-Trunk.
If you run the port trunk allow-pass vlan command multiple times in the same interface view, the interface is added to all the specified VLANs.