Example for Configuring LLDP on a Network with Link Aggregation Configured
Networking Requirements
As shown in Figure 3-13, SwitchA and SwitchB are connected through an Eth-Trunk; the NMS has reachable routes to SwitchA and SwitchB; SNMP is configured on devices and NMS.
A network administrator wants to obtain Layer 2 information about SwitchA and SwitchB to know details about network topology and configuration conflicts. The LLDP function can meet the network administrator's requirement.
Configuration Roadmap
- Add physical interfaces on SwitchA and SwitchB to the Eth-Trunk.
- Enable global LLDP on SwitchA and SwitchB.
Procedure
- Add physical interfaces on SwitchA and SwitchB to the Eth-Trunk.
# Configure SwitchA.
<HUAWEI> system-view [HUAWEI] sysname SwitchA [SwitchA] vlan batch 100 [SwitchA] interface eth-trunk 1 [SwitchA-Eth-Trunk1] trunkport gigabitethernet 1/0/1 [SwitchA-Eth-Trunk1] trunkport gigabitethernet 1/0/2 [SwitchA-Eth-Trunk1] trunkport gigabitethernet 1/0/3 [SwitchA-Eth-Trunk1] port link-type trunk [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 100 [SwitchA-Eth-Trunk1] quit
# Configure SwitchB.
<HUAWEI> system-view [HUAWEI] sysname SwitchB [SwitchB] vlan batch 100 [SwitchB] interface eth-trunk 1 [SwitchB-Eth-Trunk1] trunkport gigabitethernet 1/0/1 [SwitchB-Eth-Trunk1] trunkport gigabitethernet 1/0/2 [SwitchB-Eth-Trunk1] trunkport gigabitethernet 1/0/3 [SwitchB-Eth-Trunk1] port link-type trunk [SwitchB-Eth-Trunk1] port trunk allow-pass vlan 100 [SwitchB-Eth-Trunk1] quit
- Enable global LLDP on SwitchA and SwitchB.
# Configure SwitchA.
[SwitchA] lldp enable
# Configure SwitchB.[SwitchB] lldp enable
- Verify the configurations.
Check the SwitchA configuration.
# Check whether the physical interfaces have been added to Eth-Trunk1.
[SwitchA] display eth-trunk 1 Eth-Trunk1's state information is: WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8 Operate status: up Number Of Up Port In Trunk: 3 -------------------------------------------------------------------------------- PortName Status Weight GigabitEthernet1/0/1 Up 1 GigabitEthernet1/0/2 Up 1 GigabitEthernet1/0/3 Up 1
# Check neighbor information for SwitchA.
[SwitchA] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime(s) GE1/0/1 SwitchB GE1/0/1 115 GE1/0/2 SwitchB GE1/0/2 115 GE1/0/3 SwitchB GE1/0/3 115
Check the SwitchB configuration.
Refer to the steps for checking SwitchA.
Configuration Files
SwitchA configuration file
# sysname SwitchA # vlan batch 100 # lldp enable # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/1 eth-trunk 1 # interface GigabitEthernet1/0/2 eth-trunk 1 # interface GigabitEthernet1/0/3 eth-trunk 1 # return
SwitchB configuration file
# sysname SwitchB # vlan batch 100 # lldp enable # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 100 # interface GigabitEthernet1/0/1 eth-trunk 1 # interface GigabitEthernet1/0/2 eth-trunk 1 # interface GigabitEthernet1/0/3 eth-trunk 1 # return