Two leases for the same Mac address.

Francis SOUYRI francis.souyri at wanadoo.fr
Sat Feb 10 17:47:23 UTC 2007


Hello Simon,

I do not use Windows, but hardware boot where in the leases file there 
is no client-id and linux boot where there is a client-id in the lease 
file. I cannot change the way the hardware boot works, so I will try to 
change the way "udhcpd" works to avoid using a client-id.

It is a good idea to create two pools but I do not know how to identify 
the hardware boot and the linux boot.

Thank you for your reply, when I say there are more then two leases for 
one mac address, I want to say there are more than two active different 
ip adresses for a Mac address.

Best regards.

Francis

Simon Hobson wrote:

>Francis SOUYRI wrote:
>
>  
>
>>    I am using thinstation which are booting on the network.
>>When the hardware boots (ACCTON Ethernet card) it requires two times for
>>an IP address, the DHCP server (dhcp 3.0.3-28 from Fedora core 5),
>>offers the two times the same IP address.
>>Then the thinstation retrieves the linux kernel,  the software boot and
>>ask for an IP address, now the DHCP server does not offer the same IP
>>address but another one.
>>For each thinstation that I start they takes two IP, and finally the
>>DHCP server has not enough free addresses left for booting all the
>>thinstations...
>>
>>Sometimes when I checks the lease file, there is more then two leases
>>for one mac address....
>>    
>>
>
>This is quite normal. Taking your queries in reverse order, you will 
>see as many entries in the lease file as there were transactions with 
>clients - eg if you reboot your client, you will see more lease 
>records written to the leases file. This is because the leases file 
>is an 'append only' file and any event that requires an update to the 
>persistent database results in a new record being added to the file. 
>Periodically, the server will write out a new file containing only 
>the latest lease for each IP address.
>
>Now to the main part of your query. This has been covered many, many 
>times before on this list, usually when the client OS is Windows. If 
>you look at the leases for the two addresses, you will probably find 
>that one lease has no client-id (labelled UID in the lease file 
>IIRC), while the other has one (or they have different client-ids). 
>The server will use the client-id as the primary key to identify the 
>client and use the MAC address only of the client-id is not present. 
>Thus if a client sometimes uses no client-id, and sometimes does use 
>one, then to any standards compliant server they are different 
>clients.
>
>The usual issue when this comes up is a system that dual-boots into 
>Linux (no client id by default) and Windows (uses MAC address as 
>client-id), or does a network boot and then boots into Windows.
>
>The 'correct' answer is to persuade your client to use the same 
>client-id all the time, but this can be hard. Alternatively, if you 
>can identify the boot code and OS separately it is possible to create 
>two pools so that clients can be given a different (short) lease 
>while booting so as not to exhaust the 'working' addresses.
>
>Alternatively, there are some patches (see 
>http://www.cs.tau.ac.il/~didi/dhcp/) that alter the way the server 
>handles client-id - but be aware that the server is no longer RFC 
>compliant when these are in use.
>
>
>  
>


More information about the dhcp-users mailing list