< Home

port trunk allow-pass

Function

The port trunk allow-pass command configures the port to allow the packets with designated vlan tag to pass through.

The undo port trunk allow-pass command deletes the configured VLAN ID.

By default, the current port allows the packets whose VLAN ID is 1 to pass.

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 }

Parameters

Parameter Description Value
vlan-id1

Specifies the ID of the start VLAN to which the trunk port belongs.

The value is an integer that ranges from 1 to 4094.
to vlan-id2

Specifies the ID of the end VLAN to which the trunk port belongs.

The value is an integer that ranges from 1 to 4094. vlan-id2 must be greater than vlan-id1. vlan-id1 and vlan-id2 specify a range of VLANs. If you do not specify to vlan-id2, the VLAN range is only the VLAN specified by vlan-id1.
all

Specifies all the VLANs to which the trunk ports belong.

-

Views

Layer-2 Ethernet interface view, Layer-2 Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

A trunk port on a switch connects to another switch only through a trunk link. It has the following characteristics:

  • A trunk port allows the tagged frames from more than one VLAN to pass through.

  • If a tagged frame to be sent through a trunk port carries a VLAN ID the same as the default one of the port, the system removes the VLAN tag from the frame. It is because the PVID of each port is unique. So, only in this case, the frames forwarded by the trunk port are untagged.

  • If a tagged frame to be sent through a trunk port carries a VLAN ID different from the default one of the port, the system directly forwards the frame without performing any other action.

You can use the port trunk allow-pass command to add trunk ports to VLANs in tagged mode.

In tagged mode, Layer 2 ports do not remove the tags from frames to be sent.

When using the command, note the following:

  • The specified VLAN must be an existing one.

  • The ports to be added to VLANs must be Layer 2 ports. If you want to add Layer 3 ports to VLANs, you need to run the portswitch command to convert the Layer 3 ports to Layer 2 ports first.

Example

# Allow the VLANs VLAN2 to VLAN10, VLAN100 and VLAN200 to pass the trunk port GE 1/0/1.

<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet 0/0/1] portswitch
[sysname-GigabitEthernet 0/0/1] port link-type trunk
[sysname-GigabitEthernet 0/0/1] port trunk allow-pass vlan 2 to 10 100 200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >