dhcp not matching subnet if not first address on interface

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Sep 6 13:04:17 UTC 2011


Steve Clark wrote:

>Should I include subnet declaration for all interfaces? Or just the 
>subnets on the
>interface where the subnet is that I will actually be handing out ips for.

You **MUST** include subnet declarations for all interfaces where :

1) You will be offering a DHCP service (whether it's directly 
connected or remote)
2) It is on an interface you will be configuring the server to use.

So lets say you have :

eth0 with subnets A and B directly attached
eth1 with subnet C directly attached
Subnet D as a remote network (serviced via a Relay Agent (aka DHCP Helper))

Now if you configure the server to listen on eth0 but not eth1, then 
you'd need to define A and B (as a shared network), but not C as you 
won't be listening on eth1.
You will also need to define subnet D.

But, you also need to consider how packets from subnet D are going to 
get to your server - ie the network topology. If they will arrive on 
eth0 then it'll work. But if they will arrive on eth1 then you will 
need to have the server listen on eth1 AND define subnet C.


Just for completeness, it is possible to compile the server without 
the (IIRC) use_sockets option. Then it doesn't listen on raw 
interfaces, only via the host OS network stack - meaning it doesn't 
handle broadcast packets. You would need to ensure that the relay 
agent servicing subnet D uses unicast packets to the server AND you 
cannot service subnets A, B, or C.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list