<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFCC" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 16/12/12 14:17, Nico De Ranter
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALVv0fZsvm1q+_XhHvjWw1Kr3bfJ-F=ZO_MOgkEw11y_Dro+Wg@mail.gmail.com"
      type="cite"><br>
      Hi,<br>
      <br>
      <br>
      <br>
      I'm trying to use DHCP option 82 to assign a different address to
      a host depending on which network port it is connected to.<br>
      I'vve created the following section in my config:<br>
      <br>
      ############<br>
      stash-agent-options true;<br>
      ...<br>
      subnet 10.103.0.0 netmask 255.255.255.0<br>
      {<br>
              option routers 10.103.0.1;<br>
              class "OK1Endo" {<br>
                      match if  binary-to-ascii(16, 8, ":",
      substring(option agent.remote-id, 2, 7)) = "84:78:ac:84:e5:80"<br>
    </blockquote>
    How will a substring of length 7 match 6 hex values? Is there any
    reason to convert into ascii?<br>
    <blockquote
cite="mid:CALVv0fZsvm1q+_XhHvjWw1Kr3bfJ-F=ZO_MOgkEw11y_Dro+Wg@mail.gmail.com"
      type="cite">
                              and     binary-to-ascii (16, 8, ":",
      hardware) = "1:0:14:2d:40:f:15"<br>
    </blockquote>
    binary-to-ascii will, as far as I can see, return a string of the
    form xx:xx:xx:xx ....<br>
    How can that match x:x:xx:xx:xx:x:xx - note one or two digits.<br>
    <blockquote
cite="mid:CALVv0fZsvm1q+_XhHvjWw1Kr3bfJ-F=ZO_MOgkEw11y_Dro+Wg@mail.gmail.com"
      type="cite">                        and     binary-to-ascii (16,
      8, ":", substring(option agent.circuit-id, 5, 5)) = "e";<br>
    </blockquote>
    Substring of length 5 should match one letter?<br>
    <blockquote
cite="mid:CALVv0fZsvm1q+_XhHvjWw1Kr3bfJ-F=ZO_MOgkEw11y_Dro+Wg@mail.gmail.com"
      type="cite">
              }<br>
              pool {<br>
                      filename "pxelinux.0";<br>
                      next-server 10.103.0.202;<br>
                      option mobile-ip-home-agent 10.103.0.202;<br>
                      option log-servers 10.103.0.202;<br>
                      option tz "Europe/Brussels";<br>
                      use-host-decl-names on;<br>
                      allow members of "OK1Endo";<br>
                      range 10.103.0.220 10.103.0.220;<br>
              }<br>
        }<br>
      ###########<br>
      <br>
      I'm sure the class definition is correct and the pool matches as I
      also added a log statement which only seems to trigger if the
      client matches the pool (if I change the class definition or
      remove the 'allow members' I don't see the logs appearing in the
      log files anymore).<br>
      <br>
      However the dhcpd server doesn't seem to send any reply to the
      host: in tcpdump I see a bootp/dhcp request from the clients MAC
      but no replies from the server.  If I replace the 'pool' section
      with a simple 'host' definition the server responds immediately. 
      <br>
      <br>
      Any ideas what I'm doing wrong?<br>
      <br>
      Note: I'm using a very old version of dhcpd (3.1.1) which
      unfortunately I cannot upgrade at the moment.<br clear="all">
      <br>
      Thanks in advance,<br>
      <br>
      Nico<br>
      <br>
      -- <br>
      <span
style="font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><span
          style="color:rgb(128,128,128)">Nico De Ranter</span>
        <div>
          <p
style="margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt"><font
              color="#808080">Operations Engineer</font></p>
          <p
style="margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt"><font
              color="#808080"><br>
            </font></p>
          <p
style="margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt"><span><span><span
                  style="color:gray" lang="EN-US">eSATURNUS</span></span></span><span
              style="color:gray" lang="EN-US"><span></span></span></p>
          <p
style="margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt"><span
              style="color:gray" lang="EN-US">T. <a
                moz-do-not-send="true" value="+3216401282"
                style="color:rgb(0,0,204)">+32 16 40 12 82</a></span></p>
          <p
style="margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt"><span
              style="color:gray" lang="EN-US">M. <a
                moz-do-not-send="true" value="+32478567829"
                style="color:rgb(0,0,204)">+32 497 91 53 78<br>
              </a></span></p>
          <p
style="margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt"><span
              style="color:rgb(102,102,102)"><a moz-do-not-send="true"
                href="http://www.esaturnus.com" target="_blank">www.esaturnus.com</a></span></p>
          <p
style="margin-top:0cm;margin-right:0cm;margin-left:0cm;margin-bottom:0.0001pt"><img
              moz-do-not-send="true"
              src="https://www.google.com/a/esaturnus.com/images/logo.gif?alpha=1"><br>
            <span style="color:gray" lang="EN-US"></span></p>
          <span style="color:gray"><a moz-do-not-send="true"
              href="http://www.esaturnus.com/"
              style="color:rgb(0,0,204)" target="_blank"><span
                lang="EN-US"></span></a></span><span style="color:gray"
            lang="EN-US"></span>
          <pre style="white-space:pre-wrap"><span style="color:gray" lang="EN-US"></span><span style="color:gray"><a moz-do-not-send="true" href="http://vcard.esaturnus.com/" style="color:rgb(0,0,204)" target="_blank"><span lang="EN-US">

</span></a></span></pre>
        </div>
      </span><br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Best regards

Sten Carlsen

No improvements come from shouting:
       "MALE BOVINE MANURE!!!"
</pre>
  </body>
</html>