Configuration question..

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Sep 12 18:32:47 UTC 2006


B. Cook wrote:

>so something like this:
>
>http://poklib.org/~bcook/dhcpd.conf
>
>with this config I get a WARNING now when I restart my dhcpd..
>
>/usr/local/etc/rc.d/isc-dhcpd restart
>Stopping dhcpd.
>Starting dhcpd.
>Internet Systems Consortium DHCP Server V3.0.5rc2
>Copyright 2004-2006 Internet Systems Consortium.
>All rights reserved.
>For info, please visit http://www.isc.org/sw/dhcp/
>WARNING: Host declarations are global.  They are not limited to the
>scope you declared them in.
>Wrote 0 deleted host decls to leases file.
>Wrote 0 new dynamic host decls to leases file.
>Wrote 82 leases to leases file.
>Listening on BPF/fxp0/00:e0:18:03:d0:3c/192.168.1/24
>Sending on   BPF/fxp0/00:e0:18:03:d0:3c/192.168.1/24
>Sending on   Socket/fallback/fallback-net
>
>and everything still seems normal..

The warning is just that, a warning - it's because you still have 
your host declarations within a subnet. As Keith pointed out, general 
advice is to have all host statements in the global scope (ie not 
within any subnet declaration) unless you really need the inheritance 
that otherwise happens - I think this comes into the "if you need to 
ask the details, you shouldn't be doing it" category.

Move all you host statements to the global scope and things will work 
as you expect, and the warning will go away. You can still use the 
"group { ... }" construct to apply a common option declaration to a 
number of hosts.



>Heres what I have done and what I have discovered..
>
>I have a host dilvish in my 192.168.1.0 subnet::pool,
>host dilvish		{ hardware ethernet 00:60:97:7b:6d:d8; option routers
>192.168.1.2;}
>
>I move that to the 10.0.0.0 subnet::pool, and remove the routers option..
>host dilvish		{ hardware ethernet 00:60:97:7b:6d:d8; }
>
>restart dhcpd, have the win2k box relase and then renew it's IP, it gets
>the same 192.168.1.250 IP but it gets all the things associated w/ the
>10. (I think this is what you were saying would happen.. )

Yes, that's the effect that happens - and we think it's been the 
cause of quite a few "my client got the wrong router option" queries 
to the list over the years ! Like I said, it's not something that 
most people need and I strongly advise against it.


>What I am looking for is that when hosts come in through the dhcp-relay
>on the router that they get routed to the right subnet

That is automatic. You do NOT need to manually associate hosts with a 
subnet for it to happen.

What happens is that the relay agent fills in a field called GIAddr 
(Gateway Interface Address) with the address of it's interface that 
it received the request from the client on. The server sees that 
address and uses it to associate the client with a subnet - it can 
then allocate a suitable address and options. Like I say, this is all 
automatic.

>and follow the
>correct known/unknown settings that I have provided for them.

known/unknown only requires the host to be defined/undefined - it 
doesn't need the host to be declared inside the subnet.

Simon


More information about the dhcp-users mailing list