To simplify configuration, LNP supports auto-negotiation of link types on Ethernet interfaces and allows Ethernet interfaces to join VLANs through auto-negotiation. Typically, when LNP is deployed, the VLAN Central Management Protocol (VCMP) also needs to be deployed so that VLANs can be centrally created and deleted and user configurations are simplified. For details about VCMP, see VCMP Configuration.
The system view is displayed.
LNP is enabled globally.
By default, LNP is enabled on all interfaces.
The view of the Ethernet interface that needs to be enabled with LNP is displayed.
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 both globally and in the interface view.
An LNP mode is configured.
By default, the LNP mode of a Layer 2 Ethernet interface on the S2720-EI, S5720I-SI, S5720-LI, S5735-L, S5735S-L, S5735S-L-M, S5720S-LI, S6720-LI, S6720S-LI, S5730-SI, S5730S-EI, S6720-SI, S6720S-SI, S5720-SI, S5735-S, S5735S-S, S5735-S-I, and S5720S-SI is negotiation-auto, and the LNP negotiation mode of a Layer 2 Ethernet interface on other models is negotiation-desirable.
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 connected to an AP or voice terminal receives untagged and tagged frames, configure the default VLAN for the interface so that the 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 the specified VLAN.
By default, the default VLAN of an access interface and the VLAN that an access interface joins are both VLAN 1.
In Figure 1, to simplify configurations, switches are connected through the trunk link, and switches and user terminals are connected through access links and added to VLANs. By default, LNP is enabled globally and on all interfaces.
Configure Switch3.
<HUAWEI> system-view [HUAWEI] sysname Switch3 [Switch3] vlan batch 10 20 [Switch3] interface GigabitEthernet 0/0/1 [Switch3-GigabitEthernet0/0/1] port trunk allow-pass only-vlan 10 20 [Switch3-GigabitEthernet0/0/1] quit [Switch3] interface GigabitEthernet 0/0/2 [Switch3-GigabitEthernet0/0/2] port trunk allow-pass only-vlan 10 20 [Switch3-GigabitEthernet0/0/2] quit
Configure Switch1. The configurations of Switch2 are similar to the configuration of Switch1, and are not mentioned here.
<HUAWEI> system-view [HUAWEI] sysname Switch1 [Switch1] vlan batch 10 20 [Switch1] interface GigabitEthernet 0/0/1 [Switch1-GigabitEthernet0/0/1] port default vlan 10 [Switch1-GigabitEthernet0/0/1] quit [Switch1] interface GigabitEthernet 0/0/2 [Switch1-GigabitEthernet0/0/2] port trunk allow-pass only-vlan 10 20 [Switch1-GigabitEthernet0/0/2] quit [Switch1] interface GigabitEthernet 0/0/3 [Switch1-GigabitEthernet0/0/3] port default vlan 20 [Switch1-GigabitEthernet0/0/3] quit