DHCP client takes too much time to get IP address
Alessandro FAGLIA
a.faglia at farmol.it
Thu Nov 15 16:53:53 UTC 2007
-------- Original Message --------
Subject: Re: DHCP client takes too much time to get IP address
From: Simon Hobson <dhcp1 at thehobsons.co.uk>
To: dhcp-users at isc.org
Date: Thu Nov 15 2007 15:31:29 GMT+0100 (ora solare Europa occidentale)
Hi all.
[...]
>
> You have a shared network (two subnets on one
> physical media) and must define it as such. What is happening now is
> that the server responds to a client request received on bond0 as though
> it is in subnet 192.168.1.0 - but when it sees the client request it's
> address via a packet received on bond1 then it knows that the address is
> invalid for that network and sends a DHCP NAK.
>
>> This is an excerpt of my dhcpd.conf.
>> In my mind, known hosts are assigned to subnet 1 or 2 depending on
>> their MAC addr. Guests with known MAC addr are put into range
>> 192.168.1.180-192.168.1.19 while those with unknown MAC are put into
>> 192.168.1.170-192.168.1.179 (for which the firewall close all doors).
I will complete this excerpt with missing declarations:
ddns-update-style interim;
ddns-domainname "farmol.it";
option domain-name "farmol.it";
default-lease-time 1800;
max-lease-time 3600;
authoritative;
>>
>> subnet 192.168.1.0 netmask 255.255.255.0 {
>> option routers 192.168.1.1;
>> option subnet-mask 255.255.255.0;
>> option broadcast-address 192.168.1.255;
>> option domain-name-servers 192.168.1.1;
>>
>> # guests with unknown MAC addr
>> pool {
>> range 192.168.1.170 192.168.1.179;
>> allow unknown clients;
>> }
>>
>> # guests with known MAC addr
>> pool {
>> range 192.168.1.180 192.168.1.199;
>> }
>> }
Then the subnet declaration I forgot to paste in my previous post:
subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.2.255;
option domain-name-servers 192.168.2.1;
}
>>
>> group {
>> default-lease-time 43200;
>> max-lease-time 86400;
>> option netbios-name-servers 192.168.1.1;
>> use-host-decl-names on;
>>
>> host <...> {
>> hardware ethernet <...>;
>> fixed-address 192.168.1.20;
>> }
>> [...]
>> }
>>
>> # Guests with known MAC addr
>> group {
>> default-lease-time 43200;
>> max-lease-time 86400;
>> use-host-decl-names on;
>>
>> host <...> {
>> hardware ethernet <..>;
>> fixed-address 192.168.1.180;
>> }
>> [...]
>> }
>>
>> group {
>> default-lease-time 43200;
>> max-lease-time 86400;
>> option netbios-name-servers 192.168.2.1;
>> use-host-decl-names on;
>>
>> host <...> {
>> hardware ethernet <...>;
>> fixed-address 192.168.2.50;
>> }
>> }
>>
>> include "/etc/dhcp-dns.key";
>>
>> update-static-leases on;
>>
>> zone farmol.it. {
>> primary 127.0.0.1;
>> key DHCP_UPDATER;
>> }
>>
>> zone 168.192.in-addr.arpa. {
>> primary 127.0.0.1;
>> key DHCP_UPDATER;
>> }
>
> Firstly you are missing a subnet declaration. You MUST define the
> 192.168.2.0/24 subnet even if you do not issue any leases to it. As you
> have a shared network, you must declare it as such :
>
> shared-network somenetworkname {
> subnet 192.168.1.0 ....
> ....
> }
> subnet 192.168.2.0 ....
> ....
> }
> }
>
This is something I've completely missed...
I am now reading the dhcpd.conf man page referring to this statement.
>
> Also, you has a fixed address (192.168.1.180) which is also part of a
> dynamic range. Any fixed address MUST NOT be in any dynamically
> assignable range. It is possible that a dynamic client could acquire the
> address, then the host with the fixed address come onto the network. The
> server will comply with your instruction to give the host it's fixed
> address and you then have two stations with an address comflict.
I agree with you, but the "allow unknown clients" should restrict
addresses to the range (192.168.1.170-192.168.1.179) specified in the
parent pool. Isn't it?
Should I avoid the pool declaration for 192.168.1.180-192.168.1.199 range?
BTW, many thanks for your suggestions, that are very precious for a
better understanding of this tool.
--Alessandro
More information about the dhcp-users
mailing list