top of page
400PngdpiLogoCropped.png

Redhat - LLDP

# brief


I am installing 2 x new servers, a couple of the ports are connecting to a HP switch and I would like to Link Layer Discovery Protocol information from the server to show on the HP switch.


# method


Install lldp package:

yum -y install lldpad

enable and start the service

systemctl enable lldpad.service
systemctl start lldpad.service

Then enable lldpad on interfaces using this script:

for i in `ls /sys/class/net/ | grep 'eth\|ens\|eno'
do echo "enabling lldp for interface: $i
lldptool set-lldp -i $i adminStatus=rxt
lldptool -T -i $i -V sysName enableTx=y
lldptool -T -i $i -V portDesc enableTx=ye
lldptool -T -i $i -V sysDesc enableTx=y
lldptool -T -i $i -V sysCap enableTx=y
lldptool -T -i $i -V mngAddr enableTx=y
done

# conclusion


LLDP is now enabled and looking LLDP neighbours on the HP switch shows the remote information.

 
 
 

留言


bottom of page