]> git.ipfire.org Git - thirdparty/lldpd.git/blame - README.md
Update ISC license wording.
[thirdparty/lldpd.git] / README.md
CommitLineData
43c02e7b 1lldpd: implementation of IEEE 802.1ab (LLDP)
00402c76 2============================================
43c02e7b 3
00402c76 4 https://github.com/vincentbernat/lldpd/wiki
f0c42642 5
43c02e7b
VB
6LLDP (Link Layer Discovery Protocol) is an industry standard protocol
7designed to supplant proprietary Link-Layer protocols such as
8Extreme's EDP (Extreme Discovery Protocol) and CDP (Cisco Discovery
9Protocol). The goal of LLDP is to provide an inter-vendor compatible
10mechanism to deliver Link-Layer notifications to adjacent network
11devices.
12
13lldpd implements both reception and sending. It also implements an
14SNMP subagent for net-snmp to get local and remote LLDP
15information. The LLDP MIB is partially implemented but the most useful
b193e97e 16tables are here. lldpd also partially implements LLDP-MED.
43c02e7b
VB
17
18lldpd supports bridge, vlan and bonding. bonding need to be done on
19real physical devices, not on bridges, vlans, etc. However, vlans can
20be mapped on the bonding device. You can bridge vlan but not add vlans
21on bridges. More complex setups may give false results.
22
52ac3f37 23To compile lldpd, use the following:
00402c76
VB
24
25 ./configure
26 make
27 sudo make install
52ac3f37
VB
28
29If it complains about a missing agent/struct.h, your installation of
45444847
VB
30Net-SNMP is incomplete. The easiest way to fix this is to provide an
31empty struct.h:
00402c76
VB
32
33 touch src/struct.h
52ac3f37 34
35097709
VB
35If you are missing some headers or if some headers are incorrect
36(if_vlan.h and if_bonding.h on RHEL 2.1 for example), you can copy
37some more current version (for example from Debian Lenny or from
38Fedora) in some directory like "extra-headers/":
00402c76
VB
39
40 - `./extra-headers/linux/if_vlan.h`
41 - `./extra-headers/linux/if_bonding.h`
42
35097709 43Then, configure like this:
00402c76
VB
44
45 ./configure CFLAGS="-Wall -I${PWD}/extra-headers"
46
35097709
VB
47This has been tested with RHEL 2.1.
48
13dce469
VB
49lldpd uses privilege separation to increase its security. Two
50processes, one running as root and doing minimal stuff and the other
51running as an unprivileged user into a chroot doing most of the stuff,
00402c76
VB
52are cooperating. You need to create a user called `_lldpd` in a group
53`_lldpd` (this can be change with `./configure`). You also need to
54create an empty directory `/var/run/lldpd` (it needs to be owned by
55root, not `_lldpd`!). If you get fuzzy timestamps from syslog, copy
56`/etc/locatime` into the chroot.
13dce469 57
00402c76 58`lldpctl` allows to query information collected through the command
33aced7a 59line. If you don't want to run it as root, just install it setuid or
00402c76 60setgid `_lldpd`.
43c02e7b 61
031118c4
VB
62lldpd also implements CDP (Cisco Discovery Protocol), FDP (Foundry
63Discovery Protocol), SONMP (Nortel Discovery Protocol) and EDP
64(Extreme Discovery Protocol). However, recent versions of IOS should
65support LLDP and most Extreme stuff support LLDP. When a EDP, CDP or
66SONMP frame is received on a given interface, lldpd starts sending
67EDP, CDP, FDP or SONMP frame on this interface. Informations collected
68through EDP/CDP/FDP/SONMP are integrated with other informations and
00402c76 69can be queried with `lldpctl` or through SNMP.
43c02e7b
VB
70
71For bonding, you need 2.6.24 (in previous version, PACKET_ORIGDEV
72affected only non multicast packets). See:
00402c76
VB
73
74 * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=80feaacb8a6400a9540a961b6743c69a5896b937
75 * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=8032b46489e50ef8f3992159abd0349b5b8e476c
43c02e7b 76
c8851c73
VB
77Otherwise, a packet received on a bond will be affected to all
78interfaces of the bond.
43c02e7b
VB
79
80On 2.6.27, we are able to receive packets on real interface for bonded
81devices. This allows to get neighbor information on active/backup
82bonds. Without the 2.6.27, lldpd won't receive any information on
83inactive slaves. Here are the patchs (thanks to Joe Eykholt):
00402c76
VB
84
85 * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0d7a3681232f545c6a59f77e60f7667673ef0e93
86 * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc9bd5cebc0825e0fabc0186ab85806a0891104f
87 * http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f982307f22db96201e41540295f24e8dcc10c78f
43c02e7b 88
49697208
VB
89Some devices (notably Cisco IOS) send frames on the native VLAN while
90they should send them untagged. If your network card does not support
91accelerated VLAN, you will receive those frames as well. However, if
92your network card handles VLAN encapsulation/decapsulation, you need a
93recent kernel to be able to receive those frames without listening on
94all available VLAN. Starting from Linux 2.6.27, lldpd is able to
95capture VLAN frames when VLAN acceleration is supported by the network
96card. Here is the patch:
97 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc1d0411b804ad190cdadabac48a10067f17b9e6
98
43c02e7b 99More information:
00402c76
VB
100 * http://en.wikipedia.org/wiki/LLDP
101 * http://standards.ieee.org/getieee802/download/802.1AB-2005.pdf
102 * http://wiki.wireshark.org/LinkLayerDiscoveryProtocol
43c02e7b
VB
103
104lldpd is distributed under the following license:
00402c76 105
51434125 106 > Permission to use, copy, modify, and/or distribute this software for any
00402c76
VB
107 > purpose with or without fee is hereby granted, provided that the above
108 > copyright notice and this permission notice appear in all copies.
109 >
110 > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
111 > WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
112 > MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
113 > ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
114 > WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
115 > ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
116 > OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.