-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME
63 lines (46 loc) · 2.33 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
dhcprelya is a lightweight DHCP relay agent written for Yandex company that
has high loaded routers with tens interfaces and thousands hosts behind them.
It's fast, independed from any side libraries, and it does not turn on
a promisc mode for listening interfaces. Plugins supported. With plugins
you can implement any functionality. A command line options is compatible
with ISC dhcrelay but extended.
Some ideas was taken from Edwin's dhcprelay (net/dhcprelay in ports collection.
which unfortunately has some shortages) and dhcpdump (net/dhcpdump).
It's distributed under BSD license.
HOW TO RUN
==========
There are two syntaxes. The first one is a ISC dhcrelay compatible but you
can't use plugins and many options this way:
dhcprelya [-d] [-p<pidfile>] -A <packet_size> -c <hops_count>
-i<if1>... -i<ifN> <server1>... <serverN>
-i - an interfaces list that should be listened.
server - a servers list where request will be forward to.
-A - set maximum packet size. Default: 1400. It's more then enough.
-c - When hops counter in a DHCP packet more then this value,
the packet is dropped. It prevets loops. Defaul: 10.
A second one allows to use a configuration file:
dhcprelya [-d] [-p<pidfile>] -f <config.file>
Common options are:
-d - do not demonize and output debugging info onto terminal.
-p - use not default pid file. You can run more than one copy of
dhcprelya with different pid files.
See dhcprelya.conf-example for format.
If an interface does not exist on this host, it'll be ignored. It's useful
for only one config file for all routers with logical interfaces (vlanNN etc.).
HOW TO MONITOR PROBLEMS
=======================
Add lines bellow in your dhcprelya.conf file if you have. Or create a simplest
one with a [servers] section.
[log-plugin]
detailed=yes
Run dhcprelya with -d and -f options:
# dhcprelya -d -f dhcprelya.conf
You will see all decoded incoming and outgoing packages. It means you will see
duplicates - read request from a client (a first log record) and send it
to server (second log record with the same data). Often you want to see only
one log record. Add line print_only_incoming=yes in [log-plugin] section
to achive this.
Any questions, bug reports and feature requests are welcome.
Watch for the porject on GitHub: https://github.com/sem-hub/dhcprelya
Report bugs and problems there.
Sergey Matveychuk <sem@semmy.ru>