This section provides an example to describe how to configure basic LLDP functions to help the NMS obtain information about network topology.
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.
Interface 1 in this example represents GE 0/1/1.
The configuration roadmap is as follows:
To complete the configuration, you need the following data:
# 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
# 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
# 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.
# 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.
# 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.
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