<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 28/02/13 13:00, gary mazzaferro
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAGwOJnybfg+eEMH36vg9_kndrkwczhXT0w7fKEz0XMuieYNMSA@mail.gmail.com"
      type="cite">
      <pre wrap="">Hi Sten,

Thank you for the reply and the explanation...

I do understand host statements are global. Placing them under the
subnets was for documentation than anything else.

The explanation doesn't address the issue I'm experiencing, IP address
for 172.31.1.16 is already provisioned for mac address
90:e2:ba:0c:0d:51 and in my reading of the documentation, the server
should not be offering to the incoming request using mac address
90:e2:ba:0c:0d:50.</pre>
    </blockquote>
    Well, this is probably another misunderstanding, if I understand you
    correctly. Putting a fixed address into a host statement does NOT
    reserve it for any purpose. The server will happily hand it out to
    any who may ask IF it is in the pool/range of the subnet the
    discover arrives at.<br>
    My guess is that your eth1 has an address in the 172.31.1.x range -
    this would mean that it will get an address in that range (or no
    addresss at all) whatever you put in the host statement.<br>
    <br>
    Again I will warn against putting host statements in the subnets, in
    this case it will mean that the following options will be given even
    when the address is:<br>
    <pre wrap="">Feb 27 18:07:54 DCAPXEserver dhcpd: DHCPACK on 172.31.1.16 to
90:e2:ba:0c:0d:50 (hd-node4) via eth1</pre>
    <pre wrap="">  option domain-name "wbu.mydomain.com";
  option domain-name-servers 10.96.191.251,10.119.248.254;
  option routers 10.96.164.1;
  default-lease-time 3456000;
  max-lease-time 34560000;</pre>
    Basic point is DON'T put fixed address statements in the range you
    give the server to hand out, there will not be any reservations
    made. Sorry I missed this at first reading.<br>
    <blockquote
cite="mid:CAGwOJnybfg+eEMH36vg9_kndrkwczhXT0w7fKEz0XMuieYNMSA@mail.gmail.com"
      type="cite">
      <pre wrap="">

cheers,
gary

On Wed, Feb 27, 2013 at 7:36 PM, Sten Carlsen <a class="moz-txt-link-rfc2396E" href="mailto:stenc@s-carlsen.dk"><stenc@s-carlsen.dk></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">It seems that you think the host statement can have a limited scope, limited
to a subnet. That is not correct, host statements are global wherever they
are placed. The bad thing about putting them into subnets is that they will
inherit options from the subnet even if they get addresses from another
subnet.

The server will hand out an address corresponding to the subnet it sees the
discover coming from, it will use the fixed address only if it matches the
subnet the discover comes from, else it will use an address from the
subnet's pool.



On 28/02/13 2:36, gary mazzaferro wrote:

Hi,

Maybe someone can help me..

I have an intel card with 4 ports.. with incremental  mac addresses.

I'm trying to to use the dhcp server 4.2.3.P2 to assign two subnets
based on mac addresses, The server is assigning the first address it
finds close to the mac address.  Not sure if my config file is bad..

90:e2:ba:0c:0d:50 should be 10.96.165.16
90:e2:ba:0c:0d:51 should be 172.31.1.16

90:e2:ba:0c:0d:50 sees and offer of 172.31.1.16

Feb 27 18:07:53 DCAPXEserver dhcpd: DHCPDISCOVER from 90:e2:ba:0c:0d:50 via
eth1
Feb 27 18:07:54 DCAPXEserver dhcpd: DHCPOFFER on 172.31.1.16 to
90:e2:ba:0c:0d:50 (hd-node4) via eth1
Feb 27 18:07:54 DCAPXEserver dhcpd: DHCPREQUEST for 172.31.1.16
(172.31.1.10) from 90:e2:ba:0c:0d:50 (hd-node4) via eth1
Feb 27 18:07:54 DCAPXEserver dhcpd: DHCPACK on 172.31.1.16 to
90:e2:ba:0c:0d:50 (hd-node4) via eth1

Can some one please help me ?

lease file:
# The format of this file is documented in the dhcpd.leases(5) manual page.
# This lease file was written by isc-dhcp-4.2.3-P2

server-duid "\000\001\000\001\030\224\215R\000\014)\375\317\242";

lease 172.31.1.16 {
  starts 4 2013/02/28 01:07:54;
  ends 2 2013/04/09 01:07:54;
  cltt 4 2013/02/28 01:07:54;
  binding state active;
  next binding state free;
  rewind binding state free;
  hardware ethernet 90:e2:ba:0c:0d:50;
  client-hostname "hd-node4";
}

option domain-name-servers 172.31.1.10;
default-lease-time 3456000;
ddns-update-style none;
authoratative ;
subnet 172.31.1.0 netmask 255.255.255.0 {
  option domain-name "dca.wbu.mydomain.com";
  option domain-name-servers 172.31.1.10;
  option routers 172.31.1.1;
  default-lease-time 3456000;
  max-lease-time 34560000;
  range 172.31.1.11 172.31.1.30;
  host hd-namenode-data1 {
    option host-name "hd-namenode";
    hardware ethernet 00:0c:29:c6:82:be;
    filename "vmunix.hd-namenode";
    fixed-address 172.31.1.11;
  }
  host pikespeak1 {
    hardware ethernet 00:00:c0:5d:bd:95;
    filename "vmunix.pikepeak";
    server-name "pikespeak1";
  }
  host node1-data1 {
    option host-name "hd-node1";
    hardware ethernet 00:0c:29:c1:6e:35;
    filename "vmunix.stargo";
    fixed-address 172.31.1.13;
  }
  host node2-data1 {
    option host-name "hd-node2";
    hardware ethernet 00:0c:29:b8:af:f3;
    filename "vmunix.stargo";
    fixed-address 172.31.1.14;
  }
  host node3-data1 {
    option host-name "hd-node3";
    hardware ethernet 00:0c:29:04:65:ee;
    filename "vmunix.stargo";
    fixed-address 172.31.1.15;
  }
  host node4-data1-stargo {
    option host-name "hd-node4";
    hardware ethernet 90:e2:ba:0c:0d:51;
    filename "vmunix.stargo";
    fixed-address 172.31.1.16;
  }
}
subnet 10.96.165.0 netmask 255.255.255.0 {
  option domain-name "wbu.mydomain.com
";
  option domain-name-servers 10.96.191.251,10.119.248.254;
  option routers 10.96.164.1;
  default-lease-time 3456000;
  max-lease-time 34560000;
  range 10.96.165.11 10.96.165.44;
  host hd-namenode-mgt {
    option host-name "hd-namenode";
    hardware ethernet 00:0c:29:c6:82:b4;
    filename "vmunix.hd-namenode";
    fixed-address 10.96.165.11;
  }
  host hd-node1-mgt {
    option host-name "hd-node1";
    hardware ethernet 00:0c:29:c1:6e:2b;
    filename "vmunix.hd-node1";
    fixed-address 10.96.165.13;
  }
  host hd-node2-mgt {
    option host-name "hd-node2";
    hardware ethernet 00:0c:29:b8:af:9e;
    filename "vmunix.hd-node2";
    fixed-address 10.96.165.14;
  }
  host hd-node3-mgt {
    option host-name "hd-node3";
    hardware ethernet 00:0c:29:04:65:e4;
    filename "vmunix.hd-node3";
    fixed-address 10.96.165.15;
  }
  host hd-node4-mgt-stargo {
    option host-name "hd-node4";
    hardware ethernet 90:e2:ba:0c:0d:50;
    filename "vmunix.hd-node4";
    fixed-address 10.96.165.16;
  }
}
_______________________________________________
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>


--
Best regards

Sten Carlsen

No improvements come from shouting:
       "MALE BOVINE MANURE!!!"


_______________________________________________
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>
      <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>