As shown in Figure 1, 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.
# 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
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 0/0/1 [SwitchD-GigabitEthernet0/0/1] l2protocol-tunnel lldp enable [SwitchD-GigabitEthernet0/0/1] quit [SwitchD] interface gigabitethernet 0/0/2 [SwitchD-GigabitEthernet0/0/2] l2protocol-tunnel lldp enable [SwitchD-GigabitEthernet0/0/2] quit [SwitchD] interface gigabitethernet 0/0/3 [SwitchD-GigabitEthernet0/0/3] l2protocol-tunnel lldp enable [SwitchD-GigabitEthernet0/0/3] quit [SwitchD] quit
Check SwitchA.
[SwitchA] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime(s) GE0/0/1 SwitchB GE0/0/1 20 GE0/0/1 SwitchC GE0/0/1 2
Check SwitchB.
Refer to the steps for checking SwitchA.
Check SwitchC.
Refer to the steps for checking SwitchA.
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 GigabitEthernet0/0/1 l2protocol-tunnel lldp enable # interface GigabitEthernet0/0/2 l2protocol-tunnel lldp enable # interface GigabitEthernet0/0/3 l2protocol-tunnel lldp enable # return