OpenWrt Forum Archive

Topic: How to configure DHCP Relay?

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

In my network config i use 8 vlans with each an IP address of a different subnet assigned to the corresponding network bridge.
I want to use a Windows DHCP server which resides on my main LAN subnet (vlan 1) to assign IP addresses for all subnets in my 8 vlans, using different scopes off course.
I don't want to use the DHCP server of OpenWrt to assign IP adresses so i want to use a DHCP Relay in OpenWrt to forward DHCP requests to my main Windows DHCP server.

In the software section there is a package DHCP-Relay (ISC's DHCP relay) which i can install but i don't know to configure it and i can't find anything related in this forum.
Does anyone know how to configure a DHCP Relay in OpenWrt?

I have a Netgear WNDR3700v1 and i use the newest Arokh version firmware of OpenWrt.

Thanks a lot,
Eric

Hey eric111,

I know it has been a while since you posted, but I'm sure that the answer can be helpful to others to.

The package you must install is the "dhcrelay". The man page is here.

I will give my configuration as an example.

I have an client (Ubuntu), a AP (dhcp relay agent) and a dchp server.

Client(eht0)-----------(eth1)AP(eth0)-----------(eth0)Server

The server has the IP 192.168.2.102 and the AP 192.168.2.101 on the same subnet. The client and the AP do not have IP on the subnet connecting they.

So, the command is very simple.

dhcrelay -i eth1 -a 192.168.2.102

This will make the AP to listen his eth1 interface for a DHCP request and forward it to the server (192.168.2.102). Also note the option "-a". I put it there because I needed the dhcp option 82 to be appended in the request.

Hope it helps.

Best regards

The discussion might have continued from here.