ddns.xml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
  4. <!ENTITY mdash "&#x2014;" >
  5. ]>
  6. <chapter id="dhcp-ddns-server">
  7. <title>The DHCP-DDNS Server</title>
  8. <para>
  9. The DHCP-DDNS Server (b10-dhcp-ddns, known informally as D2) conducts the client side of
  10. the DDNS protocol (defined in RFC 2136) on behalf of the DHCPv4 and DHCPv6
  11. servers (b10-dhcp4 and b10-dhcp6 respectively). The DHCP servers construct
  12. DDNS update requests, known as NameChangeRequests (NCRs), based upon DHCP
  13. lease change events and then post these to D2. D2 attempts to match
  14. each such request to the appropriate DNS server(s) and carry out the
  15. necessary conversation with those servers to update the DNS data.
  16. </para>
  17. <para>
  18. In order to match a request to appropriate DNS servers, D2 must have a
  19. catalog of servers from which to select. In fact, D2 has two such catalogs,
  20. one for forward DNS and one for reverse DNS; these catalogs are referred
  21. to as DDNS Domain Lists. Each list consists of one or more named DDNS
  22. Domains. Further, each DDNS Domain has a list of of one or more DNS
  23. servers that publish the DNS data for that domain.
  24. </para>
  25. <para>
  26. When conducting forward domain matching, D2 will compare the FQDN in
  27. the request against the name of each forward DDNS Domain. The domain
  28. whose name matches the longest portion of the FQDN is considered the
  29. best match. For example, if the FQDN is "myhost.sample.example.com.",
  30. and there are two forward domains in the catalog: "sample.example.com."
  31. and "example.com.", the former is regarded as the best match. In some
  32. cases, it may not be possible to find a suitable match. Given the same two
  33. forward domains there would be no match for the FQDN, "bogus.net", so the
  34. request would be rejected. Finally, if there are no forward DDNS Domains
  35. defined, D2 will simply disregard the forward update portion of requests.
  36. </para>
  37. <para>
  38. When conducting reverse domain matching, D2 constructs a reverse
  39. FQDN from the lease address in the request and compare that against
  40. the name of each reverse DDNS Domain. Again, the domain whose name matches
  41. the longest portion of the FQDN is considered the best match. For instance,
  42. if the lease address is "172.16.1.40" and there are two reverse domains in
  43. the catalog: "1.16.172.in-addr.arpa." and "16.172.in-addr.arpa", the
  44. former is the best match. As with forward matching, it is possible to not
  45. find a suitable match. Given the same two domains, there would be no
  46. match for the lease address, "192.168.1.50", and the request would be
  47. rejected. Finally, if there are no reverse DDNS Domains defined, D2 will
  48. simply disregard the reverse update portion of requests.
  49. </para>
  50. <section id="dhcp-ddns-server-start-stop">
  51. <title>Starting and Stopping the DHCP-DDNS Server</title>
  52. <para>
  53. <command>b10-dhcp-ddns</command> is the BIND 10 DHCP-DDNS server and,
  54. like other parts of BIND 10, is configured through the
  55. <command>bindctl</command> program.
  56. </para>
  57. <para>
  58. After starting BIND 10 and entering bindctl, the first step in
  59. configuring the server is to add it to the list of running BIND 10
  60. services.
  61. <screen>
  62. &gt; <userinput>config add Init/components b10-dhcp-ddns</userinput>
  63. &gt; <userinput>config set Init/components/b10-dhcp-ddns/kind dispensable</userinput>
  64. &gt; <userinput>config commit</userinput>
  65. </screen>
  66. </para>
  67. <para>
  68. To remove <command>b10-dhcp-ddns</command> from the set of running services,
  69. the <command>b10-dhcp-ddns</command> is removed from list of Init components:
  70. <screen>
  71. &gt; <userinput>config remove Init/components b10-dhcp-ddns</userinput>
  72. &gt; <userinput>config commit</userinput>
  73. </screen>
  74. </para>
  75. <para>
  76. Note that the server was only removed from the list, so it will not be
  77. automatically restarted, but the server itself is still running. Hence it
  78. is usually desired to stop it:
  79. </para>
  80. <screen>
  81. &gt; <userinput>DhcpDdns shutdown</userinput>
  82. </screen>
  83. <para>
  84. Upon start up the module will load its configuration and begin listening
  85. for NCRs based on that configuration.
  86. </para>
  87. </section> <!-- end start-stop -->
  88. <section id="d2-configuration">
  89. <title>Configuring the DHCP-DDNS Server</title>
  90. <para>
  91. Once the server is started, it can be configured. To view the
  92. current configuration, use the following command in <command>bindctl</command>:
  93. <screen>
  94. &gt; <userinput>config show DhcpDdns</userinput></screen>
  95. When starting b10-dhcp-ddns module for the first time, the default
  96. configuration will be available. It will look similar to this:
  97. <screen>
  98. &gt; <userinput>config show DhcpDdns</userinput>
  99. DhcpDdns/ip_address "127.0.0.1" string (default)
  100. DhcpDdns/port 53001 integer (default)
  101. DhcpDdns/dns_server_timeout 100 integer (default)
  102. DhcpDdns/ncr_protocol "UDP" string (default)
  103. DhcpDdns/ncr_format "JSON" string (default)
  104. DhcpDdns/tsig_keys [] list (default)
  105. DhcpDdns/forward_ddns/ddns_domains [] list (default)
  106. DhcpDdns/reverse_ddns/ddns_domains [] list (default)
  107. </screen>
  108. <para>
  109. (While displayed, the parameter "interface" is not implemented, and
  110. will be removed in the near future.)
  111. </para>
  112. </para>
  113. <para>
  114. The configuration can be divided as follows, each of which is described
  115. in its own section:
  116. </para>
  117. <itemizedlist>
  118. <listitem>
  119. <simpara>
  120. <command>Global Server Parameters</command> &mdash;
  121. values which control connectivity and global server behavior
  122. </simpara>
  123. </listitem>
  124. <listitem>
  125. <simpara>
  126. <command>TSIG Key Info</command> &mdash;
  127. defines the TSIG keys used for secure traffic with DNS servers
  128. </simpara>
  129. </listitem>
  130. <listitem>
  131. <simpara>
  132. <command>Forward DDNS</command> &mdash;
  133. defines the catalog of Forward DDNS Domains
  134. </simpara>
  135. </listitem>
  136. <listitem>
  137. <simpara>
  138. <command>Reverse DDNS</command> &mdash;
  139. defines the catalog of Forward DDNS Domains
  140. </simpara>
  141. </listitem>
  142. </itemizedlist>
  143. <section id="d2-server-parameter-config">
  144. <title>Global Server Parameters</title>
  145. <orderedlist>
  146. <listitem><para>
  147. ip_address - IP address on which D2 listens for requests. The default is
  148. the local loopback interface at address 127.0.0.1. You may specify
  149. either an IPv4 or IPv6 address.
  150. </para></listitem>
  151. <listitem><para>
  152. port - Port on which D2 listens for requests. The default value
  153. is 53001.
  154. </para></listitem>
  155. <listitem><para>
  156. ncr_format - Socket protocol to use when sending requests to D2.
  157. Currently only UDP is supported. TCP may be available in an upcoming
  158. release.
  159. </para></listitem>
  160. <listitem><para>
  161. ncr_protocol - Packet format to use when sending requests to D2.
  162. Currently only JSON format is supported. Other formats may be available
  163. in future releases.
  164. </para></listitem>
  165. <listitem><para>
  166. dns_server_timeout - The maximum amount of time in milliseconds, that
  167. D2 will wait for a response from a DNS server to a single DNS update
  168. message.
  169. </para></listitem>
  170. </orderedlist>
  171. <para>
  172. D2 must listen for change requests on a known address and port. By
  173. default it listens at 127.0.0.1 on port 53001. The following example
  174. illustrates how to change D2's global parameters so it will listen
  175. at 192.168.1.10 port 900:
  176. <screen>
  177. &gt; <userinput>config set DhcpDdns/ip_address "192.168.1.10"</userinput>
  178. &gt; <userinput>config set DhcpDdns/port 900</userinput>
  179. &gt; <userinput>config commit</userinput>
  180. </screen>
  181. </para>
  182. <warning>
  183. <simpara>
  184. When the DHCP-DDNS server is configured to listen at an address
  185. other than the loopback address (127.0.0.1 or ::1), it is possible
  186. for a malicious attacker to send bogus NameChangeRequests to it
  187. and change entries in the DNS. For this reason, addresses other
  188. than the IPv4 or IPv6 loopback addresses should only be used
  189. for testing purposes. A future version of Kea will implement
  190. authentication to guard against such attacks.
  191. </simpara>
  192. </warning>
  193. <note>
  194. <simpara>
  195. If the ip_address and port are changed, it will be necessary to change the
  196. corresponding values in the DHCP servers' "dhcp-ddns" configuration section.
  197. </simpara>
  198. </note>
  199. </section> <!-- "d2-server-parameter-config" -->
  200. <section id="d2-tsig-key-list-config">
  201. <title>TSIG Key List</title>
  202. <para>
  203. A DDNS protocol exchange can be conducted with or without TSIG
  204. (defined in <ulink url="http://tools.ietf/org/html/rfc2845">RFC
  205. 2845</ulink>). This configuration section allows the administrator
  206. to define the set of TSIG keys that may be used in such
  207. exchanges.</para>
  208. <para>To use TSIG when updating entries in a DNS Domain,
  209. a key must be defined in the TSIG Key List and referenced by
  210. name in that domain's configuration entry. When D2 matches a
  211. change request to a domain, it checks whether the domain has
  212. a TSIG key associated with it. If so, D2 will use that key to
  213. sign DNS update messages sent to and verify repsonses received
  214. from the domain's DNS server(s). For each TSIG key required by
  215. the DNS servers that D2 will be working with there must be a
  216. corresponding TSIG key in the TSIG Key list.</para>
  217. <para>
  218. As one might gather from the name, the tsig_key section of the
  219. D2 configuration lists the TSIG keys. Each entry describes a
  220. TSIG key used by one or more DNS servers to authenticate requests
  221. and sign responses. Every entry in the list has three parameters:
  222. <itemizedlist>
  223. <listitem>
  224. <simpara>
  225. <command>name</command> &mdash;
  226. a unique text label used to identify this key within the
  227. list. This value is used to specify which key (if any) should be
  228. used when updating a specific domain. So long as it is unique its
  229. content is arbitrary, although for clarity and ease of maintenance
  230. it is recommended that it match the name used on the DNS server(s).
  231. It cannot be blank.
  232. </simpara>
  233. </listitem>
  234. <listitem>
  235. <simpara>
  236. <command>algorithm</command> &mdash;
  237. specifies which hashing algorithm should be used with this
  238. key. This value must specify the same algorithm used for the
  239. key on the DNS server(s). The supported algorithms are listed below:
  240. <itemizedlist>
  241. <listitem>
  242. <command>HMAC-MD5</command>
  243. </listitem>
  244. <listitem>
  245. <command>HMAC-SHA1</command>
  246. </listitem>
  247. <listitem>
  248. <command>HMAC-SHA224</command>
  249. </listitem>
  250. <listitem>
  251. <command>HMAC-SHA256</command>
  252. </listitem>
  253. <listitem>
  254. <command>HMAC-SHA384</command>
  255. </listitem>
  256. <listitem>
  257. <command>HMAC-SHA512</command>
  258. </listitem>
  259. </itemizedlist>
  260. This value is not case sensitive.
  261. </simpara>
  262. </listitem>
  263. <listitem>
  264. <simpara>
  265. <command>secret</command> &mdash;
  266. is used to specify the shared secret key code for this key. This value is
  267. case sensitive and must exactly match the value specified on the DNS server(s).
  268. It is a base64-encoded text value.
  269. </simpara>
  270. </listitem>
  271. </itemizedlist>
  272. </para>
  273. <para>
  274. As an example, suppose that a domain D2 will be updating is
  275. maintained by a BIND9 DNS server which requires dynamic updates
  276. to be secured with TSIG. Suppose further that the entry for
  277. the TSIG key in BIND9's named.conf file looks like this:
  278. <screen>
  279. :
  280. key "key.four.example.com." {
  281. algorithm hmac-sha224;
  282. secret "bZEG7Ow8OgAUPfLWV3aAUQ==";
  283. };
  284. :
  285. </screen>
  286. By default, the TSIG Key list is empty:
  287. <screen>
  288. <userinput>> config show DhcpDdns/tsig_keys</userinput>
  289. DhcpDdns/tsig_keys [] list (default)
  290. </screen>
  291. We must first create a new key in the list:
  292. <screen>
  293. <userinput>> config add DhcpDdns/tsig_keys</userinput>
  294. </screen>
  295. Displaying the new element, reveals:
  296. <screen>
  297. <userinput>> config show DhcpDdns/tsig_keys[0]</userinput>
  298. DhcpDdns/tsig_keys[0]/name "" string (default)
  299. DhcpDdns/tsig_keys[0]/algorithm "HMAC-MD5" string (modified)
  300. DhcpDdns/tsig_keys[0]/secret "" string (default)
  301. </screen>
  302. Now set all three values to match BIND9's key:
  303. <screen>
  304. <userinput>> config set DhcpDdns/tsig_keys[0]/name "key.four.example.com"</userinput>
  305. <userinput>> config set DhcpDdns/tsig_keys[0]/algorithm "HMAC-SHA224"</userinput>
  306. <userinput>> config set DhcpDdns/tsig_keys[0]/secret "bZEG7Ow8OgAUPfLWV3aAUQ=="</userinput>
  307. <userinput>> config commit</userinput>
  308. </screen>
  309. </para>
  310. These steps would be repeated for each TSIG key needed. Note that the same TSIG key
  311. can be used with more than one domain.
  312. </section> <!-- "d2-tsig-key-list-config" -->
  313. <section id="d2-forward-ddns-config">
  314. <title>Forward DDNS</title>
  315. <para>
  316. The Forward DDNS section is used to configure D2's forward update
  317. behavior. Currently it contains a single parameter, the catalog of
  318. forward DDNS Domains:
  319. <screen>
  320. <userinput>> config show DhcpDdns/forward_ddns/</userinput>
  321. DhcpDdns/forward_ddns/ddns_domains [] list (default)
  322. </screen>
  323. By default, this list is empty, which will cause the server to ignore
  324. the forward update portions of requests.
  325. </para>
  326. <section id="add-forward-ddns-domain">
  327. <title>Adding Forward DDNS Domains</title>
  328. <para>
  329. A forward DDNS Domain maps a forward DNS zone to a set of DNS servers
  330. which maintain the forward DNS data for that zone. You will need one
  331. forward DDNS Domain for each zone you wish to service. It may very
  332. well be that some or all of your zones are maintained by the same
  333. servers. You will still need one DDNS Domain per zone. Remember that
  334. matching a request to the appropriate server(s) is done by zone and
  335. a DDNS Domain only defines a single zone.
  336. </para>
  337. <para>
  338. The section describes how to add Forward DDNS Domains. Repeat these
  339. steps for each Forward DDNS Domain desired. Each Forward DDNS Domain
  340. has the following parameters:
  341. <itemizedlist>
  342. <listitem>
  343. <simpara>
  344. <command>name</command> &mdash;
  345. The fully qualified domain name (or zone) that this DDNS Domain
  346. can update. This is value used to compare against the request
  347. FQDN during forward matching. It must be unique within the
  348. catalog.
  349. </simpara>
  350. </listitem>
  351. <listitem>
  352. <simpara>
  353. <command>key_name</command> &mdash;
  354. If TSIG is used with this domain's servers, this
  355. value should be the name of the key from within the TSIG Key List
  356. to use. If the value is blank (the default), TSIG will not be
  357. used in DDNS conversations with this domain's servers. Currently
  358. TSIG has not been implemented, so this value is ignored.
  359. </simpara>
  360. </listitem>
  361. <listitem>
  362. <simpara>
  363. <command>dns_servers</command> &mdash;
  364. A list of one or more DNS servers which can conduct the server
  365. side of the DDNS protocol for this domain. The servers
  366. are used in a first to last preference. In other words, when D2
  367. begins to process a request for this domain it will pick the
  368. first server in this list and attempt to communicate with it.
  369. If that attempt fails, it will move to next one in the list and
  370. so on until the it achieves success or the list is exhausted.
  371. </simpara>
  372. </listitem>
  373. </itemizedlist>
  374. To create a new forward DDNS Domain, one must first add a new domain
  375. element:
  376. <screen>
  377. <userinput>> config add DhcpDdns/forward_ddns/ddns_domains</userinput>
  378. </screen>
  379. Displaying the DDNS Domain reveals this:
  380. <screen>
  381. <userinput>> config show DhcpDdns/forward_ddns/ddns_domains[0]</userinput>
  382. DhcpDdns/forward_ddns/ddns_domains[0]/name "" string (default)
  383. DhcpDdns/forward_ddns/ddns_domains[0]/key_name "" string (default)
  384. DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers [] list (default)
  385. </screen>
  386. To set the domain's name to "other.example.com":
  387. <screen>
  388. <userinput>> config set DhcpDdns/forward_ddns/ddns_domains[1]/name "other.example.com"</userinput>
  389. <userinput>> config commit</userinput>
  390. </screen>
  391. It is permissible to add a domain without any servers. If that domain
  392. should be matched to a request, however, the request will fail. In
  393. order to make the domain useful though, we must add at least one DNS
  394. server to it.
  395. </para>
  396. <section id="add-forward-dns-servers">
  397. <title>Adding Forward DNS Servers</title>
  398. <para>
  399. The section describes how to add DNS servers to a Forward DDNS Domain.
  400. Repeat them for as many servers as desired for a each domain.
  401. </para>
  402. <para>
  403. Forward DNS Server entries represent actual DNS servers which
  404. support the server side of the DDNS protocol. Each Forward DNS Server
  405. has the following parameters:
  406. <itemizedlist>
  407. <listitem>
  408. <simpara>
  409. <command>hostname</command> &mdash;
  410. The resolvable host name of the DNS server. This value is not
  411. yet implemented.
  412. </simpara>
  413. </listitem>
  414. <listitem>
  415. <simpara>
  416. <command>ip_address</command> &mdash;
  417. The IP address at which the server listens for DDNS requests.
  418. This may be either an IPv4 or an IPv6 address.
  419. </simpara>
  420. </listitem>
  421. <listitem>
  422. <simpara>
  423. <command>port</command> &mdash;
  424. The port on which the server listens for DDNS requests. It
  425. defaults to the standard DNS service port of 53.
  426. </simpara>
  427. </listitem>
  428. </itemizedlist>
  429. To create a new forward DNS Server, one must first add a new server
  430. element to the domain:
  431. <screen>
  432. <userinput>> config add DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers</userinput>
  433. </screen>
  434. Displaying the DNS Server element should appear as follows:
  435. <screen>
  436. <userinput>> config show DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers[0]</userinput>
  437. DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers[0]/hostname "" string (default)
  438. DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers[0]/ip_address "" string (default)
  439. DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers[0]/port 53 integer(default)
  440. </screen>
  441. As stated earlier, "hostname" is not yet supported so, the parameter
  442. "ip_address" must be set to the address of the DNS server. If for
  443. example the service is running at "172.88.99.10", then set it as
  444. follows:
  445. <screen>
  446. <userinput>> config set DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers[0]/ip_address "172.88.99.10"</userinput>
  447. <userinput>> config commit</userinput>
  448. </screen>
  449. </para>
  450. </section> <!-- "add-forward-dns-servers" -->
  451. </section> <!-- "add-forward-ddns-domains" -->
  452. </section> <!-- "d2-forward-ddns-config" -->
  453. <section id="d2-reverse-ddns-config">
  454. <title>Reverse DDNS</title>
  455. <para>
  456. The Reverse DDNS section is used to configure D2's reverse update
  457. behavior, and the concepts are the same as for the forward DDNS
  458. section. Currently it contains a single parameter, the catalog of
  459. reverse DDNS Domains:
  460. <screen>
  461. <userinput>> config show DhcpDdns/reverse_ddns/</userinput>
  462. DhcpDdns/reverse_ddns/ddns_domains [] list (default)
  463. </screen>
  464. By default, this list is empty, which will cause the server to ignore
  465. the reverse update portions of requests.
  466. </para>
  467. <section id="add-reverse-ddns-domain">
  468. <title>Adding Reverse DDNS Domains</title>
  469. <para>
  470. A reverse DDNS Domain maps a reverse DNS zone to a set of DNS servers
  471. which maintain the reverse DNS data for that zone. You will need one
  472. reverse DDNS Domain for each zone you wish to service. It may very
  473. well be that some or all of your zones are maintained by the same
  474. servers; even then, you will still need one DDNS Domain entry for each
  475. zone. Remember that
  476. matching a request to the appropriate server(s) is done by zone and
  477. a DDNS Domain only defines a single zone.
  478. </para>
  479. <para>
  480. The section describes how to add Reverse DDNS Domains. Repeat these
  481. steps for each Reverse DDNS Domain desired. Each Reverse DDNS Domain
  482. has the following parameters:
  483. <itemizedlist>
  484. <listitem>
  485. <simpara>
  486. <command>name</command> &mdash;
  487. The fully qualified reverse zone that this DDNS Domain
  488. can update. This is the value used during reverse matching
  489. which will compare it with a reversed version of the request's
  490. lease address. The zone name should follow the appropriate
  491. standards: for example, to to support the IPv4 subnet 172.16.1,
  492. the name should be. "1.16.172.in-addr.arpa.". Similarly,
  493. to support an IPv6 subent of 2001:db8:1, the name should be
  494. "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa."
  495. Whatever the name, it must be unique within the catalog.
  496. </simpara>
  497. </listitem>
  498. <listitem>
  499. <simpara>
  500. <command>key_name</command> &mdash;
  501. If TSIG should be used with this domain's servers, then this
  502. value should be the name of that key from the TSIG Key List.
  503. If the value is blank (the default), TSIG will not be
  504. used in DDNS conversations with this domain's servers. Currently
  505. this value is not used as TSIG has not been implemented.
  506. </simpara>
  507. </listitem>
  508. <listitem>
  509. <simpara>
  510. <command>dns_servers</command> &mdash;
  511. a list of one or more DNS servers which can conduct the server
  512. side of the DDNS protocol for this domain. Currently the servers
  513. are used in a first to last preference. In other words, when D2
  514. begins to process a request for this domain it will pick the
  515. first server in this list and attempt to communicate with it.
  516. If that attempt fails, it will move to next one in the list and
  517. so on until the it achieves success or the list is exhausted.
  518. </simpara>
  519. </listitem>
  520. </itemizedlist>
  521. To create a new reverse DDNS Domain, one must first add a new domain
  522. element:
  523. <screen>
  524. <userinput>> config add DhcpDdns/reverse_ddns/ddns_domains</userinput>
  525. </screen>
  526. Displaying the DDNS Domain reveals this:
  527. <screen>
  528. <userinput>> config show DhcpDdns/reverse_ddns/ddns_domains[0]</userinput>
  529. DhcpDdns/reverse_ddns/ddns_domains[0]/name "" string (default)
  530. DhcpDdns/reverse_ddns/ddns_domains[0]/key_name "" string (default)
  531. DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers [] list (default)
  532. </screen>
  533. For domain supporting the subnet 2001:db8:1::, we would set the
  534. domain's name as follows:
  535. <screen>
  536. <userinput>> config set DhcpDdns/reverse_ddns/ddns_domains[1]/name "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa."</userinput>
  537. <userinput>> config commit</userinput>
  538. </screen>
  539. It is permissible to add a domain without any servers. If that domain
  540. should be matched to a request, however, the request will fail. In
  541. order to make the domain useful though, we must add at least one DNS
  542. server to it.
  543. </para>
  544. <section id="add-reverse-dns-servers">
  545. <title>Adding Reverse DNS Servers</title>
  546. <para>
  547. The section describes how to add DNS servers to a Reverse DDNS Domain.
  548. Repeat them for as many servers as desired for a each domain.
  549. </para>
  550. <para>
  551. Reverse DNS Server entries represents a actual DNS servers which
  552. support the server side of the DDNS protocol. Each Reverse DNS Server
  553. has the following parameters:
  554. <itemizedlist>
  555. <listitem>
  556. <simpara>
  557. <command>hostname</command> &mdash;
  558. The resolvable host name of the DNS server. This value is
  559. currently ignored.
  560. </simpara>
  561. </listitem>
  562. <listitem>
  563. <simpara>
  564. <command>ip_address</command> &mdash;
  565. The IP address at which the server listens for DDNS requests.
  566. </simpara>
  567. </listitem>
  568. <listitem>
  569. <simpara>
  570. <command>port</command> &mdash;
  571. The port on which the server listens for DDNS requests. It
  572. defaults to the standard DNS service port of 53.
  573. </simpara>
  574. </listitem>
  575. </itemizedlist>
  576. To create a new reverse DNS Server, one must first add a new server
  577. element to the domain:
  578. <screen>
  579. <userinput>> config add DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers</userinput>
  580. </screen>
  581. Displaying the DNS Server element should appear as follows:
  582. <screen>
  583. <userinput>> config show DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]</userinput>
  584. DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/hostname "" string (default)
  585. DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/ip_address "" string (default)
  586. DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/port 53 integer(default)
  587. </screen>
  588. As stated earlier, "hostname" is not yet supported so, the parameter
  589. "ip_address" must be set to the address of the DNS server. If for
  590. example the service is running at "172.88.99.10", then set it as
  591. follows:
  592. <screen>
  593. <userinput>> config set DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/ip_address "172.88.99.10"</userinput>
  594. <userinput>> config commit</userinput>
  595. </screen>
  596. </para>
  597. </section> <!-- "add-reverse-dns-servers" -->
  598. </section> <!-- "add-reverse-ddns-domains" -->
  599. </section> <!-- "d2-reverse-ddns-config" -->
  600. <section id="d2-exmaple-config">
  601. <title>Example DHCP-DDNS Server Configuration</title>
  602. <para>
  603. This section provides an example DHCP-DDNS server configuration based
  604. on a small example network. Let's suppose our example network has
  605. three domains, each with their own subnet.
  606. <table>
  607. <title>Our example network</title>
  608. <tgroup cols='4' align='left'>
  609. <colspec colname='domain'/>
  610. <colspec colname='subnet'/>
  611. <colspec colname='fservers'/>
  612. <colspec colname='rservers'/>
  613. <thead>
  614. <row>
  615. <entry>Domain</entry>
  616. <entry>Subnet</entry>
  617. <entry>Forward DNS Servers</entry>
  618. <entry>Reverse DNS Servers</entry>
  619. </row>
  620. </thead>
  621. <tbody>
  622. <row>
  623. <entry>four.example.com</entry>
  624. <entry>192.0.2.0/24</entry>
  625. <entry>172.16.1.5, 172.16.2.5</entry>
  626. <entry>172.16.1.5, 172.16.2.5</entry>
  627. </row>
  628. <row>
  629. <entry>six.example.com</entry>
  630. <entry>2001:db8:1::/64</entry>
  631. <entry>3001:1::50</entry>
  632. <entry>3001:1::51</entry>
  633. </row>
  634. <row>
  635. <entry>example.com</entry>
  636. <entry>192.0.0.0/16</entry>
  637. <entry>172.16.2.5</entry>
  638. <entry>172.16.2.5</entry>
  639. </row>
  640. </tbody>
  641. </tgroup>
  642. </table>
  643. </para>
  644. <para>
  645. We need to construct three forward DDNS Domains:
  646. <table>
  647. <title>Forward DDNS Domains Needed</title>
  648. <tgroup cols='3' align='left'>
  649. <colspec colname='num'/>
  650. <colspec colname='name'/>
  651. <colspec colname='servers'/>
  652. <thead>
  653. <row>
  654. <entry>#</entry>
  655. <entry>DDNS Domain Name</entry>
  656. <entry>DNS Servers</entry>
  657. </row>
  658. </thead>
  659. <tbody>
  660. <row>
  661. <entry>1.</entry>
  662. <entry>four.example.com.</entry>
  663. <entry>172.16.1.5, 172.16.2.5</entry>
  664. </row>
  665. <row>
  666. <entry>2.</entry>
  667. <entry>six.example.com.</entry>
  668. <entry>3001:1::50</entry>
  669. </row>
  670. <row>
  671. <entry>3.</entry>
  672. <entry>example.com.</entry>
  673. <entry>172.16.2.5</entry>
  674. </row>
  675. </tbody>
  676. </tgroup>
  677. </table>
  678. As discussed earlier, FQDN to domain matching is based on the longest
  679. match. The FQDN, "myhost.four.example.com.", will match the first
  680. domain ("four.example.com") while "admin.example.com." will match the
  681. third domain ("example.com"). The
  682. FQDN, "other.example.net." will fail to match any domain and would
  683. be rejected.
  684. </para>
  685. <para>
  686. The following series of commands in bindctl will create the Forward
  687. DDNS Domains.
  688. <screen>
  689. <userinput>
  690. > config add DhcpDdns/forward_ddns/ddns_domains
  691. > config set DhcpDdns/forward_ddns/ddns_domains[0]/name "four.example.com."
  692. > config add DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers
  693. > config set DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers[0]/ip_address "172.16.1.5"
  694. > config add DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers
  695. > config set DhcpDdns/forward_ddns/ddns_domains[0]/dns_servers[1]/ip_address "172.16.2.5"
  696. >
  697. > config add DhcpDdns/forward_ddns/ddns_domains
  698. > config set DhcpDdns/forward_ddns/ddns_domains[1]/name "six.example.com."
  699. > config add DhcpDdns/forward_ddns/ddns_domains[1]/dns_servers
  700. > config set DhcpDdns/forward_ddns/ddns_domains[1]/dns_servers[0]/ip_address "3001:1::50:"
  701. >
  702. > config add DhcpDdns/forward_ddns/ddns_domains
  703. > config set DhcpDdns/forward_ddns/ddns_domains[2]/name "example.com."
  704. > config add DhcpDdns/forward_ddns/ddns_domains[2]/dns_servers
  705. > config set DhcpDdns/forward_ddns/ddns_domains[2]/dns_servers[0]/ip_address "172.16.2.5"
  706. >
  707. > config commit
  708. </userinput>
  709. </screen>
  710. </para>
  711. <para>
  712. Similarly, we need to construct the three reverse DDNS Domains:
  713. <table>
  714. <title>Reverse DDNS Domains Needed</title>
  715. <tgroup cols='3' align='left'>
  716. <colspec colname='num'/>
  717. <colspec colname='DDNS Domain name'/>
  718. <colspec colname='DDNS Domain DNS Servers'/>
  719. <thead>
  720. <row>
  721. <entry>#</entry>
  722. <entry>DDNS Domain Name</entry>
  723. <entry>DNS Servers</entry>
  724. </row>
  725. </thead>
  726. <tbody>
  727. <row>
  728. <entry>1.</entry>
  729. <entry>2.0.192.in-addr.arpa.</entry>
  730. <entry>172.16.1.5, 172.16.2.5</entry>
  731. </row>
  732. <row>
  733. <entry>2.</entry>
  734. <entry>1.0.0.0.8.d.b.0.1.0.0.2.ip6.arpa.</entry>
  735. <entry>3001:1::50</entry>
  736. </row>
  737. <row>
  738. <entry>3.</entry>
  739. <entry>0.182.in-addr.arpa.</entry>
  740. <entry>172.16.2.5</entry>
  741. </row>
  742. </tbody>
  743. </tgroup>
  744. </table>
  745. An address of "192.0.2.150" will match the first domain,
  746. "2001:db8:1::10" will match the second domain, and "192.0.50.77"
  747. the third domain.
  748. </para>
  749. <para>
  750. The following series of commands in bindctl will create our Reverse
  751. DDNS Domains.
  752. <screen>
  753. <userinput>
  754. > config add DhcpDdns/reverse_ddns/ddns_domains
  755. > config set DhcpDdns/reverse_ddns/ddns_domains[0]/name "2.0.192.in-addr.arpa."
  756. > config add DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers
  757. > config set DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[0]/ip_address "172.16.1.5"
  758. > config add DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers
  759. > config set DhcpDdns/reverse_ddns/ddns_domains[0]/dns_servers[1]/ip_address "172.16.2.5"
  760. >
  761. > config add DhcpDdns/reverse_ddns/ddns_domains
  762. > config set DhcpDdns/reverse_ddns/ddns_domains[1]/name "1.0.0.0.8.d.b.0.1.0.0.2.ip6.arpa."
  763. > config add DhcpDdns/reverse_ddns/ddns_domains[1]/dns_servers
  764. > config set DhcpDdns/reverse_ddns/ddns_domains[1]/dns_servers[0]/ip_address "3001:1::50:"
  765. >
  766. > config add DhcpDdns/reverse_ddns/ddns_domains
  767. > config set DhcpDdns/reverse_ddns/ddns_domains[2]/name "0.192.in-addr.arpa."
  768. > config add DhcpDdns/reverse_ddns/ddns_domains[2]/dns_servers
  769. > config set DhcpDdns/reverse_ddns/ddns_domains[2]/dns_servers[0]/ip_address "172.16.2.5"
  770. >
  771. > config commit
  772. </userinput>
  773. </screen>
  774. </para>
  775. </section> <!-- end of "d2-example" -->
  776. </section> <!-- end of section "d2-configuration" -->
  777. <section>
  778. <title>DHCP-DDNS Server Limitations</title>
  779. <para>The following are the current limitations of the DHCP-DDNS Server.</para>
  780. <itemizedlist>
  781. <listitem>
  782. <simpara>
  783. Requests received from the DHCP servers are placed in a
  784. queue until they are processed. Currently all queued requests
  785. are lost when the server shuts down.
  786. </simpara>
  787. </listitem>
  788. <listitem>
  789. <simpara>
  790. TSIG Authentication (<ulink
  791. url="http://tools.ietf.org/html/rfc2845">RFC 2845</ulink>)
  792. is not supported yet.
  793. </simpara>
  794. </listitem>
  795. </itemizedlist>
  796. </section>
  797. </chapter> <!-- DHCP-DDNS Server -->