Having both dhcp3 server and dhcp3 relay on the same host

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Mar 21 19:04:25 UTC 2007

Laurent CARON wrote:

>  > You can run a relay agent and a server on the same subnet, in the
>>  same way as you can run two servers on the same subnet*. However, you
>>  MUST take steps to avoid conflicts and it is generally inadvisable
>>  unless the two servers are running as a failover pair.
>I think i'll have a "real" dhcp server and a dhcp relay on this subnet.
>Here is how the network is built:
>Would having this kind of config on my dhcp server located on the
> subnet be sufficient if i install a dhcp relay on the
> subnet ?
>subnet netmask {
>   range;
>   option domain-name-servers,;
>   option subnet-mask;
>   option routers;
>   option netbios-name-servers;
>   option tftp-server-name "";
>   option time-servers;
>   option time-offset 3600;
>   default-lease-time 84600;
>   max-lease-time 604800;

No, you must define a subnet declaration for the 
subnet as well. Ie your config file must accurately reflect your 

>How the clients on the subnet will get
>class adresses instead of getting addresses?

Once you have defined the subnet, the rest happens automagically.

The server knows where the request came from (either a local 
interface or via a relay agent) and will automatically select the 
correct subnet declaration.

More information about the dhcp-users mailing list