Example for Configuring LLDP on a Device that Has a Single Neighbor
Networking Requirements
As shown in Figure 6-7, RouterA and RouterB are directly connected; RouterA and ME are directly connected. The NMS has reachable routes to RouterA and RouterB, and SNMP configuration has been complete.
A network administrator wants to use the NMS to obtain communication information between RouterA and ME, and between RouterA and RouterB, as well as the traps about function changes on RouterA and RouterB. According to the preceding information, network administrator can know the detailed network topology and whether configuration conflicts exist on the network.
Configuration Roadmap
- Enable global LLDP on RouterA and RouterB.
- Configure management IP addresses for RouterA and RouterB.
- Enable the LLDP trap function on RouterA and RouterB so that trap messages can be sent to the NMS in a timely manner.
Procedure
- Enable global LLDP on RouterA and RouterB.
# Configure RouterA.
<Huawei> system-view [Huawei] sysname RouterA [RouterA] lldp enable
# Configure RouterB.<Huawei> system-view [Huawei] sysname RouterB [RouterB] lldp enable
- Configure management IP addresses for RouterA and RouterB.
# Configure RouterA.
[RouterA] lldp management-address 10.10.10.1
# Configure RouterB.[RouterB] lldp management-address 10.10.10.2
- Enable the LLDP trap function on RouterA and RouterB.
# Configure RouterA.
[RouterA] snmp-agent trap enable feature-name lldptrap
# Configure RouterB.[RouterB] snmp-agent trap enable feature-name lldptrap
- Verify the configurations.
Check RouterA.
# Check the RouterA configuration.
<RouterA> display lldp local System information Chassis type :macAddress Chassis ID :00e0-11fc-1710 System name :RouterA System description :Huawei AR2220-S Huawei Versatile Routing Platform Software VRP (R) software,Version 5.130 (AR2220-S V200R009) Copyright (C) 2011-2013 Huawei Technologies Co., Ltd System capabilities supported :bridge System capabilities enabled :bridge LLDP Up time :2012/05/8 11:40:49 MED system information Device class :Network Connectivity (MED inventory information of master board) HardwareRev :AR01SRU1A VER.A FirmwareRev :NA SoftwareRev :V200R009 SerialNum :NA Manufacturer name :HUAWEI TECH CO., LTD Model name :NA Asset tracking identifier :NA System configuration LLDP Status :enabled (default is disabled) LLDP Message Tx Interval :30 (default is 30s) LLDP Message Tx Hold Multiplier :4 (default is 4) LLDP Refresh Delay :2 (default is 2s) LLDP Tx Delay :2 (default is 2s) LLDP Notification Interval :5 (default is 5s) LLDP Notification Enable :enabled (default is enabled) Management Address :IP: 10.10.10.1 MAC: 00e0-11fc-1710 Remote Table Statistics: Remote Table Last Change Time :0 days, 5 hours, 57 minutes, 32 seconds Remote Neighbors Added :15 Remote Neighbors Deleted :13 Remote Neighbors Dropped :0 Remote Neighbors Aged :0 Total Neighbors :2 Port information: Interface Ethernet2/0/0: LLDP Enable Status :enabled (default is disabled) Total Neighbors :1 Port ID subtype :interfaceName Port ID :Ethernet2/0/0 Port description :HUAWEI, AR Series,Ethernet2/0/0 Interface ---- More ----
# Check neighbor information for RouterA.
<RouterA> display lldp neighbor interface ethernet 2/0/0 Ethernet2/0/0 has 1 neighbors: Neighbor index : 1 Chassis type :macAddress Chassis ID :00e0-11fc-1710 Port ID type :interfaceName Port ID :Ethernet2/0/0 Port description :HUAWEI, AR Series,Ethernet2/0/0 Interface System name :RouterB System description :Huawei AR2220-S Huawei Versatile Routing Platform Software VRP (R) software,Version 5.130 (AR2220-S V200R009) Copyright (C) 2011-2013 Huawei Technologies Co., Ltd System capabilities supported :bridge System capabilities enabled :bridge Management address type :ipV4 Management address : 10.10.10.2 Expired time :104s ---- More ----
Check RouterB.
Refer to the steps for checking RouterA.