目次
Debian 9.1にてlldpdを使用する方法。
# apt-get install lldpd
# systemctl enable lldpd # systemctl status lldpd
● lldpd.service - LLDP daemon
Loaded: loaded (/lib/systemd/system/lldpd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-09-07 00:08:10 JST; 10min ago
Docs: man:lldpd(8)
Process: 431 ExecStartPre=/bin/mkdir -p /var/run/lldpd (code=exited, status=0/SUCCESS)
Main PID: 445 (lldpd)
CGroup: /system.slice/lldpd.service
├─445 lldpd: monitor.
└─458 lldpd: connected to MGT-SW01.
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[445]: 2018-09-07T00:08:10 [INFO/main] protocol FDP disabled
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[445]: 2018-09-07T00:08:10 [INFO/event] libevent 2.0.21-stable initialized with epoll
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[458]: protocol CDPv1 disabled
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[458]: protocol CDPv2 disabled
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[458]: protocol SONMP disabled
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[458]: protocol EDP disabled
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[458]: protocol FDP disabled
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[458]: libevent 2.0.21-stable initialized with epoll method
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpcli[457]: lldpd should resume operations
9月 07 00:08:10 cs-pi.localnet.asabiya.net lldpd[445]: 2018-09-07T00:08:10 [INFO/lldpctl] lldpd should resume operations# systemctl start lldpd
lldpdは特に設定は不要です。
# lldpcli show statistics ------------------------------------------------------------------------------- LLDP statistics: ------------------------------------------------------------------------------- Interface: eth0 Transmitted: 34 Received: 74 Discarded: 0 Unrecognized: 0 Ageout: 0 Inserted: 1 Deleted: 0 -------------------------------------------------------------------------------
# lldpcli show neighbors
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: eth0, via: LLDP, RID: 1, Time: 0 day, 00:14:47
Chassis:
ChassisID: mac cc:e1:d5:09:51:f1
SysName: SW01
SysDescr: BUFFALO BS-GS2016P
TTL: 120
MgmtIP: 192.168.0.252
Capability: Bridge, on
Port:
PortID: ifname Port 7
PortDescr: Gigabit Ethernet Interface 7
-------------------------------------------------------------------------------