Example for Configuring LLDP on the Device That Has a Single Neighbor
Networking Requirements
As shown in Figure 5-1, SwitchA and SwitchB are directly connected,routes between the NMS and SwitchA, and the NMS and SwitchB are reachable; SNMP is configured.
A network administrator wants to obtain communication information between between SwitchA and SwitchB, and alarms of device function changes to know the detailed network topology and configuration conflicts.
Configuration Roadmap
- Enable global LLDP on SwitchA and SwitchB.
- Configure management IP addresses for SwitchA and SwitchB.
Procedure
- Enable global LLDP on SwitchA and SwitchB.
# Configure SwitchA.
<Quidway> system-view [Quidway] sysname SwitchA [SwitchA] lldp enable
# Configure SwitchB.<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] lldp enable
- Configure management IP addresses for SwitchA and SwitchB.
# Configure SwitchA.
[SwitchA] lldp management-address 10.10.10.1
# Configure SwitchB.[SwitchB] lldp management-address 10.10.10.2
- Verify the configurations.
Check neighbor information of SwitchA.
[SwitchA] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime GE0/0/1 SwitchB GE0/0/1 101
Check neighbor information of SwitchB.
[SwitchB] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime GE0/0/1 SwitchA GE0/0/1 101
Configuration Files
Configuration file of SwitchA
# sysname SwitchA # lldp enable # interface LoopBack1 ip address 10.10.10.1 255.255.255.255 # lldp management-address 10.10.10.1 # return
Configuration file of SwitchB
# sysname SwitchB # lldp enable # interface LoopBack1 ip address 10.10.10.2 255.255.255.255 # lldp management-address 10.10.10.2 # return