目次
Ubuntu24にてlldpdを使用する方法。
# apt install lldpd
# systemctl enable lldpd
# systemctl status lldpd
● lldpd.service - LLDP daemon
Loaded: loaded (/usr/lib/systemd/system/lldpd.service; enabled; preset: enabled)
Active: active (running) since Sat 2025-07-12 21:51:40 JST; 6min ago
Docs: man:lldpd(8)
Main PID: 2284 (lldpd)
Tasks: 2 (limit: 18707)
Memory: 2.0M (peak: 3.3M)
CPU: 19ms
CGroup: /system.slice/lldpd.service
├─2284 "lldpd: monitor. "
└─2287 "lldpd: connected to Catalyst2960L-48TS-LL.asabiya.net."
7月 12 21:51:40 proc-srv01 systemd[1]: Started lldpd.service - LLDP daemon.
7月 12 21:51:40 proc-srv01 lldpd[2287]: /etc/localtime copied to chroot
7月 12 21:51:40 proc-srv01 lldpd[2287]: protocol LLDP enabled
7月 12 21:51:40 proc-srv01 lldpd[2287]: protocol CDPv1 disabled
7月 12 21:51:40 proc-srv01 lldpd[2287]: protocol CDPv2 disabled
7月 12 21:51:40 proc-srv01 lldpd[2287]: protocol SONMP disabled
7月 12 21:51:40 proc-srv01 lldpd[2287]: protocol EDP disabled
7月 12 21:51:40 proc-srv01 lldpd[2287]: protocol FDP disabled
7月 12 21:51:40 proc-srv01 lldpd[2287]: libevent 2.1.12-stable initialized with epoll method
7月 12 21:51:40 proc-srv01 lldpcli[2285]: lldpd should resume operations# systemctl start lldpd
lldpdは特に設定は不要です。
# lldpcli show statistics ------------------------------------------------------------------------------- LLDP statistics: ------------------------------------------------------------------------------- Interface: enp2s0f0 Transmitted: 24 Received: 24 Discarded: 0 Unrecognized: 0 Ageout: 0 Inserted: 1 Deleted: 0 ------------------------------------------------------------------------------- Interface: enp2s0f1 Transmitted: 0 Received: 0 Discarded: 0 Unrecognized: 0 Ageout: 0 Inserted: 0 Deleted: 0 ------------------------------------------------------------------------------- Interface: enp2s0f2 Transmitted: 0 Received: 0 Discarded: 0 Unrecognized: 0 Ageout: 0 Inserted: 0 Deleted: 0 ------------------------------------------------------------------------------- Interface: enp2s0f3 Transmitted: 0 Received: 0 Discarded: 0 Unrecognized: 0 Ageout: 0 Inserted: 0 Deleted: 0 ------------------------------------------------------------------------------- Interface: eno1 Transmitted: 0 Received: 0 Discarded: 0 Unrecognized: 0 Ageout: 0 Inserted: 0 Deleted: 0 -------------------------------------------------------------------------------
# lldpcli show neighbors
-------------------------------------------------------------------------------
LLDP neighbors:
-------------------------------------------------------------------------------
Interface: enp2s0f0, via: LLDP, RID: 1, Time: 0 day, 00:12:04
Chassis:
ChassisID: mac 00:b8:b3:ac:b6:00
SysName: Catalyst2960L-48TS-LL.asabiya.net
SysDescr: Cisco IOS Software, C2960L Software (C2960L-UNIVERSALK9-M), Version 15.2(6)E, RELEASE SOFTWARE (fc4)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2017 by Cisco Systems, Inc.
Compiled Sat 05-Aug-17 12:46 by prod_rel_team
MgmtIP: 192.168.1.5
Capability: Bridge, on
Capability: Router, off
Port:
PortID: ifname Gi0/29
PortDescr: GigabitEthernet0/29
TTL: 120
-------------------------------------------------------------------------------