<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000066">
<font face="Helvetica, Arial, sans-serif">Yes, last byte of IP address
needs to be based on second byte of client-id.     <br>
<br>
Thanks for the idea about using the reserved lease option.   I may try
that.   However, this still allows less flexibility than desired.<br>
<br>
Is there any particular limitation or reason why we can't set
fixed-address with an expression?  (I mean, I assume the code is not
written for such usage of expression assignment, but since expression
assignment for other parameters works, would it be trivial to add this
capability for fixed-address assignment?   Admittedly I've not looked
at the source yet, so perhaps I should do so before making too many
assumptions...)<br>
<br>
Thanks....<br>
<br>
</font><br>
On 3/11/2008 12:43 AM, Simon Hobson wrote:
<blockquote cite="mid:a06240806c3fbe68af716@simon.thehobsons.co.uk"
 type="cite">Matthew wrote:
  <br>
  <blockquote type="cite">Is there a method to intelligently assign a
'fixed-address' based on a client's 'dhcp-client-identifier'?
    <br>
  </blockquote>
<snip>
  <br>
  <blockquote type="cite">But if I try similar assignment with
fixed-address....
    <br>
    <br>
     fixed-address = 10.100.20.(substring(option
dhcp-client-identifier,2,1));
    <br>
    <br>
...I get the following error....
    <br>
    <br>
     /etc/dhcpd.conf line 260: = (61): expecting IP address or hostname
    <br>
         fixed-address =
    <br>
                       ^
    <br>
     Configuration file errors encountered -- exiting
    <br>
  </blockquote>
  <br>
  <br>
So, you want the last byte of hte address to match the second byte of
the client-id ?
  <br>
  <br>
At present there is NO easy way to do this. I can think of two methods
that might fit the bill depending on what you are trying to achieve
(depends on what the client-ids look like).
  <br>
  <br>
  <br>
One that I think will work now would be reserved leases - IF you know
in advance what the client-ids will be. You could knock up a quick
script to generate skeleton leases to match clients to addresses and
add the reserved option. Stop the server, add these leases to the
leases file, start the server - then whenever one of these clients
connects, the server will see that it already has a lease and will
offer it. Because the leases are marked reserved, they will never be
allocated to another client.
  <br>
  <br>
Another method would be to create a class & pool for every client -
check back in the archives and you'll find examples of how to do this,
look for option-82. With this method you could use anything as your
'key'.
  <br>
  <br>
  <br>
One thing I'll mention though, have you considered the possibility of
an ID clash ? Or is the second byte of the client-id guaranteed to be
unique ?
  <br>
  <br>
</blockquote>
</body>
</html>