LLDP provides an alternative to proprietary protocol from Cisco CDP with the big advantage to be standardized on a large number of devices. Like CDP, LLDP allows network equipment to communicate with each other by indicating, as example, their position on a switch or IP address. The use and functioning of LLDP is close to that of CDP, I don’t want to go into detail. Information is available on this previous post.
In summary you can recover information to identify the location of a computer station on a switch without having to follow the wiring and even use this information in tools like Absolute Manage.
Compile openlldp for Mac OS X
As often, there are several tools to integrate the LLDP. The solution recommended in this post is to compile OpenLLDP with Mac OS X and use the application to retrieve information about the network location.
Before you begin this step, it is necessary to install Xcode from the Mac App Store and the “Command Line Tools”. These are in the Xcode preferences in the “Downloads”.
– Download the last version of openlldp from the website of the project and uncompress the files
– Go with the Terminal to the openlldp folder where are the sources of the application
– Prepare the compilation with the configuration command
– Start the compilation with the command “make”
– It is possible (but not required) to automatically install openlldp files
sudo make install
The OpenLDAP project is composed to two distinct applications :
lldp is a daemon to start at boot who will capture LLDP frames arriving on the client workstation.
lldpneighbors is the tool to find the network equipment that is connected to the client.
Since the software is in Alpha version, it’s best to create a script that will handle lldp launch, display the result with lldpneighbors and then exit the process lldp. The precautionary principle.
It should not forget that the frames are sent every 30 seconds by default, so it’s necessary to leave lldp launched long enough to capture packets. If your devices are configured to send lldp network information with more time, it’s needed to adapt your scripts.