LLDP stands for Link Layer Discovery Protocol. It’s a vendor-neutral Layer 2 protocol (defined in IEEE 802.1AB) that allows network devices (switches, routers, servers, firewalls, access points, phones, etc.) to advertise information about themselves to directly connected devices and to learn information about their neighbors.
In this short blog post we will install, enable and test LLDP on FreeBSD.
In my homelab, I have Force10 S60 L3 switch with LLDP enabled. The Dell Force10 S60 fully supports the IEEE 802.1AB Link Layer Discovery Protocol (LLDP). Below is the configuration snippet from my switch.
f10-s60#
show running-config lldp
! protocol lldp advertise management-tlv management-address system-capabilities system-description system-name no disable advertise interface-port-desc f10-s60#
I also have FreeBSD server connected to this Force10 switch. First of all, LLDP package has to be installed.
root@bhyve01:~ #
pkg install lldpd
After installation LLDP service must be enabled and started.
root@bhyve01:~ #
sysrc lldpd_enable=YES
lldpd_enable: -> YES root@bhyve01:~ #
service lldpd start
Starting lldpd. root@bhyve01:~ #
And now we can use it. Below is the LLDP info from FreeBSD side.
root@bhyve01:~ #
lldpctl
------------------------------------------------------------------------------- LLDP neighbors: ------------------------------------------------------------------------------- Interface: bge3, via: LLDP, RID: 1, Time: 0 day, 00:04:25 Chassis: ChassisID: mac 00:01:e8:96:02:03 SysName: f10-s60 SysDescr: Dell Force10 Networks Real Time Operating System Software. Dell Force10 Operating System Version: 1.0. Dell Force10 Application Software Version: 8.3.3.9. Copyright (c) 1999-2012 by Dell Inc. All Rights Reserved.Build Time: Mon Apr 22 00:00:20 PDT 2013 Capability: Repeater, on Capability: Bridge, on Capability: Router, on Port: PortID: ifname GigabitEthernet 0/28 PortDescr: BHYVE01-nic1 TTL: 120 ------------------------------------------------------------------------------- root@bhyve01:~ #
And now let's check it from the Ethernet switch side.
f10-s60#
sh lldp neighbors
Loc PortID Rem Host Name Rem Port Id Rem Chassis Id ------------------------------------------------------------------------- Gi 0/0 eero 0 f0:21:e0:9d:e3:c0 Gi 0/28 bhyve01.home.uw...90:b1:1c:12:e7:52 90:b1:1c:12:e7:53 f10-s60# f10-s60#
sh lldp neighbors interface gigabitethernet 0/28 detail
======================================================================== Local Interface Gi 0/28 has 1 neighbor Total Frames Out: 101278 Total Frames In: 43 Total Neighbor information Age outs: 1 Total Frames Discarded: 0 Total In Error Frames: 0 Total Unrecognized TLVs: 28 Total TLVs Discarded: 0 Next packet will be sent after 21 seconds The neighbors are given below: ----------------------------------------------------------------------- Remote Chassis ID Subtype: Mac address (4) Remote Chassis ID: 90:b1:1c:12:e7:53 Remote Port Subtype: Mac address (3) Remote Port ID: 90:b1:1c:12:e7:52 Local Port ID: GigabitEthernet 0/28 Locally assigned remote Neighbor Index: 2 Remote TTL: 120 Information valid for next 93 seconds Time since last information change of this neighbor: 00:14:02 Remote System Name: bhyve01.home.uw.cz Remote Management Address (IPv4): 192.168.4.124 Remote Management Address (IPv6): fe80::1 Remote System Desc: FreeBSD 14.3-RELEASE FreeBSD 14.3-RELEASE FreeBSD 14 .3-RELEASE releng/14.3-n271432-8c9ce319fef7 GENERIC amd64 Existing System Capabilities: Bridge WLAN Access Point Router Station only Enabled System Capabilities: Station only MAC PHY Configuration: Auto-neg supported: 1 Auto-neg enabled: 1 Auto-neg advertised capabilities: 1000BASE-T full duplex mode, 1000BASE-T half duplex mode, 100BASE-TX full duplex mode, 100BASE-TX half duplex mode, 10BASE-T full duplex mode, 10BASE-T half duplex mode Operational MAU type: 1000BaseTFD: Four-pair Category 5 UTP, full duplex mode --------------------------------------------------------------------------- f10-s60#
Conclusion
LLDP is great tool for system administration and operational visibility. It is worth to use it on FreeBSD when your network devices support it. Hope this helps some other folks in FreeBSD community.
No comments:
Post a Comment