< Home

Example for Configuring LLDP on a Device that Has a Single Neighbor

Networking Requirements

As shown in Figure 1, SwitchA and SwitchB are directly connected; the NMS has reachable routes to SwitchA and SwitchB; SNMP is configured on devices and NMS.

A network administrator wants to obtain communication information between SwitchA and SwitchB and the device function change traps to know details about network topology and configuration conflicts. The LLDP function can meet the network administrator's requirement.

Figure 1 Single-neighbor networking

Configuration Roadmap

The configuration roadmap is as follows:
  1. Enable global LLDP on SwitchA and SwitchB.
  2. Enable the LLDP trap function on SwitchA and SwitchB so that trap messages can be sent to the NMS in a timely manner.

Procedure

  1. Enable global LLDP on SwitchA and SwitchB.

    # Configure SwitchA.
    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] lldp enable
    # Configure SwitchB.
    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] lldp enable

  2. Enable the LLDP trap function on SwitchA and SwitchB.

    # Configure SwitchA.
    [SwitchA] snmp-agent trap enable feature-name lldptrap
    # Configure SwitchB.
    [SwitchB] snmp-agent trap enable feature-name lldptrap

  3. Verify the configurations.

    • Check neighbor information for SwitchA.

      [SwitchA] display lldp neighbor brief
      Local Intf   Neighbor Dev             Neighbor Intf             Exptime(s)         
      GE0/0/1      SwitchB                  GE0/0/1                   101    
    • Check neighbor information for SwitchB.

      [SwitchB] display lldp neighbor brief
      Local Intf   Neighbor Dev             Neighbor Intf             Exptime(s)         
      GE0/0/1      SwitchA                  GE0/0/1                   101    

Configuration Files

  • SwitchA configuration file

    #
    sysname SwitchA
    #
    lldp enable
    #
    snmp-agent
    snmp-agent local-engineid 800007DB03020000000212
    snmp-agent sys-info version v3 
    snmp-agent trap enable feature-name LLDPTRAP
    #
    return
    
  • SwitchB configuration file

    #
    sysname SwitchB
    #
    lldp enable
    #
    snmp-agent
    snmp-agent local-engineid 800007DB03020000000211
    snmp-agent sys-info version v3 
    snmp-agent trap enable feature-name LLDPTRAP
    #
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >