How can I configure a DHCP server to assign addresses based on the OS that is running Solved maybe!
Marc Chamberlin
marc at marcchamberlin.com
Sat Jan 15 21:51:19 UTC 2011
Hello - I am going to pick up on a thread that I started last summer so
as to give anyone who wants the context an opportunity to review and
refresh themselves on the issues I am facing. Basically, I am trying to
support dual and triple boot laptops with multiple OS's and multiple
network interface capabilities (wireless v.s. wired), and I need to be
able to assign these laptops a fixed IP address that is based on the OS
that is currently running on them, regardless of what network interface
is being used by the laptop. (the purpose behind this is so that our
backup server can identify how to back up a laptop and reach that laptop
via a known IP address) After a lot of discussion on this mail list, we
reached a possible working solution and I will recap it (reshow what I
summarized previously) below to show how the dhcpd.conf file was
configured to manage one of these laptops (mine).
OK now for the problem, which was an unforeseen wrinkle, but users being
users will discover em, and of course complain... If a user switches the
network interface from one to another, while remaining with the same OS,
then the dhcpd server will refuse to assign (actually reassign) the
appropriate IP address to that laptop. (This happens a lot when a user
takes his/her laptop to another building, out of range of our wireless
AP) Since the dhcpd server thinks that the IP address for that laptop as
already been assigned, to the wireless interface, and the user is now
trying reboot and get an IP address assign via the wired interface,
(which we want to be the SAME IP address) the dhcpd server fails to
reassign the IP address until it's old lease expires.
So, anyone got any ideas on how to solve this new wrinkle? Thanks in
advance for any and all offers of help, much appreciated?
Marc Chamberlin...
---
>
> class "marcslaptop_Vista_Class" {
> match if ((substring(option vendor-class-identifier, 0, 4) =
> "MSFT") and
> ((ucase(binary-to-ascii(16, 8, ":", substring (hardware,
> 1, 6))) = ucase("0:1a:73:55:7d:f")) or
> (ucase(binary-to-ascii(16, 8, ":", substring (hardware,
> 1, 6))) = ucase("0:16:36:c2:65:a4"))));
> log (info, "marcslaptop_Vista_Class matched");
> }
>
> class "marcslaptop_Linux_Class" {
> match if ((substring(option dhcp-client-identifier,1,11) =
> "marcslaptopLinux") and
> ((ucase(binary-to-ascii(16, 8, ":", substring (hardware,
> 1, 6))) = ucase("0:1a:73:55:7d:f")) or
> (ucase(binary-to-ascii(16, 8, ":", substring (hardware,
> 1, 6))) = ucase("0:16:36:c2:65:a4"))));
> log (info, "marcslaptop_Linux_Class matched");
> }
>
> subnet 192.168.2.0 netmask 255.255.255.0 {
> default-lease-time 14400;
> max-lease-time 172800;
> pool {allow members of "marcslaptop_Linux_Class"; range 192.168.2.10;}
> pool {allow members of "marcslaptop_Vista_Class"; range 192.168.2.15;}
> pool {
> deny members of "marcslaptop_Linux_Class";
> deny members of "marcslaptop_Vista_Class";
> deny known-clients;
> allow all clients;
> range 192.168.2.101 192.168.2.199;}
> }
>
More information about the dhcp-users
mailing list