Example for Configuring LLDP on a Device that Has Multiple Neighbors
Networking Requirements
As shown in Figure 3-12, SwitchA, SwitchB, SwitchC are interconnected through an unknown network; the NMS has reachable routes to SwitchA, SwitchB, SwitchC; SNMP is configured on devices and NMS.
A network administrator wants to obtain Layer 2 information about SwitchA, SwitchB, and SwitchC to know details about network topology and configuration conflicts. The LLDP function can meet the network administrator's requirement.
Configuration Roadmap
- Enable global LLDP on SwitchA, SwitchB, and SwitchC.
- Configure the interim unknown network to support LLDP transparent transmission. As shown in Figure 3-12, LLDP transparent transmission needs to be configured on SwitchD.
Procedure
- Enable global LLDP on SwitchA, SwitchB,
and SwitchC.
# Configure SwitchA.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] lldp enable
# Configure SwitchB.
<HUAWEI> system-view [HUAWEI] sysname SwitchB [SwitchB] lldp enable
# Configure SwitchC.
<HUAWEI> system-view [HUAWEI] sysname SwitchC [SwitchC] lldp enable
- Configure LLDP transparent transmission on SwitchD.
Enable group MAC function for the transparent transmission of Layer 2 protocol packets globally.
<HUAWEI> system-view [HUAWEI] sysname SwitchD [SwitchD] l2protocol-tunnel lldp group-mac default-group-mac
Enable LLDP transparent transmission on interfaces.
Run the l2protocol-tunnel lldp enable command on all the interfaces requiring this function, that is, the interfaces connecting to SwitchA, SwitchB, and SwitchC. Ensure that LLDP is disabled on these interfaces.
[SwitchD] interface gigabitethernet 1/0/1 [SwitchD-GigabitEthernet1/0/1] l2protocol-tunnel lldp enable [SwitchD-GigabitEthernet1/0/1] quit [SwitchD] interface gigabitethernet 1/0/2 [SwitchD-GigabitEthernet1/0/2] l2protocol-tunnel lldp enable [SwitchD-GigabitEthernet1/0/2] quit [SwitchD] interface gigabitethernet 1/0/3 [SwitchD-GigabitEthernet1/0/3] l2protocol-tunnel lldp enable [SwitchD-GigabitEthernet1/0/3] quit [SwitchD] quit
- Verify the configurations.
Check SwitchA.
# Check the neighbor information of SwitchA, and you can see two neighbors connected to the outbound interface of SwitchA.[SwitchA] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime(s) GE1/0/1 SwitchB GE1/0/1 20 GE1/0/1 SwitchC GE1/0/1 2
Check SwitchB.
Refer to the steps for checking SwitchA.
Check SwitchC.
Refer to the steps for checking SwitchA.
Configuration Files
SwitchA configuration file
# sysname SwitchA # lldp enable # return
SwitchB configuration file
# sysname SwitchB # lldp enable # return
SwitchC configuration file
# sysname SwitchC # lldp enable # return
SwitchD configuration file
# sysname SwitchD # l2protocol-tunnel lldp group-mac 0100-0ccd-cdd0 # interface GigabitEthernet1/0/1 l2protocol-tunnel lldp enable # interface GigabitEthernet1/0/2 l2protocol-tunnel lldp enable # interface GigabitEthernet1/0/3 l2protocol-tunnel lldp enable # return