The port trunk allow-pass only-vlan command configures VLANs allowed by the interface that is configured as a trunk interface through LNP negotiation.
The undo port trunk allow-pass only-vlan command restores the default VLANs allowed by the interface that is configured as a trunk interface through LNP negotiation.
By default, if the Layer 2 Ethernet interface is negotiated as a trunk interface, the interface allows all VLANs.
port trunk allow-pass only-vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | none }
undo port trunk allow-pass only-vlan
Parameter | Description | Value |
---|---|---|
vlan-id1 [ to vlan-id2 ] | Specifies VLANs on a Layer 2 Ethernet interface so
that the interface forwards only packets for these VLANs after LNP
negotiation.
In one port trunk allow-pass only-vlan command, a maximum of 10 VLAN ranges can be specified using to. |
The value is an integer ranging from 1 to 4094. |
none | Specifies that the Layer 2 Ethernet interface cannot forward packets for any VLAN after the LNP negotiation. |
- |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 40GE interface view, 100GE interface view, MultiGE interface view, VE interface view, Eth-Trunk interface view, port group view
Usage Scenario
Link-type Negotiation Protocol (LNP) dynamically negotiates the link type of an Ethernet interface. The negotiated link type can be access or trunk.
In routine maintenance, if the network administrator wants to update the VLANs on a Layer 2 Ethernet interface so that the interface forwards only packets for these VLANs after LNP negotiation, perform the following operations in the corresponding interface view.
Alternatively, to simplify configurations and reduce the network administrator's maintenance workload, run the port trunk allow-pass only-vlan to update VLANs on the Layer 2 Ethernet interface so that the interface forwards only packets for these VLANs after LNP negotiation.
Prerequisites
The LNP function is supported on the Layer 2 Ethernet interface, and the Layer 2 Ethernet interface is configured to work in auto-negotiation mode using the port link-type negotiation command.