One DHCP Server, Multiple routed subnets, roaming clients
Glenn Satchell
Glenn.Satchell at uniq.com.au
Wed Oct 28 12:21:38 UTC 2009
Hi James and Sten
Including the host entries at the beginning of the dhcpd.conf, in the global
scope, is typically the right thing to do.
I remember in early releases (3.0 maybe) with host declarations, if the
fixed-address didn't match it would get a dynamic address. In later
versions this changed and another host statement without fixed-address
was needed to get a dynamic address.
Here it is from the RELNOTES file, the bahaviour changed in 3.0.2:
- Host declarations matching on client identifier for dynamic leases will
no longer match fixed-address host declarations (this is now identical
to behaviour for host records matching on hardware address).
If you're generating the file form a database, then it should be a
simple change to your script. Remember to create a different label for
the two host entries.
regards,
-glenn
--
Glenn Satchell mailto:glenn.satchell at uniq.com.au | Miss 9: What do you
Uniq Advances Pty Ltd http://www.uniq.com.au | do at work Dad?
PO Box 70 Paddington NSW Australia 2021 | Miss 6: He just
tel:0409-458-580 fax:02-9380-6416 | types random stuff.
>Date: Wed, 28 Oct 2009 06:39:15 -0400
>From: "James Jalbert" <jjalbert at rsu39.org>
>To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
>Subject: Re: One DHCP Server, Multiple routed subnets, roaming clients
>
>This is exactly what I want. So if I understand right, I need to setup a pool,
and define a range in that pool, not just define the range in the subnet
deceleration? I have tried with ranges set up, but not pools, I will see what
that does. Does it matter were the host deceleration is? I have all my hosts in
a database, that exports to the ip.hosts file, and is loaded at the beginning of
my dhcpd.conf file. Should that be fine?
>
>James Jalbert
>Network Administrator
>Caribou School Department
>Phone: 207-493-4246
>E-Mail: jjalbert at caribouschools.org
>
>
>
>>>> Sten Carlsen <stenc at s-carlsen.dk> 10/27/2009 8:28 PM >>>
>Hi
>
>Do you need two host statements? I seem to remember that:
>1 - if a host has a host statement it is "known".
>2 - if the host statement has a fixed address that matches the subnet it
>is in, it will get that address.
>3 - if the host statement does not have any address in the subnet, it
>will get one from the pool.
>
>So if I am right, one host statement with the addresses you want fixed
>and no addresses for the subnets you want it to have a dynamic address
>and "allow known hosts" in all pools.
>That should do what you want, fixed addresses in some subnets and
>dynamic in the rest and no other hosts can get an address.
>
>If you want to allow others to get an address, leave out the "allow
>known hosts".
>
>Glenn Satchell wrote:
>> Hi James
>>
>> Just to recap, you want fixed-address in some subnets, and dynamic in
>> others for the same host? You need two host declarations, one with a
>> comma separated list of fixed-address and a second host declatation
>> with *no* fixed-address statement. The name of the host declration
>> needs to beunique, so something like this:
>>
>> # RoamingSystem1
>> host RoamingSystem1 {
>> hardware ethernet 00:25:4B:9B:28:F1;
>> fixed-address
>> 10.11.0.170,10.11.8.104,10.11.14.175,10.11.19.7,10.11.12.181;
>> ddns-hostname "RoamingSystem1";
>> option host-name "RoamingSystem1";
>> }
>> # RoamingSystem1
>> host RoamingSystem1-dynmic {
>> hardware ethernet 00:25:4B:9B:28:F1;
>> ddns-hostname "RoamingSystem1";
>> option host-name "RoamingSystem1";
>> }
>>
>> dhcpd will only offer one of the fixed addresses if it is valid for the
>> subnet where hte DHCPDISCOVER came from. otherwiseit will use a dynamic
>> address. In both cases the client is "known" due to the existance of
>> the host statement.
>>
>> Remember that dhcp doesn't enforce security, someone could still walk
>> in off the street and rather than using dhcp they could manually set
>> the IP address and router and connect.
>>
>> regards,
>> -glenn
>>
>>
>>> Date: Tue, 27 Oct 2009 18:59:52 +0000
>>> To: Users of ISC DHCP <dhcp-users at lists.isc.org>
>>> From: Simon Hobson <dhcp1 at thehobsons.co.uk>
>>> Subject: Re: One DHCP Server, Multiple routed subnets, roaming clients
>>> X-BeenThere: dhcp-users at lists.isc.org
>>>
>>> James Jalbert wrote:
>>>
>>>
>>>> I have a DHCP server in my main building. This building also
>>>> connects to 6 other building through a WAN. I have one DHCP Server
>>>> (Ubuntu server9.04, DHCP 3.1) with multiple subnet decelerations,
>>>> and one large host file, added with an include. Everything works
>>>> great. I have machines that roam between buildings, and as long as I
>>>> use comma separated fixed address, everything works great.
>>>> Now I would like to be able to set up the server so that, if a
>>>> machine has a deceleration with a fixed address, but is requesting
>>>> an ip form another building, it would be assigned a dynamic address,
>>>> however if there is no Host deceleration(an unknown client) it will
>>>> not be assigned any address.
>>>>
>>> Try this :
>>>
>>> pool {
>>> range .... ;
>>> allow known clients;
>>> }
>>>
>>> If a client doesn't have a host declaration then it is not known, and
>>> will be denied a lease. If it does have a host declaration then it is
>>> known, and will get a dynamic address (unless it has a fixed address
>>> valid in the subnet).
>>>
>>> --
>>> 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.
>>> _______________________________________________
>>> dhcp-users mailing list
>>> dhcp-users at lists.isc.org
>>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>>
>>
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
>
>--
>Best regards
>
>Sten Carlsen
>
>No improvements come from shouting:
>
> "MALE BOVINE MANURE!!!"
>
>_______________________________________________
>dhcp-users mailing list
>dhcp-users at lists.isc.org
>https://lists.isc.org/mailman/listinfo/dhcp-users
>_______________________________________________
>dhcp-users mailing list
>dhcp-users at lists.isc.org
>https://lists.isc.org/mailman/listinfo/dhcp-users
More information about the dhcp-users
mailing list