f81d260f33ce11ecd9a320d0c04d78907aa4f8ec
[project/odhcpd.git] / README
1 odhcpd - Embedded DHCP/DHCPv6/RA Server & Relay
2
3 ** Abstract **
4
5 odhcpd is a daemon for serving and relaying IP management protocols to
6 configure clients and downstream routers. It tries to follow the RFC 6204
7 requirements for IPv6 home routers.
8
9 odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6,
10 prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed
11 (non-bridged) interfaces in case no delegated prefixes are available.
12
13
14 ** Features **
15
16 1. Router Discovery support (solicitations and advertisements) with 2 modes
17    server:      RD server for slave interfaces
18    a) automatic detection of prefixes, delegated prefix and default routes, MTU
19    b) automatic reannouncement when changes to prefixes or routes occur
20
21    relay:       RD relay between master and slave interfaces
22    a) support for rewriting announced DNS-server addresses in relay mode
23    
24 2. DHCPv6-support with 2 modes of operation
25    server: stateless, stateful and PD-server mode
26    a) stateless and stateful address assignment
27    b) prefix delegation support
28    c) dynamic reconfiguration in case prefixes change
29    d) hostname detection and hosts-file creation
30
31    relay:       mostly standards-compliant DHCPv6-relay
32    a) support for rewriting announced DNS-server addresses
33    
34 3. DHCPv4-support
35    server: stateless and stateful mode
36
37 4. Proxy for Neighbor Discovery messages (solicitations and advertisments)
38    a) support for auto-learning routes to the local routing table
39    b) support for marking interfaces "external" not proxying NDP for them
40       and only serving NDP for DAD and for traffic to the router itself
41       [Warning: you should provide additional firewall rules for security]
42
43
44 ** Compiling **
45
46 odhcpd uses cmake:
47 * To prepare a Makefile use:  "cmake ." 
48 * To build / install use: "make" / "make install" afterwards.
49 * To build DEB or RPM packages use: "make package" afterwards.
50
51
52 ** Configuration **
53
54 odhcpd uses a UCI configuration file in /etc/config/dhcp for configuration
55 and may also receive information from ubus
56
57
58 Section of type odhcpd
59
60 Option                  Type            Default                                 Description
61 legacy                  bool            0                                               Enable DHCPv4 if start but
62                                                                                                         no dhcpv4 option set
63 leasefile               string                                                          DHCP/v6 lease/hostfile
64 leasetrigger    string                                                          Lease trigger script
65
66
67 Sections of type dhcp (configure DHCP / DHCPv6 / RA / NDP service)
68
69 Option                  Type            Default                                 Description
70 interface               string          <name of UCI section>   logical OpenWrt interface
71 ifname                  string          <resolved from logical> physical network interface
72 networkid               string          same as ifname                  compat. alias for ifname
73 ignore                  bool            0                                               ignore this interface
74 master                  bool            0                                               is a master interface
75                                                                                                         for relaying
76
77 ra                              string          disabled                                Router Advert service
78                                 [disabled|server|relay|hybrid]
79 dhcpv6                  string          disabled                                DHCPv6 service
80                                 [disabled|server|relay|hybrid]
81 dhcpv4                  string          disabled                                DHCPv4 service
82                                 [disabled|server]
83 ndp                             string          disabled                                Neighbor Discovery Proxy
84                                 [disabled|relay|hybrid]
85
86 dynamicdhcp             bool            1                                               dynamically create leases
87                                                                                                         for DHCPv4 and DHCPv6
88 dns                             list            <local address>                 DNS servers to announce
89                                                                                                         accepts IPv4 and IPv6
90 domain                  list            <local search domain>   Search domains to announce
91
92 leasetime               string          12h                                             DHCPv4 address leasetime
93 start                   integer         100                                             DHCPv4 pool start
94 limit                   integer         150                                             DHCPv4 pool size
95
96 ula_compat              bool            0                                               Announce ULA in compat mode
97 ra_default              integer         0                                               Override default route
98                                 0: default, 1: ignore no public address, 2: ignore all
99 ra_management   integer         1                                               RA management mode
100                                 0: no M-Flag but A-Flag, 1: both M and A, 2: M but not A
101 ra_offlink              bool            0                                               Announce prefixes off-link
102 ra_preference   string          medium                                  Route(r) preference
103                                 [medium|high|low]
104 ndproxy_routing bool            0                                               Learn routes from NDP
105 ndproxy_slave   bool            0                                               NDProxy external slave
106 ndproxy_static  list                                                            Static NDProxy prefixes
107
108
109 Sections of type lease (static leases)
110 Option                  Type            Default                                 Description
111 ip                              string                                                          IP-Address to lease
112 mac                             string                                                          MAC-address
113 duid                    string                                                          DUID in base16
114 hostid                  string                                                          IPv6 host identifier
115 hostname                string                                                          Hostname
116