Hi All,
Recently I have come across a but of a problem involving DHCP leases to Windows and PXE.
Presently most of my workstations boot up using PXE; the DHCP server responds to the DHCPDISCOVER message by giving the workstation (via PXE) an IP address.
The workstation then proceeds to boot up into Windows, windows then sends a DHCPDISCOVER message and the DHCP server gives the workstation a new IP address thinking that it is a new workstation, although it has the same MAC address.
Here's a little snippet from the dhcp.leases file which illustrates the problem.
lease 192.168.1.82 {
starts 5 2010/02/19 07:48:20;
ends 6 2010/02/20 07:48:20;
binding state active;
next binding state free;
hardware ethernet e0:cb:4e:b4:5f:c8;
}
lease 192.168.1.164 {
starts 5 2010/02/19 08:02:43;
ends 6 2010/02/20 08:02:43;
binding state active;
next binding state free;
hardware ethernet e0:cb:4e:b4:5f:c8;
uid "\001\340\313N\264_\310";
client-hostname "COM-05";
}
Note that the same MAC address has two different IP addresses, I assume one was given to PXE and one to Windows on the same workstation.
I thought of trying the following workaround as outlined in the contribs Wiki
http://wiki.contribs.org/Dhcpd_lease_timeBut, I assume this will substantially increase network chatter if I change the default-lease-time to a much lower number (so as to free up the IPs allocated via PXE to the workstations once they have booted up.
I found out that there is a
deny duplicates
keyword which can be used in your dhcpd.conf file.
Host declarations can match client messages based on the DHCP Client Identifier option or based on the client's network hardware type and MAC address. If the MAC address is used, the host declaration will match any client with that MAC address - even clients with different client identifiers. This doesn't normally happen, but is possible when one computer has more than one operating system installed on it - for example, Microsoft Windows and NetBSD or Linux.
The duplicates flag tells the DHCP server that if a request is received from a client that matches the MAC address of a host declaration, any other leases matching that MAC address should be discarded by the server, even if the UID is not the same. This is a violation of the DHCP protocol, but can prevent clients whose client identifiers change regularly from holding many leases at the same time. By default, duplicates are allowed.
I checked mine and there is no such option, although I'm not sure if it will help if it was included.
#------------------------------------------------------------
# !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
# Addresses from 192.168.1.250 to 192.168.1.250 taken for PPTP sessions
authoritative;
ddns-update-style none;
option wpad-url code 252 = text;
subnet 192.168.1.0 netmask 255.255.255.0
{
option broadcast-address 192.168.1.255;
allow bootp;
option domain-name "xxxxxxxxxxxxxxx";
option domain-name-servers 192.168.1.1;
default-lease-time 86400;
max-lease-time 604800;
option netbios-dd-server 192.168.1.1;
option netbios-name-servers 192.168.1.1;
option netbios-node-type 8;
option subnet-mask 255.255.255.0;
range 192.168.1.65 192.168.1.249;
option routers 192.168.1.1;
option wpad-url "http://wpad.xxxxxxxxxxxxx/wpad.dat";
next-server 192.168.1.xxx;
filename "/pxelinux.0";
}
So I have 3 options:
- Do nothing
- Change the lease time to a small number (noisy network)
- Screw around with the dhcpd.conf file (I'm really not comfortable with this)
Any top tips/workaroundx would be most helpful as IP addresses are a premium on my network at the moment as in effect I have only about 255/2.
Thanks!