<div dir="ltr">Peter, thanks for the reply.<br><br>I'm trying to make friendship Foreman + DHCP (ddns updates) + BIND.<br><br>DHCPD had configuration below, when I tested it work at last time.<br><br>=============<br>dhcpd.conf<br>

=============<br><br>authoritative;<br>ddns-update-style interim;<br>ddns-updates on;<br>ddns-domainname "<a href="http://example.com">example.com</a>";<br>allow booting;<br>allow bootp;<br>next-server 192.168.0.21;<br>

filename "pxelinux.0";<br>option root-path "192.168.0.21:/tftpboot";<br>option ntp-servers 192.168.0.1;<br>allow unknown-clients;<br>update-static-leases on;<br><br>subnet 192.168.0.0 netmask 255.255.255.0   {<br>

        pool {<br>                range 192.168.0.5 192.168.0.50;<br>                deny unknown-clients;<br>                ddns-updates off;<br>                ddns-update-style none;<br>                ignore client-updates;<br>

                update-static-leases off;<br>        }<br><br>        range dynamic-bootp 192.168.0.100 192.168.0.130;<br>        option domain-name-servers 192.168.0.1;<br>        option domain-name "exampl<span class="sewu2sghoyc34yq"></span><span class="sewu2sghoyc34yq"></span><a href="http://e.com">e.com</a>";<br>

        option routers 192.168.0.1;<br>        option broadcast-address 192.168.0.255;<br>        allow client-updates;<br>        default-lease-time 86400;<br>        max-lease-time 172800;<br>        ...<br>}<br><br>...<br>

<br>-----------------<br><br><br>This is the rude scheme of interaction between services:<br><br><span style="font-family:courier new,monospace"><div class="gmail_default" style="display:inline">​</div>__________        _________________________________<br>

|         |      |                                 |<br>|  Host 1 |      |            Host 2               |<br>|         |      |                   (1)           |<br>| Foreman | -->  | Foreman-Proxy   ------>   DHCPD |<br>

|_________|      |        |        omshell         |<br>                 |    (2) |                        |<br>                 |        | nsupdate               |<br>                 |        +                        |<br>

                 |       BIND                      |<br>                 |_________________________________|<br></span><br>0. Creating host in Foreman...<br>1. The Foreman tells foreman-proxy to reserve address for a new host via omshell (1)<br>

<br>=================================<br>/var/log/foreman-proxy/proxy.log<br>=================================<br>D, [2014-05-15T19:47:03.286591 #7893] DEBUG -- : Lazy loaded <a href="http://192.168.0.0/255.255.255.0">192.168.0.0/255.255.255.0</a> records<br>

D, [2014-05-15T19:47:03.287669 #7893] DEBUG -- : Added <a href="http://example-04.example.com">example-04.example.com</a> (192.168.0.25 / 00:50:56:90:72:22) to <a href="http://192.168.0.0/255.255.255.0">192.168.0.0/255.255.255.0</a><br>

D, [2014-05-15T19:47:03.288907 #7893] DEBUG -- : omshell: executed - set name = "<a href="http://example-04.example.com">example-04.example.com</a>"<br>D, [2014-05-15T19:47:03.289097 #7893] DEBUG -- : true<br>D, [2014-05-15T19:47:03.289254 #7893] DEBUG -- : omshell: executed - set ip-address = 192.168.0.25<br>

D, [2014-05-15T19:47:03.289360 #7893] DEBUG -- : true<br>D, [2014-05-15T19:47:03.289510 #7893] DEBUG -- : omshell: executed - set hardware-address = 00:50:56:90:72:22<br>D, [2014-05-15T19:47:03.289652 #7893] DEBUG -- : true<br>

D, [2014-05-15T19:47:03.289819 #7893] DEBUG -- : omshell: executed - set hardware-type = 1<br>D, [2014-05-15T19:47:03.289933 #7893] DEBUG -- : true<br>D, [2014-05-15T19:47:03.290285 #7893] DEBUG -- : omshell: executed - set statements = "filename = \"pxelinux.0\"; next-server = c0:a8:00:cf; option host-name = \"<a href="http://example-04.example.com">example-04.example.com</a>\";"<br>

D, [2014-05-15T19:47:03.290396 #7893] DEBUG -- : true<br>D, [2014-05-15T19:47:03.290548 #7893] DEBUG -- : omshell: executed - create<br>D, [2014-05-15T19:47:03.290700 #7893] DEBUG -- : true<br>I, [2014-05-15T19:47:03.315293 #7893]  INFO -- : Added DHCP reservation for <a href="http://example-04.example.com">example-04.example.com</a> (192.168.0.25 / 00:50:56:90:72:22)<br>

---------------------------------<br><br>==================<br>/var/log/messages<br>==================<br>May 15 19:47:36 ns dhcpd: DHCPOFFER on 192.168.0.25 to 00:50:56:90:72:22 via eth1<br>May 15 19:47:38 ns dhcpd: Dynamic and static leases present for 192.168.0.25.<br>

May 15 19:47:38 ns dhcpd: Remove host declaration <a href="http://example-04.example.com">example-04.example.com</a> or remove 192.168.0.25<br>May 15 19:47:38 ns dhcpd: from the dynamic address pool for <a href="http://192.168.0.0/24">192.168.0.0/24</a><br>

May 15 19:47:38 ns dhcpd: DHCPREQUEST for 192.168.0.25 (192.168.0.1) from 00:50:56:90:72:22 via eth1<br>May 15 19:47:38 ns dhcpd: DHCPACK on 192.168.0.25 to 00:50:56:90:72:22 via eth1<br>------------------<br><br>==========================<br>

/var/lib/dhcp/dhcpd.leases<br>==========================<br>host <a href="http://example-04.example.com">example-04.example.com</a> {<br>  dynamic;<br>  hardware ethernet 00:50:56:90:72:22;<br>  fixed-address 192.168.0.25;<br>

        supersede server.filename = "pxelinux.0";<br>        supersede server.next-server = c0:a8:00:cf;<br>        supersede host-name = "<a href="http://example-04.example.com">example-04.example.com</a>";<br>

}<br>--------------------------<br><br><br><br>2. The Foreman tells foreman-proxy to create A and PTR records at BIND's zones for a new host via nsupdate (2)<br><br>=================================<br>/var/log/foreman-proxy/proxy.log<br>

=================================<br>D, [2014-05-15T19:47:03.464086 #7893] DEBUG -- : running /usr/bin/nsupdate -k /etc/foreman-proxy/foreman_proxy.key<br>D, [2014-05-15T19:47:03.465195 #7893] DEBUG -- : nsupdate: executed - server 127.0.0.1<br>

D, [2014-05-15T19:47:03.470943 #7893] DEBUG -- : nsupdate: executed - update add <a href="http://example-04.example.com">example-04.example.com</a>.  86400 A 192.168.0.25<br>D, [2014-05-15T19:47:03.658748 #7893] DEBUG -- : running /usr/bin/nsupdate -k /etc/foreman-proxy/foreman_proxy.key<br>

D, [2014-05-15T19:47:03.659858 #7893] DEBUG -- : nsupdate: executed - server 127.0.0.1<br>D, [2014-05-15T19:47:03.662425 #7893] DEBUG -- : nsupdate: executed - update add 25.0.168.192.in-addr.arpa.  86400 IN PTR <a href="http://example-04.example.com">example-04.example.com</a>.<br>

---------------------------------<br><br>===================<br>/var/lib/named.run<br>===================<br>15-May-2014 19:47:03.474 update: info: client 127.0.0.1#1904: updating zone '<a href="http://example.com/IN">example.com/IN</a>': adding an RR at '<a href="http://example-04.example.com">example-04.example.com</a>' A<br>

15-May-2014 19:47:03.669 update: info: client 127.0.0.1#34958: updating zone '0.168.192.in-addr.arpa/IN': adding an RR at '25.0.168.192.in-addr.arpa' PTR<br><br><br>3. When host completely configured, it try to boot by pxe:<br>

<br>===========================<br>/var/log/messages<br>===========================<br>May 15 19:48:11 ns dhcpd: DHCPDISCOVER from 00:50:56:90:72:22 via eth1<br>May 15 19:48:11 ns dhcpd: DHCPOFFER on 192.168.0.25 to 00:50:56:90:72:22 via eth1<br>

May 15 19:48:11 ns dhcpd: Dynamic and static leases present for 192.168.0.25.<br>May 15 19:48:11 ns dhcpd: Remove host declaration <a href="http://example-04.example.com">example-04.example.com</a> or remove 192.168.0.25<br>

May 15 19:48:11 ns dhcpd: from the dynamic address pool for <a href="http://192.168.0.0/24">192.168.0.0/24</a><br>May 15 19:48:11 ns dhcpd: DHCPREQUEST for 192.168.0.25 (192.168.0.1) from 00:50:56:90:72:22 via eth1<br>May 15 19:48:11 ns dhcpd: DHCPACK on 192.168.0.25 to 00:50:56:90:72:22 via eth1<br>

<br><br>4. When host starts to configure its network interface and received address, dhcpd initiates update bind's zones (I hope I understand this mechanism properly):<br><br>===========================<br>/var/log/messages<br>

===========================<br>May 15 19:48:20 ns dhcpd: DHCPDISCOVER from 00:50:56:90:72:22 via eth1<br>May 15 19:48:20 ns dhcpd: DHCPOFFER on 192.168.0.25 to 00:50:56:90:72:22 via eth1<br>May 15 19:48:20 ns dhcpd: Dynamic and static leases present for 192.168.0.25.<br>

May 15 19:48:20 ns dhcpd: Remove host declaration <a href="http://example-04.example.com">example-04.example.com</a> or remove 192.168.0.25<br>May 15 19:48:20 ns dhcpd: from the dynamic address pool for <a href="http://192.168.0.0/24">192.168.0.0/24</a><br>

May 15 19:48:20 ns dhcpd: Added new forward map from <a href="http://example-04.example.com.example.com">example-04.example.com.example.com</a> to 192.168.0.25<br>May 15 19:48:20 ns dhcpd: added reverse map from 25.0.168.192.in-addr.arpa. to <a href="http://example-04.example.com.example.com">example-04.example.com.example.com</a><br>

May 15 19:48:20 ns dhcpd: DHCPREQUEST for 192.168.0.25 (192.168.0.1) from 00:50:56:90:72:22 via eth1<br>May 15 19:48:20 ns dhcpd: DHCPACK on 192.168.0.25 to 00:50:56:90:72:22 via eth1<br>---------------------------<br><br>

===================<br>/var/lib/named.run<br>===================<br>15-May-2014 19:48:20.229 update: info: client 192.168.0.1#55653: updating zone '<a href="http://example.com/IN">example.com/IN</a>': adding an RR at '<a href="http://example-04.example.com.example.com">example-04.example.com.example.com</a>'<br>

A<br>15-May-2014 19:48:20.229 update: info: client 192.168.0.1#55653: updating zone '<a href="http://example.com/IN">example.com/IN</a>': adding an RR at '<a href="http://example-04.example.com.example.com">example-04.example.com.example.com</a>'<br>

TXT<br>15-May-2014 19:48:20.274 update: info: client 192.168.0.1#38704: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '25.0.168.192.in-addr.arpa' PTR<br>15-May-2014 19:48:20.274 update: info: client 192.168.0.1#38704: updating zone '0.168.192.in-addr.arpa/IN': adding an RR at '25.0.168.192.in-addr.arpa' PTR<br>

-------------------<br><br>So, I can't figure out: if I told dhcpd "do not attempt any updates when the client received address or this is a static lease etc.", why it continue updates zones?<br><br>Alex<br>

<br>2014-05-12 10:29 GMT+04:00 Peter Rathlev <<a href="mailto:peter@rathlev.dk">peter@rathlev.dk</a>>:<br>> On Mon, 2014-04-28 at 17:14 +0400, Alexei V. Schukin wrote:<br>>> I'm trying to exclude one pool of subnet from dynamic updates.<br>

> ...<br>>> subnet 192.168.0.1 netmask 255.255.255.0 {<br>>>   pool {<br>>>     range 192.168.0.10 192.168.0.20;<br>>>     deny unknown-clients;<br>>>     ddns-updates off;<br>>>     ignore client-updates;<br>

> ...<br>>> But it doesn't work: dhcpd still updating dns within this address pool.<br>>> What I'm missing?<br>><br>> Are you sure it's dhcpd that does the updating? Does it say so in the<br>

> logs? The above configuration would make the client try updating itself.<br>> It of course needs permission to do this.<br>><br>> --<br>> Peter<br>><br>><br>> _______________________________________________<br>

> dhcp-users mailing list<br>> <a href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a><br>> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a></div>