The LLDP protocol is a Link Layer Discovery Protocol used by network devices to identify their neighbors and their capabilities.
If you want to integrate LLDP protocol in your Linux/Embedded system, there are mainly two open-source codes. The first is lldpd and the other is openlldp. When I needed to integrate the LLDP in my network device, I studied both open-source codes. I am writing this article hoping that it will be useful for others who also want to use LLDP open-source code in their systems or network devices.
Below are the key points which should be considered when selecting the LLDP open-source code.
License is an important point to consider when you want to integrate an open-source code in your application. The lldpd is published under ISC License, whereas the openlldp is published under GPL-2.0 License. The difference between two licenses is that the ISC License is more permissive than the GPL-2.0 License.
If you use GPL-2.0 licensed open-source code in your application, you need to publish the changes back to the community. In case of ISC License, it is not required to publish your changes back to community. Please note that the scope of the article does not cover the full licensing requirements. Please understand the license before using it in your project.
When picking up open-source code, we should also make sure that the development is active for that code. The development and support in lldpd are more active than the openlldp. When writing this article, there are a total of 8 tags in openlldp and 54 tags in lldpd. This indicates how quickly bugs are fixed and new version is released in lldpd.
There are other protocols like LLDP to discover the network devices, for example EDP, CDP. When selecting the LLDP open-source code, one should also make sure that it supports other protocols as well. This will make sure that the network devices with other protocols are also discovered. Though I have not verified the protocols listed in the documentations, from the document I can say that the lldpd supports EDP, CDP, FDP, SONMP and the openlldp supports EDP, CDP, EVB, MED, DCBX, VDP.
In most of the cases the LLDP would run on standard Ethernet Interface but in some specific cases it may require executing LLDP on non-Ethernet interfaces, like Serial or I2C. In this case, it would be very helpful if the open-source code supports other interfaces. Though both open-source code does not support custom interfaces, the lldpd at least have documentation on how to add the custom interfaces. Adding custom interfaces on openlldp may require more time to understand and implement than lldpd.
This is one of the most important features when selecting the LLDP open-source code. Multiple neighbour support is needed if you are supposed to capture more than one LLDP enabled neighbour (network devices) on the same interfaces. As per my understanding, this is very basic feature which should be supported in all LLDP code. But I was surprised to know that this feature is not available in openlldp. Multiple neighbour support is available in lldpd.
Daemon configuration tool helps to configure the LLDP parameters, get status, enable/disable interfaces. Both lldpd and openlldp has their configuration tools. The lldpd has lldpcli/lldpctl and the openlldp has lldptool for configuration.
Both lldpd and openlldp supports display of interface and neighbour statistics through there configuration tools. The statistics includes Total Frame Outs, Total Error Frame Outs, Total Age Out Frames, Total Discarded Frames, Total Frame In, Total Frame In Errors, Total Discarded Error Frames, Total TLVs in Errors, Total TLV’s Accepted etc.
Both the lldpd and openlldp supports reception and transmission of custom TLV’s. The custom TLV’s can be set or get using their configuration tools.
Both lldpd and openlldp supports SNMP agent.
Based on above points the below table is populated for comparison purpose. One can decide whether lldpd or openlldp should be used in their system or network devices.
|Supported Protocols apart from LLDP
|EDP, CDP, FDP, SONMP
|EDP, CDP, EVB, MED, DCBX, VDP
|Custom Interface Support
|Multiple neighbour support
|Daemon configuration tool
As per my opinion it is better to choose the lldpd open-source code over the openlldp considering the license, features and community support. The licensing of lldpd is more permissive than the open-lldp. There are more features in lldpd compared to open-lldp. The community support for lldpd is more active than the open-lldp. So unless you have direction from your client to use specific open source lldp package, go for lldpd. eInfochips has in-depth expertise in the areas of firmware design for embedded systems development. We offer end-to-end support for firmware development starting from system requirements to testing for quality and environment.
To know more about our services, please contact us today.