23
[SwitchA] lldp global enable
# Enable LLDP on Twenty-FiveGigE 1/0/1. By default, LLDP is enabled on ports.
[SwitchA] interface twenty-fivegige 1/0/1
[SwitchA-Twenty-FiveGigE1/0/1] lldp enable
# Set the LLDP operating mode to Rx on Twenty-FiveGigE 1/0/1.
[SwitchA-Twenty-FiveGigE1/0/1] lldp admin-status rx
[SwitchA-Twenty-FiveGigE1/0/1] quit
# Enable LLDP on Twenty-FiveGigE 1/0/2. By default, LLDP is enabled on ports.
[SwitchA] interface gigabitethernet1/2
[SwitchA-Twenty-FiveGigE1/0/2] lldp enable
# Set the LLDP operating mode to Rx on Twenty-FiveGigE 1/0/2.
[SwitchA-Twenty-FiveGigE1/0/2] lldp admin-status rx
[SwitchA-Twenty-FiveGigE1/0/2] quit
2. Configure Switch B:
# Enable LLDP globally.
<SwitchB> system-view
[SwitchB] lldp global enable
# Enable LLDP on Twenty-FiveGigE 1/0/1. By default, LLDP is enabled on ports.
[SwitchB] interface twenty-fivegige 1/0/1
[SwitchB-Twenty-FiveGigE1/0/1] lldp enable
# Set the LLDP operating mode to Tx on Twenty-FiveGigE 1/0/1.
[SwitchB-Twenty-FiveGigE1/0/1] lldp admin-status tx
[SwitchB-Twenty-FiveGigE1/0/1] quit
Verifying the configuration
# Verify the following items:
• Twenty-FiveGigE 1/0/1 of Switch A connects to a MED device.
• Twenty-FiveGigE 1/0/2 of Switch A connects to a non-MED device.
• Both ports operate in Rx mode, and they can receive LLDP frames but cannot send LLDP
frames.
[SwitchA] display lldp status
Global status of LLDP: Enable
Bridge mode of LLDP: customer-bridge
The current number of LLDP neighbors: 2
The current number of CDP neighbors: 0
LLDP neighbor information last changed time: 0 days, 0 hours, 4 minutes, 40 seconds
Transmit interval : 30s
Fast transmit interval : 1s
Transmit credit max : 5
Hold multiplier : 4
Reinit delay : 2s
Trap interval : 30s
Fast start times : 4
LLDP status information of port 1 [Twenty-FiveGigE1/0/1]:
LLDP agent nearest-bridge:
Port status of LLDP : Enable
Admin status : Rx_Only