Example for Configuring LLDP on the Network with link aggregation configured
Networking Requirements
As shown in Figure 5-3, SwitchA and SwitchB are connected through an Eth-Trunk. Routes between the NMS and Switches are reachable, and SNMP is configured.
A network administrator wants to obtain Layer 2 information about SwitchA and SwitchB to know the detailed network topology and configuration conflicts.
Configuration Roadmap
- Add physical interfaces on SwitchA and SwitchB to the Eth-Trunk.
- Enable global LLDP on SwitchA and SwitchB.
- Configure management IP addresses for SwitchA and SwitchB.
Procedure
- Add physical interfaces on SwitchA and SwitchB to the Eth-Trunk.
# Configure SwitchA.
<Quidway> system-view [Quidway] sysname SwitchA [SwitchA] vlan batch 100 [SwitchA] interface eth-trunk 1 [SwitchA-Eth-Trunk1] trunkport ethernet 0/0/1 [SwitchA-Eth-Trunk1] trunkport ethernet 0/0/2 [SwitchA-Eth-Trunk1] trunkport ethernet 0/0/3 [SwitchA-Eth-Trunk1] port link-type trunk [SwitchA-Eth-Trunk1] port trunk allow-pass vlan 100 [SwitchA-Eth-Trunk1] quit
# Configure SwitchB.
<Quidway> system-view [Quidway] sysname SwitchB [SwitchB] vlan batch 100 [SwitchB] interface eth-trunk 1 [SwitchB-Eth-Trunk1] trunkport ethernet 0/0/1 [SwitchB-Eth-Trunk1] trunkport ethernet 0/0/2 [SwitchB-Eth-Trunk1] trunkport ethernet 0/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
- 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 the SwitchA configuration.
# Check whether the physical interfaces are 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 Ethernet0/0/1 Up 1 Ethernet0/0/2 Up 1 Ethernet0/0/3 Up 1
# Check neighbor information of SwitchA.
[SwitchA] display lldp neighbor brief Local Intf Neighbor Dev Neighbor Intf Exptime Eth0/0/1 SwitchB Eth0/0/1 115 Eth0/0/2 SwitchB Eth0/0/2 115 Eth0/0/3 SwitchB Eth0/0/3 115
Check the SwitchB configuration.
Refer to the steps for checking SwitchA.
Configuration Files
Configuration file of SwitchA
# sysname SwitchA # vlan batch 100 # lldp enable # lldp management-address 10.10.10.1 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 100 # interface Ethernet0/0/1 eth-trunk 1 # interface Ethernet0/0/2 eth-trunk 1 # interface Ethernet0/0/3 eth-trunk 1 # interface LoopBack1 ip address 10.10.10.1 255.255.255.255 # return
Configuration file of SwitchB
# sysname SwitchB # vlan batch 100 # lldp enable # lldp management-address 10.10.10.2 # interface Eth-Trunk1 port link-type trunk port trunk allow-pass vlan 100 # interface Ethernet0/0/1 eth-trunk 1 # interface Ethernet0/0/2 eth-trunk 1 # interface Ethernet0/0/3 eth-trunk 1 # interface LoopBack1 ip address 10.10.10.2 255.255.255.255 # return