DHCP relay with two interfaces

Bjorn Andersson bjorn at iki.fi
Tue Apr 24 11:53:14 UTC 2007


Hi,

I am trying to do a setup where I have a DHCP relay server with two
interfaces, eth0 and eth1. The DHCP clients connects to eth1 and I
relay the messages to the DHCP server that  is somewhere behind eth0.
On eth1 I use a private, non-routable address, 10.0.0.1. eth0 has a
routable address. I have several of these networks that use a relay,
all relays have the same private address on eth1, on eth0 the address
is naturally unique. The DHCP relay also functions as a NAT router.

Now, I want the ISC DHCP server to give the same address (from the
10.0.0.0 network) to the clients regardless in which physical network
they are. The problem is that the subnet declaration must match
address of giaddr. If I set giaddr to the address of eth0, then it
will not match the 10.0.0.0 subnet declaration. If I set giaddr to the
address of eth1 the reply will be sent to that address (10.0.0.1)
instead of the routable address of eth0, i.e. the source address of
the DHCP request.

Is there a way to configure the server to function as I want? I've got
a feeling my setup is fairly common, but I can't figure out the
configuration. The simple relay is written by my self and I can easily
modify its behaviour if needed.

Regards,
Bjorn Andersson

-- 
Bjorn Andersson <bjorn at iki.fi>
PGP id 5AFC144B


More information about the dhcp-users mailing list