< Home

Example for Configuring LLDP on a Device that Has Multiple Neighbors

Networking Requirements

As shown in Figure 1, SwitchA, SwitchB, SwitchC are interconnected through an unknown network; the NMS has reachable routes to SwitchA, SwitchB, SwitchC; SNMP is configured on devices and NMS.

A network administrator wants to obtain Layer 2 information about SwitchA, SwitchB, and SwitchC to know details about network topology and configuration conflicts. The LLDP function can meet the network administrator's requirement.

Figure 1 Multiple-neighbor network

Configuration Roadmap

The configuration roadmap is as follows:
  1. Enable global LLDP on SwitchA, SwitchB, and SwitchC.
  2. Configure the interim unknown network to support LLDP transparent transmission. As shown in Figure 1, LLDP transparent transmission needs to be configured on SwitchD.

Procedure

  1. Enable global LLDP on SwitchA, SwitchB, and SwitchC.

    # Configure SwitchA.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] lldp enable

    # Configure SwitchB.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] lldp enable

    # Configure SwitchC.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchC
    [SwitchC] lldp enable

  2. Configure LLDP transparent transmission on SwitchD.

    • Enable group MAC function for the transparent transmission of Layer 2 protocol packets globally.

      <HUAWEI> system-view
      [HUAWEI] sysname SwitchD
      [SwitchD] l2protocol-tunnel lldp group-mac default-group-mac
      
    • Enable LLDP transparent transmission on interfaces.

      Run the l2protocol-tunnel lldp enable command on all the interfaces requiring this function, that is, the interfaces connecting to SwitchA, SwitchB, and SwitchC. Ensure that LLDP is disabled on these interfaces.

      [SwitchD] interface gigabitethernet 0/0/1
      [SwitchD-GigabitEthernet0/0/1] l2protocol-tunnel lldp enable
      [SwitchD-GigabitEthernet0/0/1] quit
      [SwitchD] interface gigabitethernet 0/0/2
      [SwitchD-GigabitEthernet0/0/2] l2protocol-tunnel lldp enable
      [SwitchD-GigabitEthernet0/0/2] quit
      [SwitchD] interface gigabitethernet 0/0/3
      [SwitchD-GigabitEthernet0/0/3] l2protocol-tunnel lldp enable
      [SwitchD-GigabitEthernet0/0/3] quit
      [SwitchD] quit

  3. Verify the configurations.

    • Check SwitchA.

      # Check the neighbor information of SwitchA, and you can see two neighbors connected to the outbound interface of SwitchA.
      [SwitchA] display lldp neighbor brief
      Local Intf   Neighbor Dev             Neighbor Intf             Exptime(s)
      GE0/0/1      SwitchB                  GE0/0/1                   20     
      GE0/0/1      SwitchC                  GE0/0/1                   2     
    • Check SwitchB.

      Refer to the steps for checking SwitchA.

    • Check SwitchC.

      Refer to the steps for checking SwitchA.

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    lldp enable
    #
    return
    
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    lldp enable
    #
    return
  • SwitchC configuration file

    #
    sysname SwitchC
    #
    lldp enable
    #
    return
  • SwitchD configuration file

    #
    sysname SwitchD
    #
    l2protocol-tunnel lldp group-mac 0100-0ccd-cdd0 
    #                                                                               
    interface GigabitEthernet0/0/1
     l2protocol-tunnel lldp enable
    #                                                                               
    interface GigabitEthernet0/0/2
     l2protocol-tunnel lldp enable
    #                                                                               
    interface GigabitEthernet0/0/3
     l2protocol-tunnel lldp enable
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >