Skip to content

Instantly share code, notes, and snippets.

@derekmurawsky
Created June 5, 2024 21:21
Show Gist options
  • Save derekmurawsky/6ed15a3a5d607ca8230423c474f3393c to your computer and use it in GitHub Desktop.
Save derekmurawsky/6ed15a3a5d607ca8230423c474f3393c to your computer and use it in GitHub Desktop.
Set up LLDP on Pi running Ubuntu
#!/bin/bash
# This script installs LLDP in ubuntu systems. It should be run as root.
# It is based on the install notes from: https://enterprise-support.nvidia.com/s/article/howto-enable-lldp-on-linux-servers-for-link-discovery
TARGET_INTERFACE=eth0
apt-get -y install lldpad
lldptool set-lldp -i $TARGET_INTERFACE adminStatus=rxtx
lldptool -T -i $TARGET_INTERFACE -V sysName enableTx=yes
lldptool -T -i $TARGET_INTERFACE -V portDesc enableTx=yes
lldptool -T -i $TARGET_INTERFACE -V sysDesc enableTx=yes
lldptool -T -i $TARGET_INTERFACE -V sysCap enableTx=yes
lldptool -T -i $TARGET_INTERFACE -V mngAddr enableTx=yes
# You may need to pass the management IP manually
# lldptool -T -i eth0 -V mngAddr ipv4=192.168.24.185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment