Configuring Interface-based VLAN Assignment (LNP Dynamically Negotiates the Link Type)
Context
The switch supports the following link types on an Ethernet interface: access, hybrid, trunk, and dot1q tunnel. The four link types are applicable to different network positions and are manually specified. If the network topology changes, link types of Ethernet interfaces also need to be reconfigured which can be complicated. To simplify configuration, LNP supports auto-negotiation of the link types on Ethernet interfaces and allows Ethernet interfaces to join VLANs after the auto-negotiation.
When Link-type Negotiation Protocol (LNP) is deployed, the VLAN Central Management Protocol (VCMP) needs to be deployed so that VLANs can be centrally created and deleted and to simply user configurations. For details about VCMP, see VCMP Configuration.
Procedure
- Run:
system-view
The system view is displayed.
- Run:
undo lnp disable
Global LNP is enabled.
By default, global LNP is enabled. That is, LNP is enabled on all interfaces.
- Run:
interface interface-type interface-number
The view of the Ethernet interface that needs to be enabled with LNP is displayed.
- Run:
undo port negotiation disable
LNP is enabled on the Layer 2 Ethernet interface.
By default, LNP is enabled on all interfaces of the device.
When performing this step, ensure that the interface is a Layer 2 interface. If the interface is not a Layer 2 interface, run the portswitch command to configure the interface as a Layer 2 interface.
When an LNP-capable device is used with an LNP-incapable device, the LNP-capable device continuously sends LNP packets, which wastes bandwidth. You can run the port negotiation disable command in the Layer 2 Ethernet interface view to disable LNP.
To ensure successful negotiation, ensure that LNP is enabled globally and in the interface view.
- Run:
port link-type { negotiation-desirable | negotiation-auto }
An LNP mode is configured.
By default, the LNP negotiation mode of a Layer 2 Ethernet interface is negotiation-desirable.
There are limitations on the interface where the LNP mode is set to negotiation-desirable or negotiation-auto:- The sub-interface cannot be created.
- The MUX VLAN cannot be enabled.
- The interface cannot be used as the source or destination interface in VLAN Switch.
- The voice VLAN in auto mode cannot be configured on the interface.
- Configure the VLAN allowed by an interface.
When a trunk interface is negotiated, perform the following operations.
Run:
port trunk allow-pass only-vlan { { vlan-id1 [ to vlan-id2 ] } &<1-10> | none }
The VLAN allowed by the trunk interface is configured.
By default, a trunk interface allows all VLANs.
(Optional) Run:
port trunk pvid vlan vlan-id
The default VLAN of the interface is configured.
When the interface that connects to an AP or voice terminal receives untagged and tagged frames, configure the default VLAN for the interface so that interface adds the VLAN tag to untagged frames.
By default, the default VLAN of a trunk interface is VLAN 1.
When an access interface is negotiated, perform the following operation.
Run:
port default vlan vlan-id
The default VLAN is configured for the access interface and the access interface is added to a specified VLAN.
By default, the default VLAN of an access interface and the VLAN that an access interface joins are both VLAN 1.