Querying Information and Maintaining Network Through LLDP
Networking Requirements
A network administrator needs to know the topology of the entire network. The LLDP protocol helps the network administrator learn Layer 2 information about network devices.
As shown in Figure 2-36, SwitchA and SwitchB are directly connected. The IP addresses have been configured for the two switches and there are reachable routes between the switches and NMS.
Configuration Roadmap
- Enable LLDP globally on SwitchA so that SwitchA can learn about link information of other devices by sending and receiving LLDP packets.
- Enable LLDP globally on SwitchB so that SwitchB can learn about link information of other devices by sending and receiving LLDP packets.
Procedure
- Enable LLDP globally on SwitchA.
<HUAWEI> system-view [~HUAWEI] sysname SwitchA [~HUAWEI] commit [~SwitchA] lldp enable [~SwitchA] commit
- Enable LLDP globally on SwitchB.
<HUAWEI> system-view [~HUAWEI] sysname SwitchB [~HUAWEI] commit [~SwitchB] lldp enable [~SwitchB] commit
Verifying the Configuration
The output information of different versions may be different; therefore, the output information on your device may be different from that provided in this example. In this example, V100R001C00 is used.
Query the configurations on SwitchA.
# Run the display lldp neighbor brief command on SwitchA to view brief neighbor information.
[~SwitchA] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime (sec) ------------------------------------------------------------------------------- 10GE1/0/1 SwitchB 10GE1/0/2 100
# Run the display lldp neighbor interface 10ge 1/0/1 command on SwitchA to view detailed neighbor information.
[~SwitchA] display lldp neighbor interface 10ge 1/0/1 10GE1/0/1 has 1 neighbor(s): Neighbor index :1 Chassis type :macAddress Chassis ID :0025-9e95-7c20 Port ID type :interfaceName Port ID :10GE1/0/2 //ID of the neighbor device interface. Port description :HUAWEI, CloudEngine Series, 10GE1/0/2 Interface //Description of the neighbor device interface. System name :SwitchB //System name of the neighbor device. System description :Huawei Versatile Routing Platform Software VRP (R) software, Version 8.50 (CE6850 V100R001C00) //System description of the neighbor device. Copyright (C) 2011-2012 Huawei Technologies Co., Ltd. HUAWEI CE6850 System capabilities supported :bridge router System capabilities enabled :bridge router Management address type :ipv4 Management address :10.10.10.2 Expired time :111s Port VLAN ID(PVID) :100 //VLAN ID of the neighbor device interface. Port and Protocol VLAN ID(PPVID) :unsupported VLAN name of VLAN 100 :VLAN100 Protocol identity :-- Auto-negotiation supported :No Auto-negotiation enabled :No OperMau :speed (0) /duplex (Unknown) Link aggregation supported :Yes Link aggregation enabled :No Aggregation port ID :0 Maximum frame Size :9216 Discovered time :2012-06-11 23:15:17 EEE support :No Transmit Tw :65535 Receive Tw :65535 Fallback Receive Tw :0 Echo Transmit Tw :0 Echo Receive Tw :0
Query the configurations on SwitchB.
# Run the display lldp neighbor brief command on SwitchB to view brief neighbor information.
[~SwitchB] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime (sec) ------------------------------------------------------------------------------- 10GE1/0/2 SwitchA 10GE1/0/1 95
# Run the display lldp neighbor interface 10ge 1/0/2 command on SwitchB to view detailed neighbor information.
[~SwitchB] display lldp neighbor interface 10ge 1/0/2 10GE1/0/2 has 1 neighbor(s): Neighbor index :1 Chassis type :macAddress Chassis ID :00c0-2017-7602 Port ID type :interfaceName Port ID :10GE1/0/1 //ID of the neighbor device interface. Port description :HUAWEI, CloudEngine Series, 10GE1/0/1 Interface //Description of the neighbor device interface. System name :SwitchA //System name of the neighbor device. System description :Huawei Versatile Routing Platform Software VRP (R) software, Version 8.50 (CE6850 V100R001C00) //System description of the neighbor device. Copyright (C) 2011-2012 Huawei Technologies Co., Ltd. HUAWEI CE6850 System capabilities supported :bridge router System capabilities enabled :bridge router Management address type :ipv4 Management address :10.10.10.1 Expired time :111s Port VLAN ID(PVID) :100 //VLAN ID of the neighbor device interface. Port and Protocol VLAN ID(PPVID) :unsupported VLAN name of VLAN 100 :VLAN100 Protocol identity :-- Auto-negotiation supported :No Auto-negotiation enabled :No OperMau :speed (0) /duplex (Unknown) Link aggregation supported :Yes Link aggregation enabled :No Aggregation port ID :0 Maximum frame Size :9216 Discovered time :2012-06-11 23:15:17 EEE support :No Transmit Tw :65535 Receive Tw :65535 Fallback Receive Tw :0 Echo Transmit Tw :0 Echo Receive Tw :0
Configuration File
Configuration file of SwitchA
# sysname SwitchA # lldp enable # return
Configuration file of SwitchB
# sysname SwitchB # lldp enable # return
Conclusions and Suggestions
You can query detailed information about the neighbors connected to the local device through LLDP. The neighbor information helps you learn about the topology of the entire network.
You need to enable LLDP on network devices first, and then the NMS obtains Layer 2 information about the network devices through LLDP and provides the topology of the entire network.