<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks for replying Randall, I guess I don't follow or understand what
you are asking me? My goal is to be able to assign a particular IP
address to a system based on what operating system is running when it
asks the dhcpd server for one. Right now we have just Linux and various
flavors of Windows running on dual bootable systems... Mostly this is
so our backup server can choose and appropriate fileset to back up when
it connects to each system. <br>
<br>
So far, Linux has been pretty stable in terms of it's file structure
and as we upgrade from one release to the next, the backup requirements
remain pretty consistent. Windows is far more variable and I may have
to assign separate IP addresses to Windows machines based on what
variant of Windows is being used.  (and we do have at least one fool
who is making noises about wanting to set up his system to triple boot
it! (XP, Windows 7, and Linux)  GROAN!.....)<br>
<br>
   Marc..<br>
<br>
<br>
On 5/19/2010 6:07 PM, Randall C Grimshaw wrote:
<blockquote
 cite="mid:D1ED659D5D76664389FB55EE3E3EE506092700FC37@suex07-mbx-01.ad.syr.edu"
 type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="GENERATOR" content="MSHTML 8.00.6001.18904">
  <style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
  <meta name="SKYPE_FRAMEID" content="KJYMXIUQCA">
  <meta id="skype_v3_tb_marker_id" name="SKYPE_PARSING_HAS_FINISHED"
 content="metacontent">
  <div dir="ltr"><font color="#000000" face="Tahoma" size="2">any
chance that it is sufficient to separate windows and other...</font></div>
  <div dir="ltr"> </div>
  <div>
  <div><font face="Tahoma" size="2">Randall Grimshaw <a
 moz-do-not-send="true" href="mailto:rgrimsha@syr.edu">
rgrimsha@syr.edu</a></font></div>
  <div> </div>
  </div>
  <div style="direction: ltr;" id="divRpF564880">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users-bounces+rgrimsha=syr.edu@lists.isc.org">dhcp-users-bounces+rgrimsha=syr.edu@lists.isc.org</a>
[<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users-bounces+rgrimsha=syr.edu@lists.isc.org">dhcp-users-bounces+rgrimsha=syr.edu@lists.isc.org</a>] On Behalf Of Marc
Chamberlin [<a class="moz-txt-link-abbreviated" href="mailto:marc@marcchamberlin.com">marc@marcchamberlin.com</a>]<br>
  <b>Sent:</b> Wednesday, May 19, 2010 5:49 PM<br>
  <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>
  <b>Subject:</b> How can I configure a DHCP server to assign addresses
based on the OS that is running<br>
  </font><br>
  </div>
  <div><font face="Times New Roman, Times, serif">I have a need to be
able to assign fixed IP addresses to various computers based on the
operating system that is running, not based on MAC addresses... The
purpose of this is so that our backup server, which automatically backs
up files from each system, and can only work with static IP addresses,
has the ability to change it's behavior based on which IP address/OS is
used/running, when it connects to a particular system. Our systems, are
all dual boot,  Linux and Windows (Vista or XP). Laptops in particular
are a problem because they can be connected wirelessly or wired to our
network, and it is unpredictable as to which way they  will be
connected, or what operating system is in use, when the backup occurs
(usually late at night)....<br>
  <br>
I am running a dhcp server on a Linux (SuSE11.2) system,  - Internet
Systems Consortium DHCP Server V3.1.2p1<br>
  <br>
So here is what I am after -  For a given OS (Windows or Linux) running
on a client, I want the DHCP server to assign a particular IP address
to that client, regardless of which interface that client is using -
wired or wireless. But I want a different IP address assigned to that
client for each OS. For example, if the laptop is running Windows I
want to give the laptop the address of 192.168.2.15 regardless of
whether it is connected wirelessly or wired. If the laptop is running
Linux I want to give the laptop the address of 192.168.2.10, again
regardless of how it is connected to the network.<br>
  <br>
I understand that I can configure the dhcpd.conf file so as to assign
the same IP address to a client, for each MAC address that it has, i.e.
as follows -<br>
  <br>
  host laptop_Vista_wireless {<br>
    hardware ethernet 00:1A:73:55:7D:0F;<br>
    fixed-address 192.168.2.15;<br>
    }<br>
  <br>
  host laptop_Vista_ethernet {<br>
    hardware ethernet 00:1B:24:3C:88:3E;<br>
    fixed-address 192.168.2.15;<br>
  }<br>
  <br>
But that won't work for Linux since it will be using the same
interfaces with the same MAC addresses, and I need a different IP
addressed assign to that system when it is running Linux.
  <br>
  <br>
With Linux I can set the dhcp client identifier, but I have never been
able to figure out how to do so in Windows XP or Vista. I have
discovered, by monitoring the dhcpd.leases file however, that there is
indeed a client identifier for each of the network interface cards when
running under Windows. Unfortunately it is not the same identifier for
both interfaces, nor is it human readable. But I can cut and paste it
so I have tried to configure the dhcpd.conf file as follows -<br>
  <br>
  <br>
  host laptop_Linux {<br>
    option dhcp-client-identifier "\000Linux-laptop";<br>
    fixed-address 192.168.2.10;<br>
  }<br>
  <br>
  </font><font face="Times New Roman, Times, serif">  host
laptop_Vista_wireless {<br>
    option dhcp-client-identifier "\001\000\032sU}\017";<br>
    fixed-address 192.168.2.15;<br>
    }<br>
  <br>
  host laptop_Vista_ethernet {<br>
    option dhcp-client-identifier "\001\000\0266\302e\244"; <br>
    fixed-address 192.168.2.15;<br>
  }<br>
  <br>
And that gets me close but there is still a problem. If the user of the
laptop switches from using one of the interfaces to the other, the dhcp
server recognizes that there is still a lease on the IP address that it
assigned to the initial interface, used by the laptop, and it fails to
reassign that IP address to the new interface that the user switched
to. So some default IP address is assigned instead, which results in my
backup server failing to back up that system.<br>
  <br>
I realize that there is an interesting question about what happens if a
user has both interfaces active when he/she connects to a network. I
see from log files that Linux will try and have the dhcp server assign
an IP address to each interface when it is activated/initialized. Since
Windows hides everything, I am not sure what it does or how it
prioritizes the usage of multiple interfaces. So I would appreciate
some insight here as well, if anyone really understands the behavior of
these operating systems.. But what I really want is that I have the
ability to assign a fixed IP address to whichever interface the OS will
decide to use.... And if I can assign the same IP address to each
interface, then it should not matter in the final analysis, since I
would guess the OS is only going to use one of the interfaces. (At
least that is what it appears Windows does, not so sure about Linux)<br>
  <br>
I have tried to read the documentation and man pages, and fooled around
a bit with the conditional expressions but could never get that to
work. The documentation is pretty difficult and obtuse to understand so
I give up and decided to simply ask... So can some kind guru help me
out and show me how to configure dhcpd.conf so I can achieve what I am
after? Much appreciate it and many thanks in advance..<br>
  <br>
   Marc..<br>
  </font>
  </div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
Marc Chamberlin 
 <a class="moz-txt-link-abbreviated" href="http://www.marcchamberlin.com">www.marcchamberlin.com</a>
 
 A man said unto the universe - "Sir I Exist!"
 "However" replied the universe 
 "I do not see where that creates in me a sense of
 an obligation" S Crane.</pre>
</body>
</html>