The Link Layer Discovery Protocol (LLDP) is an layer 2 discovery protocol defined in the IEEE 802.1ab. How does it work? The LLDP protocol collects information about local interfaces, sends this information to neighbours, and receives information from the neighbours as well. In short, when the LLDP protocol runs on devices, the NMS can obtain the Layer 2 information about all the devices it connects and the detailed network topology. It does it by searching the layer 2 information in Management Information Base (MIB). NMS uses LLDP management address to identify the device. Trap message is triggered in case when local management address is changed, LLDP is enabled or disabled globally and there are changes on neighbouring devices.
Lets try to configure LLDP based on the following topology:
First of all configure SNMP trap for LLDP:
[Switch]snmp-agent trap enable feature-name lldptrap [Quidway]dis snmp-agent tr feature-name lldptrap all ------------------------------------------------------------------------------ Feature name: LLDPTRAP Trap number : 4 ------------------------------------------------------------------------------ Trap name Default switch status Current switch status lldpRemTablesChange on on hwLldpEnabled on on hwLldpDisabled on on hwLldpLocManIPAddrChange on on