port trunk allow-pass vlan

Function

The port trunk allow-pass vlan command adds a trunk or a hybrid interface to a VLAN.

The undo port trunk allow-pass vlan command deletes a trunk or a hybrid interface from a VLAN.

By default, a trunk or hybrid interface is not added to a VLAN.

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 start VLAN ID.

The value is an integer ranging from 1 to 4094.

vlan-id2

Specifies the end VLAN ID.

The value is an integer ranging from 1 to 4094.

all

Indicates all VLANs.

-

Views

Layer 2 100GE interface view, Layer 2 10GE interface view, 25GE-L2 view, 400GE-L2 view, Layer 2 40GE interface view, Layer 2 50GE interface view, Layer 2 Eth-Trunk interface view, Layer 2 GE interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
vlan write

Usage Guidelines

Usage Scenario

A trunk interface can be added to multiple VLANs and is generally used to connect network devices. If frames with one or more VLAN tags need to pass through a trunk interface, run the port trunk allow-pass command to add the trunk interface to the VLAN(s). In this manner, the trunk interface forwards these frames without removing the VLAN tags.

Prerequisites

An interface has been configured as a trunk or a hybrid interface using the port link-type command.

Precautions

The trunk interface to be added to VLANs must be a Layer 2 interface. If the interface is a Layer 3 interface, run the portswitch command to change the interface to a Layer 2 interface.

If you run the port trunk allow-pass command more than once on the same interface, all the configured VLANs take effect on the interface.

Running the undo port trunk allow-pass vlan command on an interface deletes the MAC address entries of the interface.

Example

# Add the trunk interface GE 0/1/1 to VLANs 2 to 10, 100, and 200.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/1
[*HUAWEI-GigabitEthernet0/1/1] portswitch
[*HUAWEI-GigabitEthernet0/1/1] port link-type trunk
[*HUAWEI-GigabitEthernet0/1/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 >