< Home

Configuring Interface-based VLAN Assignment (LNP Dynamically Negotiates the Link Type)

Context

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.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run undo lnp disable

    LNP is enabled globally.

    By default, LNP is enabled on all interfaces.

  3. Run interface interface-type interface-number

    The view of the Ethernet interface that needs to be enabled with LNP is displayed.

  4. 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 both globally and in the interface view.

  5. Run port link-type { negotiation-desirable | negotiation-auto }

    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.

    There are limitations on an 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 voice VLAN in auto mode cannot be configured on the interface.

  6. Configure the VLAN allowed by an interface.

    • When a trunk interface is negotiated, perform the following operations:

      1. 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.

      2. (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.

Configuration Example

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.

Figure 1 Networking of interface-based VLAN assignment (LNP dynamically negotiates the link type)

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

Verifying the Configuration

  • Run the display lnp { interface interface-type interface-number | summary } command in any view to check LNP negotiation information on a Layer 2 Ethernet interface.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >