cdpd - Send CDP/LLDP packets over ethernet.
cdpd [-d] [-i interface] [-h] [-t period] [-o] [-a] [-l] [-c] [-r]
The cdpd utiliy used to advertize your host over ethernet networks using CDP (Cisco Discovery Protocol) and LLDP (Link Layer Discovery Protocol, 802.1ab) protocols.
The options are as follows:
-d increase debugging level and do not daemonise, as debug goes on stdout -i interface set interface, over which packets will be sent -h get help message -t period set the period between packets sent (60 sec by default) -o sent only one announce per interface (well, two in case of both CDP and LLDP enabled) and then exit -a try to add all iinterfaces with ip addresses configured to those added with -i option -c do NOT send CDP packets (enabled by default). -l do NOT send LLDP packets (enabled by default). -r announce host as Router-capable device (Station-capable and -enabled by default). Extra flag needed because 802.1AB specifies that The station only capability is intended for devices that implement only an end station capability. Bit 7 should not be set in conjunction with any other bits., and, at least Cisco IOS 12.2(46)SE ignores capabilities consisting of Router and Station bits set together.
When everything is ok, and cdpd program is started with (default) daemon mode, it justs daemonises with return code 0. In case of errors they are printed to stderr and program exists with non-zero status. Most errors caused by the fact that the cdpd needs access to /dev/bpf*, so it must be started by root, and Berkeley Packet Filter must be enabled in kernel (by adding pseudo-device bpf into kernel configuration for old FreeBSD, for example).
Some people proposed option of collecting information from an ethernet interfaces to have some table like cisco show cdp nei command output. But, as you can retrieve this information from modern tcpdump program (with -nvi <interface> -s 1500 ether dst 01:00:0c:cc:cc:cc flags) and as this feature leads to expensive CPU usage, this feature will not be implemented in cdpd.
The same trick can be used to detect LLDP neighbors, the only difference is that destination MAC address is ether dst 01:80:c2:00:00:0e
When running on Solaris, self mac-address is not determined correctly, so it announced via LLDP as 00:00:00:00:00:00. This can be fixed.
http://www.cisco.com/ for information about Cisco Discovery Protocol.
http://www.ieee802.org/1/pages/802.1ab.html http://en.wikipedia.org/wiki/Link_Layer_Discovery_Protocol for information on LLDP/802.1AB.
http://www.tcpdump.org/ - tcpdump home page.
Alexandre Snarskii, <email@example.com>
|December 1, 2008||cdpd (8)|