Example for Configuring Basic LLDP Functions

This section provides an example to describe how to configure basic LLDP functions to help the NMS obtain information about network topology.

Networking Requirements

As shown in Figure 1, there are reachable links between DeviceA, DeviceB, and DeviceC. DeviceA and DeviceC have reachable routes to the NMS. Before the LLDP function is configured, DeviceA cannot obtain status information about DeviceB and DeviceC, and the NMS cannot obtain topology information between DeviceA, DeviceB, and DeviceC by exchanging SNMP packets with them.

After the LLDP function is configured, devices can obtain status information about neighbors by exchanging LLDP packets between them. The NMS can search for DeviceA, DeviceB, and DeviceC based on their LLDP management addresses to obtain topology information between them.

Interface 1 in this example represents GE 0/1/1.

Figure 1 Networking diagram for configuring basic LLDP functions

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure IP addresses and routing protocols for interfaces on DeviceA, DeviceB, and DeviceC to ensure that network-layer routes are reachable.
  2. Enable the LLDP function for DeviceA, DeviceB, and DeviceC globally.
  3. Configure DeviceA, DeviceB, and DeviceC with LLDP management addresses, which are used to identify local devices among neighbors.
  4. Configure LLDP parameters for DeviceA, DeviceB, and DeviceC to optimize the LLDP performance.
  5. Enable the LLDP alarm function for DeviceA, DeviceB, and DeviceC. Configure an appropriate delay for a device to send LLDP alarms. An appropriate delay reduces system resource consumption.

Data Preparation

To complete the configuration, you need the following data:

  • LLDP management addresses of DeviceA, DeviceB, and DeviceC (10.10.10.1, 10.10.10.2, and 10.10.10.3, respectively)
  • Interval for sending LLDP packets (60s), delay for sending LLDP packets (9s), and delay for sending LLDP alarms (10s)

Procedure

  1. Configure IP addresses and route protocols for interfaces on DeviceA, DeviceB, and DeviceC, as shown in Figure 1. For details, see Configuration Files.
  2. Enable the LLDP function for DeviceA, DeviceB, and DeviceC globally.

    # Configure DeviceA.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceA
    [*HUAWEI] commit
    [~DeviceA] lldp enable
    [*DeviceA] commit

    # Configure DeviceB.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceB
    [*HUAWEI] commit
    [~DeviceB] lldp enable
    [*DeviceB] commit

    # Configure DeviceC.

    <HUAWEI> system-view
    [~HUAWEI] sysname DeviceC
    [*HUAWEI] commit
    [~DeviceC] lldp enable
    [*DeviceC] commit

  3. Configure LLDP management addresses for DeviceA, DeviceB, and DeviceC.

    # Configure 10.10.10.1 as the LLDP management address of DeviceA.

    [~DeviceA] lldp management-address 10.10.10.1
    [*DeviceA] commit

    # Configure 10.10.10.2 as the LLDP management address of DeviceB.

    [~DeviceB] lldp management-address 10.10.10.2
    [*DeviceB] commit

    # Configure 10.10.10.3 as the LLDP management address of DeviceC.

    [~DeviceC] lldp management-address 10.10.10.3
    [*DeviceC] commit

  4. Configure LLDP parameters for DeviceA, DeviceB, and DeviceC. These parameters include the interval and delay for a device to send LLDP packets.

    # Configure an interval and a delay for DeviceA to send LLDP packets.

    [~DeviceA] lldp message-transmission interval 60
    [*DeviceA] lldp message-transmission delay 9
    [*DeviceA] commit

    # Configure an interval and a delay for DeviceB and DeviceC to send LLDP packets.

    For details, see the configuration of DeviceA.

  5. Enable the LLDP alarm function for DeviceA, DeviceB, and DeviceC. Configure an appropriate delay for a device to send LLDP alarms.

    # Configure DeviceA.

    [~DeviceA] snmp-agent trap enable feature-name lldp
    [*DeviceA] lldp trap-interval 10
    [*DeviceA] commit

    # Configure DeviceB and DeviceC.

    For details, see the configuration of DeviceA.

  6. Verify the configuration.

    # Check whether the LLDP function is enabled, whether an LLDP management address is configured, whether the LLDP alarm function is enabled, and whether values of LLDP attributes are the same as values configured for DeviceA.

    • Display the local LLDP information of DeviceA.

      <DeviceA> display lldp local
      System information
      --------------------------------------------------------------------------
      Chassis type                       :macAddress
      Chassis ID                         :00e0-fc21-1220
      System name                        :DeviceA                        
      System description                 :Huawei Versatile Routing Platform Software
      VRP (R) software, Version 8.210 (NetEngine 8000 F V800R021C00SPC100)
      Copyright (C) 2012-2015 Huawei Technologies Co., Ltd.
      HUAWEI NetEngine 8000 F
      
      System capabilities supported      :bridge router
      System capabilities enabled        :bridge router
      LLDP Up time                       :2015/02/26 15:08:28
      
      System configuration
      --------------------------------------------------------------------------
      LLDP Status                    :enabled              (default is disabled)         
      LLDP Message Tx Interval       :60                   (default is 30s)              
      LLDP Message Tx Hold Multiplier :4                   (default is 4)                
      LLDP Refresh Delay              :2                   (default is 2s)               
      LLDP Tx Delay                   :9                   (default is 2s)               
      LLDP Notification Interval      :10                  (default is 5s)               
      LLDP Notification Enable        :enabled             (default is disabled)          
      Management Address              :ipv4: 10.10.10.1                               
      LLDP Fast Message Count         :4                   (default is 4)               
      
      Remote Table Statistics:
      --------------------------------------------------------------------------
      Remote Table Last Change Time      :0 days,0 hours, 11 minutes,49 seconds
      Remote Neighbors Added             :0
      Remote Neighbors Deleted           :0
      Remote Neighbors Dropped           :0
      Remote Neighbors Aged              :0
      Total Neighbors                    :2
      
      Port information:
      --------------------------------------------------------------------------
      Interface Gigabitethernet 0/1/1:
      LLDP Enable Status                 :txAndRx              (default is disabled)         
      Total Neighbors                    :2
      
      Port ID subtype                    :interfaceName
      Port ID                            :Gigabitethernet 0/1/1                 
      Port description                   :
      
      Port and Protocol VLAN ID(PPVID)   :unsupported 
      Port VLAN ID(PVID)                 :0 
      VLAN name of VLAN                  :--
      Protocol identity                  :STP RSTP/MSTP LACP EthOAM
      Auto-negotiation supported         :Yes
      Auto-negotiation enabled           :No
      OperMau                            :speed (10000) /duplex (Full)
      Link aggregation supported         :Yes
      Link aggregation enabled           :No
      Aggregation port ID                :0
      Maximum frame Size                 :9216
    • Display the LLDP information about neighbors connected to DeviceA.

      <DeviceA> display lldp neighbor interface gigabitethernet 0/1/1
      Gigabitethernet 0/1/1 has 2 neighbor(s):
      
      Neighbor index                     :1
      Chassis type                       :macAddress
      Chassis ID                         :00e0-fc11-1220                
      Port ID type                       :interfaceName
      Port ID                            :Gigabitethernet 0/1/1                               
      Port description                   :--
      System name                    :DeviceB                       
      System description                 :Huawei Versatile Routing Platform Software
      VRP (R) software, Version 8.210 (NetEngine 8000 F V800R021C00SPC100)
      Copyright (C) 2012-2015 Huawei Technologies Co., Ltd.
      HUAWEI NetEngine 8000 F
      
      System capabilities supported      :bridge router
      System capabilities enabled        :bridge router
      Management address type  :ipv4
      Management address   : 10.10.10.2
      Expired time                       :104 (s)
      
      Port VLAN ID(PVID)                 :0 
      Port And Protocol VLAN ID(PPVID)   :unsupported      
      VLAN name of VLAN                  :--
      Protocol identity                  :--
      Auto-negotiation supported         :Yes
      Auto-negotiation enabled           :No
      OperMau                            :speed (10000) /duplex (Full)
      Link aggregation supported         :Yes
      Link aggregation enabled           :No
      Aggregation port ID                :0
      Maximum frame Size                 :0
      Discovered time                    :2015-02-21 11:09:15
      
      Neighbor index                     :2
      Chassis type                       :macAddress
      Chassis ID                         :00e0-fc33-0013                
      Port ID type                       :interfaceName
      Port ID                            :Gigabitethernet 0/1/1                               
      Port description                   :--
      System name                    :DeviceC                       
      System description                 :Huawei Versatile Routing Platform Software
      VRP (R) software, Version 8.210 (NetEngine 8000 F V800R021C00SPC100)
      Copyright (C) 2012-2015 Huawei Technologies Co., Ltd.
      HUAWEI NetEngine 8000 F
      
      System capabilities supported      :bridge router
      System capabilities enabled        :bridge router
      Management address type  :ipv4
      Management address   : 10.10.10.3
      Expired time                       :104 (s)
      
      Port VLAN ID(PVID)                 :0 
      Port And Protocol VLAN ID(PPVID)   :unsupported      
      VLAN name of VLAN                  :--
      Protocol identity                  :--
      Auto-negotiation supported         :Yes
      Auto-negotiation enabled           :No
      OperMau                            :speed (10000) /duplex (Full)
      Link aggregation supported         :Yes
      Link aggregation enabled           :No
      Aggregation port ID                :0
      Maximum frame Size                 :0
      Discovered time                    :2015-02-21 11:09:15

    # Check whether the LLDP function is enabled and whether LLDP management addresses are configured for DeviceB and DeviceC.

    For details, see the procedures for DeviceA.

Configuration Files

  • DeviceA configuration file

    #
     sysname DeviceA
    #
    lldp enable
    lldp message-transmission interval 60
    lldp message-transmission delay 9
    lldp restart-delay 3
    lldp fast-count 3
    #
    interface GigabitEthernet0/1/1
     ip address 10.10.10.1 255.255.255.0
    #
     lldp management-address  10.10.10.1
    #
    return
    
  • DeviceB configuration file

    #
     sysname DeviceB
    #
    lldp enable
    lldp message-transmission interval 60
    lldp message-transmission delay 9
    lldp restart-delay 3
    lldp fast-count 3
    #
    interface GigabitEthernet0/1/1
     ip address 10.10.10.2 255.255.255.0
    #
     lldp management-address  10.10.10.2
    #
    return
    
  • Configuration file of DeviceC

    #
     sysname DeviceC
    #
    lldp enable
    lldp message-transmission interval 60
    lldp message-transmission delay 9
    lldp restart-delay 3
    lldp fast-count 3
    #
    interface GigabitEthernet0/1/1
     ip address 10.10.10.3 255.255.255.0
    #
     lldp management-address  10.10.10.3
    #
    return
    
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.