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.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] lldp enable
<HUAWEI> system-view [HUAWEI] sysname SwitchB [SwitchB] lldp enable
[SwitchA] snmp-agent trap enable feature-name lldptrap
[SwitchB] snmp-agent trap enable feature-name lldptrap
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
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