I have Ubuntu server connected to internet. On Ubuntu server is ISC-DHCP server.
Next two OpenWrt routers are connected to central ubuntu server.
I need to use central DHCP server for all LANs (DHCP Relay Agent).
my network topology: https://dl.dropboxusercontent.com/u/6943408/OpenWrt%20dhcp%20relay.png

How can I do it on OpenWrt?
I found howto in forum, but in OpenWrt 15.05 package "dhcrelay" doesn't exist.
OpenWrt 14.07 has package "isc-dhcp-relay-ipv4_4.2.4" but in "oldpackage" section : https://downloads.openwrt.org/barrier_b … -3_x86.ipk

I found "--dhcp-relay" option in dnsmasq man page:

--dhcp-relay=<local address>,<server address>[,<interface]
Configure dnsmasq to do DHCP relay. The local address is an address allocated to an interface on the host running dnsmasq. All DHCP requests arriving on that interface will we relayed to a remote DHCP server at the server address. It is possible to relay from a single local address to multiple remote servers by using multiple dhcp-relay configs with the same local address and different server addresses. A server address must be an IP literal address, not a domain name. In the case of DHCPv6, the server address may be the ALL_SERVERS multicast address, ff05::1:3. In this case the interface must be given, not be wildcard, and is used to direct the multicast to the correct interface to reach the DHCP server.
Access control for DHCP clients has the same rules as for the DHCP server, see --interface, --except-interface, etc. The optional interface name in the dhcp-relay config has a different function: it controls on which interface DHCP replies from the server will be accepted. This is intended for configurations which have three interfaces: one being relayed from, a second connecting the DHCP server, and a third untrusted network, typically the wider internet. It avoids the possibility of spoof replies arriving via this third interface.

It is allowed to have dnsmasq act as a DHCP server on one set of interfaces and relay from a disjoint set of interfaces. Note that whilst it is quite possible to write configurations which appear to act as a server and a relay on the same interface, this is not supported: the relay function will take precedence.

Both DHCPv4 and DHCPv6 relay is supported. It's not possible to relay DHCPv4 to a DHCPv6 server or vice-versa.

How can I use it? Clean /etc/config dhcp and add "--dhcp-relay" to /etc/dnsmasq.conf?

-------------------------------------------
UPDATE:
* dnsmasq ---- do not work

* isc dhcp relay - package is not present in new openwrt 15.05 and in 14.07 is on oldpackeage section. Relay agent forward client request to dhcp server (i see it in log), but not forward reply to client - https://forum.openwrt.org/viewtopic.php … 70#p229170 and https://lists.isc.org/pipermail/dhcp-us … 17829.html ---- do not work

(Last edited by tuxmartin on 8 Oct 2015, 22:04)