ddns.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893
  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 (kea-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 (kea-dhcp4 and kea-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 the 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 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>kea-dhcp-ddns</command> is the Kea DHCP-DDNS server
  54. and, due to the nature of DDNS, it is run alongside either the
  55. DHCPv4 or DHCPv6 components (or both). Like other parts of
  56. Kea, it is a separate binary that can be run on its own or through
  57. <command>keactrl</command> (see <xref linkend="keactrl"/>). In
  58. normal operation, controlling <command>kea-dhcp-ddns</command>
  59. with <command>keactrl</command> is recommended. However, it is also
  60. possible to run the DHCP-DDNS server directly. It accepts the
  61. following command-line switches:
  62. </para>
  63. <itemizedlist>
  64. <listitem>
  65. <simpara>
  66. <command>-c <replaceable>file</replaceable></command> -
  67. specifies the configuration file. This is the only mandatory
  68. switch.</simpara>
  69. </listitem>
  70. <listitem>
  71. <simpara>
  72. <command>-d</command> - specifies whether the server
  73. logging should be switched to debug/verbose mode. In verbose mode,
  74. the logging severity and debuglevel specified in the configuration
  75. file are ignored and "debug" severity and the maximum debuglevel
  76. (99) are assumed. The flag is convenient, for temporarily
  77. switching the server into maximum verbosity, e.g. when
  78. debugging.</simpara>
  79. </listitem>
  80. <listitem>
  81. <simpara>
  82. <command>-v</command> - prints out Kea version and exits.
  83. </simpara>
  84. </listitem>
  85. <listitem>
  86. <simpara>
  87. <command>-V</command> - prints out Kea extended version with
  88. additional parameters and exits.
  89. </simpara>
  90. </listitem>
  91. </itemizedlist>
  92. <para>
  93. As for any Kea executable binary, the <filename>config.report</filename>
  94. file produced by <userinput>./configure</userinput> is embbeded.
  95. The command extracting it is:
  96. <screen>
  97. strings <userinput>path</userinput>/kea-dhcp-ddns | sed -n 's/;;;; //p'
  98. </screen>
  99. Beware the <userinput>path</userinput> to use for a binary
  100. in the build tree finishes by <filename>.libs</filename>.
  101. </para>
  102. <para>
  103. Upon start up the module will load its configuration and begin listening
  104. for NCRs based on that configuration.
  105. </para>
  106. </section> <!-- end start-stop -->
  107. <section id="d2-configuration">
  108. <title>Configuring the DHCP-DDNS Server</title>
  109. <para>
  110. Before starting <command>kea-dhcp-ddns</command> module for the
  111. first time, a configuration file needs to be created. The following default
  112. configuration is a template that can be customised to your requirements.
  113. <screen>
  114. <userinput>"DhcpDdns": {
  115. "ip_address": "127.0.0.1",
  116. "port": 53001,
  117. "dns_server_timeout": 100,
  118. "ncr_protocol": "UDP",
  119. "ncr_format": "JSON",
  120. "tsig_keys": [ ],
  121. "forward_ddns": {
  122. "ddns_domains": [ ]
  123. },
  124. "reverse_ddns": {
  125. "ddns_domains": [ ]
  126. }
  127. }</userinput>
  128. </screen>
  129. </para>
  130. <para>
  131. The configuration can be divided as follows, each of which is described
  132. in its own section:
  133. </para>
  134. <itemizedlist>
  135. <listitem>
  136. <simpara>
  137. <command>Global Server Parameters</command> -
  138. values which control connectivity and global server behavior
  139. </simpara>
  140. </listitem>
  141. <listitem>
  142. <simpara>
  143. <command>TSIG Key Info</command> -
  144. defines the TSIG keys used for secure traffic with DNS servers
  145. </simpara>
  146. </listitem>
  147. <listitem>
  148. <simpara>
  149. <command>Forward DDNS</command> -
  150. defines the catalog of Forward DDNS Domains
  151. </simpara>
  152. </listitem>
  153. <listitem>
  154. <simpara>
  155. <command>Reverse DDNS</command> -
  156. defines the catalog of Forward DDNS Domains
  157. </simpara>
  158. </listitem>
  159. </itemizedlist>
  160. <section id="d2-server-parameter-config">
  161. <title>Global Server Parameters</title>
  162. <itemizedlist>
  163. <listitem><simpara>
  164. <command>ip_address</command> - IP address on which D2
  165. listens for requests. The default is the local loopback interface at
  166. address 127.0.0.1. You may specify either an IPv4 or IPv6 address.
  167. </simpara></listitem>
  168. <listitem><simpara>
  169. <command>port</command> - Port on which D2 listens for requests. The default value
  170. is 53001.
  171. </simpara></listitem>
  172. <listitem><simpara>
  173. <command>dns_server_timeout</command> - The maximum amount
  174. of time in milliseconds, that D2 will wait for a response from a
  175. DNS server to a single DNS update message.
  176. </simpara></listitem>
  177. <listitem><simpara>
  178. <command>ncr_protocol</command> - Packet format to use when sending requests to D2.
  179. Currently only JSON format is supported. Other formats may be available
  180. in future releases.
  181. </simpara></listitem>
  182. <listitem><simpara>
  183. <command>ncr_format</command> - Socket protocol to use when sending requests to D2.
  184. Currently only UDP is supported. TCP may be available in an upcoming
  185. release.
  186. </simpara></listitem>
  187. </itemizedlist>
  188. <para>
  189. D2 must listen for change requests on a known address and port. By
  190. default it listens at 127.0.0.1 on port 53001. The following example
  191. illustrates how to change D2's global parameters so it will listen
  192. at 192.168.1.10 port 900:
  193. <screen>
  194. "DhcpDdns": {
  195. <userinput>"ip_address": "192.168.1.10",
  196. "port": 900,</userinput>
  197. ...
  198. }
  199. }</screen>
  200. </para>
  201. <warning>
  202. <simpara>
  203. It is possible for a malicious attacker to send bogus
  204. NameChangeRequests to the DHCP-DDNS server. Addresses
  205. other than the IPv4 or IPv6 loopback addresses (127.0.0.1
  206. or ::1) should only be used for testing purposes, but
  207. note that local users may still communicate with the
  208. DHCP-DDNS server. A future version of Kea will implement
  209. authentication to guard against such attacks.
  210. </simpara>
  211. <!-- see ticket #3514 -->
  212. </warning>
  213. <note>
  214. <simpara>
  215. If the ip_address and port are changed, it will be necessary to change the
  216. corresponding values in the DHCP servers' "dhcp-ddns" configuration section.
  217. </simpara>
  218. </note>
  219. </section> <!-- "d2-server-parameter-config" -->
  220. <section id="d2-tsig-key-list-config">
  221. <title>TSIG Key List</title>
  222. <para>
  223. A DDNS protocol exchange can be conducted with or without TSIG
  224. (defined in <ulink url="http://tools.ietf/org/html/rfc2845">RFC
  225. 2845</ulink>). This configuration section allows the administrator
  226. to define the set of TSIG keys that may be used in such
  227. exchanges.</para>
  228. <para>To use TSIG when updating entries in a DNS Domain,
  229. a key must be defined in the TSIG Key List and referenced by
  230. name in that domain's configuration entry. When D2 matches a
  231. change request to a domain, it checks whether the domain has
  232. a TSIG key associated with it. If so, D2 will use that key to
  233. sign DNS update messages sent to and verify responses received
  234. from the domain's DNS server(s). For each TSIG key required by
  235. the DNS servers that D2 will be working with there must be a
  236. corresponding TSIG key in the TSIG Key list.</para>
  237. <para>
  238. As one might gather from the name, the tsig_key section of the
  239. D2 configuration lists the TSIG keys. Each entry describes a
  240. TSIG key used by one or more DNS servers to authenticate requests
  241. and sign responses. Every entry in the list has three parameters:
  242. <itemizedlist>
  243. <listitem>
  244. <simpara>
  245. <command>name</command> -
  246. a unique text label used to identify this key within the
  247. list. This value is used to specify which key (if any) should be
  248. used when updating a specific domain. So long as it is unique its
  249. content is arbitrary, although for clarity and ease of maintenance
  250. it is recommended that it match the name used on the DNS server(s).
  251. It cannot be blank.
  252. </simpara>
  253. </listitem>
  254. <listitem>
  255. <simpara>
  256. <command>algorithm</command> -
  257. specifies which hashing algorithm should be used with this
  258. key. This value must specify the same algorithm used for the
  259. key on the DNS server(s). The supported algorithms are listed below:
  260. <itemizedlist>
  261. <listitem>
  262. <command>HMAC-MD5</command>
  263. </listitem>
  264. <listitem>
  265. <command>HMAC-SHA1</command>
  266. </listitem>
  267. <listitem>
  268. <command>HMAC-SHA224</command>
  269. </listitem>
  270. <listitem>
  271. <command>HMAC-SHA256</command>
  272. </listitem>
  273. <listitem>
  274. <command>HMAC-SHA384</command>
  275. </listitem>
  276. <listitem>
  277. <command>HMAC-SHA512</command>
  278. </listitem>
  279. </itemizedlist>
  280. This value is not case sensitive.
  281. </simpara>
  282. </listitem>
  283. <listitem>
  284. <simpara>
  285. <command>digest_bits</command> -
  286. is used to specify the minimum truncated length in bits.
  287. The default value 0 means truncation is forbidden, not 0
  288. values must be an integral number of octets, be greater
  289. than 80 and the half of the full length. Note in BIND9
  290. this parameter is appended after a dash to the algorithm
  291. name.
  292. </simpara>
  293. </listitem>
  294. <listitem>
  295. <simpara>
  296. <command>secret</command> -
  297. is used to specify the shared secret key code for this key. This value is
  298. case sensitive and must exactly match the value specified on the DNS server(s).
  299. It is a base64-encoded text value.
  300. </simpara>
  301. </listitem>
  302. </itemizedlist>
  303. </para>
  304. <para>
  305. As an example, suppose that a domain D2 will be updating is
  306. maintained by a BIND9 DNS server which requires dynamic updates
  307. to be secured with TSIG. Suppose further that the entry for
  308. the TSIG key in BIND9's named.conf file looks like this:
  309. <screen>
  310. :
  311. key "key.four.example.com." {
  312. algorithm hmac-sha224;
  313. secret "bZEG7Ow8OgAUPfLWV3aAUQ==";
  314. };
  315. :
  316. </screen>
  317. By default, the TSIG Key list is empty:
  318. <screen>
  319. "DhcpDdns": {
  320. <userinput>"tsig_keys": [ ]</userinput>,
  321. ...
  322. }
  323. </screen>
  324. We must extend the list with a new key:
  325. <screen>
  326. "DhcpDdns": {
  327. "tsig_keys": [
  328. <userinput> {
  329. "name": "key.four.example.com.",
  330. "algorithm": "HMAC-SHA224",
  331. "secret": "bZEG7Ow8OgAUPfLWV3aAUQ=="
  332. }</userinput>
  333. ],
  334. ...
  335. }
  336. </screen>
  337. </para>
  338. <para>These steps would be repeated for each TSIG key needed. Note that
  339. the same TSIG key can be used with more than one domain.</para>
  340. </section>
  341. <!-- "d2-tsig-key-list-config" -->
  342. <section id="d2-forward-ddns-config">
  343. <title>Forward DDNS</title>
  344. <para>
  345. The Forward DDNS section is used to configure D2's forward update
  346. behavior. Currently it contains a single parameter, the catalog of
  347. forward DDNS Domains, which is a list of structures.
  348. <screen>
  349. "DhcpDdns": {
  350. <userinput>"forward_ddns": {
  351. "ddns_domains": [ ]
  352. }</userinput>,
  353. ...
  354. }
  355. </screen>
  356. By default, this list is empty, which will cause the server to ignore
  357. the forward update portions of requests.
  358. </para>
  359. <section id="add-forward-ddns-domain">
  360. <title>Adding Forward DDNS Domains</title>
  361. <para>
  362. A forward DDNS Domain maps a forward DNS zone to a set of
  363. DNS servers which maintain the forward DNS data (i.e. name to
  364. address mapping) for that zone. You will need one forward DDNS
  365. Domain for each zone you wish to service. It may very well
  366. be that some or all of your zones are maintained by the same
  367. servers. You will still need one DDNS Domain per zone. Remember
  368. that matching a request to the appropriate server(s) is done
  369. by zone and a DDNS Domain only defines a single zone.
  370. </para>
  371. <para>
  372. This section describes how to add Forward DDNS Domains. Repeat these
  373. steps for each Forward DDNS Domain desired. Each Forward DDNS Domain
  374. has the following parameters:
  375. <itemizedlist>
  376. <listitem>
  377. <simpara>
  378. <command>name</command> -
  379. The fully qualified domain name (or zone) that this DDNS Domain
  380. can update. This is value used to compare against the request
  381. FQDN during forward matching. It must be unique within the
  382. catalog.
  383. </simpara>
  384. </listitem>
  385. <listitem>
  386. <simpara>
  387. <command>key_name</command> -
  388. If TSIG is used with this domain's servers, this
  389. value should be the name of the key from within the TSIG Key List
  390. to use. If the value is blank (the default), TSIG will not be
  391. used in DDNS conversations with this domain's servers.
  392. </simpara>
  393. </listitem>
  394. <listitem>
  395. <simpara>
  396. <command>dns_servers</command> -
  397. A list of one or more DNS servers which can conduct the server
  398. side of the DDNS protocol for this domain. The servers
  399. are used in a first to last preference. In other words, when D2
  400. begins to process a request for this domain it will pick the
  401. first server in this list and attempt to communicate with it.
  402. If that attempt fails, it will move to next one in the list and
  403. so on until the it achieves success or the list is exhausted.
  404. </simpara>
  405. </listitem>
  406. </itemizedlist>
  407. To create a new forward DDNS Domain, one must add a new domain
  408. element and set its parameters:
  409. <screen>
  410. "DhcpDdns": {
  411. "forward_ddns": {
  412. "ddns_domains": [
  413. <userinput>{
  414. "name": "other.example.com.",
  415. "key_name": "",
  416. "dns_servers": [
  417. ]
  418. }</userinput>
  419. ]
  420. }
  421. }
  422. </screen>
  423. It is permissible to add a domain without any servers. If that domain
  424. should be matched to a request, however, the request will fail. In
  425. order to make the domain useful though, we must add at least one DNS
  426. server to it.
  427. </para>
  428. <section id="add-forward-dns-servers">
  429. <title>Adding Forward DNS Servers</title>
  430. <para>
  431. This section describes how to add DNS servers to a Forward DDNS Domain.
  432. Repeat them for as many servers as desired for a each domain.
  433. </para>
  434. <para>
  435. Forward DNS Server entries represent actual DNS servers which
  436. support the server side of the DDNS protocol. Each Forward DNS Server
  437. has the following parameters:
  438. <itemizedlist>
  439. <listitem>
  440. <simpara>
  441. <command>hostname</command> -
  442. The resolvable host name of the DNS server. This value is not
  443. yet implemented.
  444. </simpara>
  445. </listitem>
  446. <listitem>
  447. <simpara>
  448. <command>ip_address</command> -
  449. The IP address at which the server listens for DDNS requests.
  450. This may be either an IPv4 or an IPv6 address.
  451. </simpara>
  452. </listitem>
  453. <listitem>
  454. <simpara>
  455. <command>port</command> -
  456. The port on which the server listens for DDNS requests. It
  457. defaults to the standard DNS service port of 53.
  458. </simpara>
  459. </listitem>
  460. </itemizedlist>
  461. To create a new forward DNS Server, one must add a new server
  462. element to the domain and fill in its parameters. If for
  463. example the service is running at "172.88.99.10", then set it as
  464. follows:
  465. <screen>
  466. "DhcpDdns": {
  467. "forward_ddns": {
  468. "ddns_domains": [
  469. {
  470. "name": "other.example.com.",
  471. "key_name": "",
  472. "dns_servers": [
  473. <userinput>{
  474. "hostname": "",
  475. "ip_address": "172.88.99.10",
  476. "port": 53
  477. }</userinput>
  478. ]
  479. }
  480. ]
  481. }
  482. }
  483. </screen>
  484. </para>
  485. <note><simpara>
  486. As stated earlier, "hostname" is not yet supported so, the parameter
  487. "ip_address" must be set to the address of the DNS server.
  488. </simpara></note>
  489. </section> <!-- "add-forward-dns-servers" -->
  490. </section> <!-- "add-forward-ddns-domains" -->
  491. </section> <!-- "d2-forward-ddns-config" -->
  492. <section id="d2-reverse-ddns-config">
  493. <title>Reverse DDNS</title>
  494. <para>
  495. The Reverse DDNS section is used to configure D2's reverse update
  496. behavior, and the concepts are the same as for the forward DDNS
  497. section. Currently it contains a single parameter, the catalog of
  498. reverse DDNS Domains, which is a list of structures.
  499. <screen>
  500. "DhcpDdns": {
  501. <userinput>"reverse_ddns": {
  502. "ddns_domains": [ ]
  503. }</userinput>
  504. ...
  505. }
  506. </screen>
  507. By default, this list is empty, which will cause the server to ignore
  508. the reverse update portions of requests.
  509. </para>
  510. <section id="add-reverse-ddns-domain">
  511. <title>Adding Reverse DDNS Domains</title>
  512. <para>
  513. A reverse DDNS Domain maps a reverse DNS zone to a set of DNS
  514. servers which maintain the reverse DNS data (address to name
  515. mapping) for that zone. You will need one reverse DDNS Domain
  516. for each zone you wish to service. It may very well be that
  517. some or all of your zones are maintained by the same servers;
  518. even then, you will still need one DDNS Domain entry for each
  519. zone. Remember that matching a request to the appropriate
  520. server(s) is done by zone and a DDNS Domain only defines a
  521. single zone.
  522. </para>
  523. <para>
  524. This section describes how to add Reverse DDNS Domains. Repeat these
  525. steps for each Reverse DDNS Domain desired. Each Reverse DDNS Domain
  526. has the following parameters:
  527. <itemizedlist>
  528. <listitem>
  529. <simpara>
  530. <command>name</command> -
  531. The fully qualified reverse zone that this DDNS Domain
  532. can update. This is the value used during reverse matching
  533. which will compare it with a reversed version of the request's
  534. lease address. The zone name should follow the appropriate
  535. standards: for example, to to support the IPv4 subnet 172.16.1,
  536. the name should be. "1.16.172.in-addr.arpa.". Similarly,
  537. to support an IPv6 subent of 2001:db8:1, the name should be
  538. "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa."
  539. Whatever the name, it must be unique within the catalog.
  540. </simpara>
  541. </listitem>
  542. <listitem>
  543. <simpara>
  544. <command>key_name</command> -
  545. If TSIG should be used with this domain's servers, then this
  546. value should be the name of that key from the TSIG Key List.
  547. If the value is blank (the default), TSIG will not be
  548. used in DDNS conversations with this domain's servers. Currently
  549. this value is not used as TSIG has not been implemented.
  550. </simpara>
  551. </listitem>
  552. <listitem>
  553. <simpara>
  554. <command>dns_servers</command> -
  555. a list of one or more DNS servers which can conduct the server
  556. side of the DDNS protocol for this domain. Currently the servers
  557. are used in a first to last preference. In other words, when D2
  558. begins to process a request for this domain it will pick the
  559. first server in this list and attempt to communicate with it.
  560. If that attempt fails, it will move to next one in the list and
  561. so on until the it achieves success or the list is exhausted.
  562. </simpara>
  563. </listitem>
  564. </itemizedlist>
  565. To create a new reverse DDNS Domain, one must add a new domain element
  566. and set its parameters. For example, to support subnet 2001:db8:1::,
  567. the following configuration could be used:
  568. <screen>
  569. "DhcpDdns": {
  570. "reverse_ddns": {
  571. "ddns_domains": [
  572. <userinput>{
  573. "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
  574. "key_name": "",
  575. "dns_servers": [
  576. ]
  577. }</userinput>
  578. ]
  579. }
  580. }
  581. </screen>
  582. It is permissible to add a domain without any servers. If that domain
  583. should be matched to a request, however, the request will fail. In
  584. order to make the domain useful though, we must add at least one DNS
  585. server to it.
  586. </para>
  587. <section id="add-reverse-dns-servers">
  588. <title>Adding Reverse DNS Servers</title>
  589. <para>
  590. This section describes how to add DNS servers to a Reverse DDNS Domain.
  591. Repeat them for as many servers as desired for each domain.
  592. </para>
  593. <para>
  594. Reverse DNS Server entries represents a actual DNS servers which
  595. support the server side of the DDNS protocol. Each Reverse DNS Server
  596. has the following parameters:
  597. <itemizedlist>
  598. <listitem>
  599. <simpara>
  600. <command>hostname</command> -
  601. The resolvable host name of the DNS server. This value is
  602. currently ignored.
  603. </simpara>
  604. </listitem>
  605. <listitem>
  606. <simpara>
  607. <command>ip_address</command> -
  608. The IP address at which the server listens for DDNS requests.
  609. </simpara>
  610. </listitem>
  611. <listitem>
  612. <simpara>
  613. <command>port</command> -
  614. The port on which the server listens for DDNS requests. It
  615. defaults to the standard DNS service port of 53.
  616. </simpara>
  617. </listitem>
  618. </itemizedlist>
  619. To create a new reverse DNS Server, one must first add a new server
  620. element to the domain and fill in its parameters. If for
  621. example the service is running at "172.88.99.10", then set it as
  622. follows:
  623. <screen>
  624. "DhcpDdns": {
  625. "reverse_ddns": {
  626. "ddns_domains": [
  627. {
  628. "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
  629. "key_name": "",
  630. "dns_servers": [
  631. <userinput>{
  632. "hostname": "",
  633. "ip_address": "172.88.99.10",
  634. "port": 53
  635. }</userinput>
  636. ]
  637. }
  638. ]
  639. }
  640. }
  641. </screen>
  642. </para>
  643. <note>
  644. <simpara>
  645. As stated earlier, "hostname" is not yet supported so, the parameter
  646. "ip_address" must be set to the address of the DNS server.
  647. </simpara>
  648. </note>
  649. </section> <!-- "add-reverse-dns-servers" -->
  650. </section> <!-- "add-reverse-ddns-domains" -->
  651. </section> <!-- "d2-reverse-ddns-config" -->
  652. <section id="d2-exmaple-config">
  653. <title>Example DHCP-DDNS Server Configuration</title>
  654. <para>
  655. This section provides an example DHCP-DDNS server configuration based
  656. on a small example network. Let's suppose our example network has
  657. three domains, each with their own subnet.
  658. <table>
  659. <title>Our example network</title>
  660. <tgroup cols='4' align='left'>
  661. <colspec colname='domain'/>
  662. <colspec colname='subnet'/>
  663. <colspec colname='fservers'/>
  664. <colspec colname='rservers'/>
  665. <thead>
  666. <row>
  667. <entry>Domain</entry>
  668. <entry>Subnet</entry>
  669. <entry>Forward DNS Servers</entry>
  670. <entry>Reverse DNS Servers</entry>
  671. </row>
  672. </thead>
  673. <tbody>
  674. <row>
  675. <entry>four.example.com</entry>
  676. <entry>192.0.2.0/24</entry>
  677. <entry>172.16.1.5, 172.16.2.5</entry>
  678. <entry>172.16.1.5, 172.16.2.5</entry>
  679. </row>
  680. <row>
  681. <entry>six.example.com</entry>
  682. <entry>2001:db8:1::/64</entry>
  683. <entry>3001:1::50</entry>
  684. <entry>3001:1::51</entry>
  685. </row>
  686. <row>
  687. <entry>example.com</entry>
  688. <entry>192.0.0.0/16</entry>
  689. <entry>172.16.2.5</entry>
  690. <entry>172.16.2.5</entry>
  691. </row>
  692. </tbody>
  693. </tgroup>
  694. </table>
  695. </para>
  696. <para>
  697. We need to construct three forward DDNS Domains:
  698. <table>
  699. <title>Forward DDNS Domains Needed</title>
  700. <tgroup cols='3' align='left'>
  701. <colspec colname='num'/>
  702. <colspec colname='name'/>
  703. <colspec colname='servers'/>
  704. <thead>
  705. <row>
  706. <entry>#</entry>
  707. <entry>DDNS Domain Name</entry>
  708. <entry>DNS Servers</entry>
  709. </row>
  710. </thead>
  711. <tbody>
  712. <row>
  713. <entry>1.</entry>
  714. <entry>four.example.com.</entry>
  715. <entry>172.16.1.5, 172.16.2.5</entry>
  716. </row>
  717. <row>
  718. <entry>2.</entry>
  719. <entry>six.example.com.</entry>
  720. <entry>3001:1::50</entry>
  721. </row>
  722. <row>
  723. <entry>3.</entry>
  724. <entry>example.com.</entry>
  725. <entry>172.16.2.5</entry>
  726. </row>
  727. </tbody>
  728. </tgroup>
  729. </table>
  730. As discussed earlier, FQDN to domain matching is based on the longest
  731. match. The FQDN, "myhost.four.example.com.", will match the first
  732. domain ("four.example.com") while "admin.example.com." will match the
  733. third domain ("example.com"). The
  734. FQDN, "other.example.net." will fail to match any domain and would
  735. be rejected.
  736. </para>
  737. <para>
  738. The following example configuration specified the Forward DDNS Domains.
  739. <screen><userinput>
  740. "DhcpDdns": {
  741. "forward_ddns": {
  742. "ddns_domains": [
  743. {
  744. "name": "four.example.com.",
  745. "key_name": "",
  746. "dns_servers": [
  747. { "ip_address": "172.16.1.5" },
  748. { "ip_address": "172.16.2.5" }
  749. ]
  750. },
  751. {
  752. "name": "six.example.com.",
  753. "key_name": "",
  754. "dns_servers": [
  755. { "ip_address": "2001:db8::1" }
  756. ]
  757. },
  758. {
  759. "name": "example.com.",
  760. "key_name": "",
  761. "dns_servers": [
  762. { "ip_address": "172.16.2.5" }
  763. ]
  764. },
  765. ]
  766. }
  767. }</userinput>
  768. </screen>
  769. </para>
  770. <para>
  771. Similarly, we need to construct the three reverse DDNS Domains:
  772. <table>
  773. <title>Reverse DDNS Domains Needed</title>
  774. <tgroup cols='3' align='left'>
  775. <colspec colname='num'/>
  776. <colspec colname='DDNS Domain name'/>
  777. <colspec colname='DDNS Domain DNS Servers'/>
  778. <thead>
  779. <row>
  780. <entry>#</entry>
  781. <entry>DDNS Domain Name</entry>
  782. <entry>DNS Servers</entry>
  783. </row>
  784. </thead>
  785. <tbody>
  786. <row>
  787. <entry>1.</entry>
  788. <entry>2.0.192.in-addr.arpa.</entry>
  789. <entry>172.16.1.5, 172.16.2.5</entry>
  790. </row>
  791. <row>
  792. <entry>2.</entry>
  793. <entry>1.0.0.0.8.d.b.0.1.0.0.2.ip6.arpa.</entry>
  794. <entry>3001:1::50</entry>
  795. </row>
  796. <row>
  797. <entry>3.</entry>
  798. <entry>0.182.in-addr.arpa.</entry>
  799. <entry>172.16.2.5</entry>
  800. </row>
  801. </tbody>
  802. </tgroup>
  803. </table>
  804. An address of "192.0.2.150" will match the first domain,
  805. "2001:db8:1::10" will match the second domain, and "192.0.50.77"
  806. the third domain.
  807. </para>
  808. <para>
  809. These Reverse DDNS Domains are specified as follows:
  810. <screen><userinput>
  811. "DhcpDdns": {
  812. "reverse_ddns": {
  813. "ddns_domains": [
  814. {
  815. "name": "2.0.192.in-addr.arpa.",
  816. "key_name": "",
  817. "dns_servers": [
  818. { "ip_address": "172.16.1.5" },
  819. { "ip_address": "172.16.2.5" }
  820. ]
  821. }
  822. {
  823. "name": "1.0.0.0.8.B.D.0.1.0.0.2.ip6.arpa.",
  824. "key_name": "",
  825. "dns_servers": [
  826. { "ip_address": "2001:db8::1" }
  827. ]
  828. }
  829. {
  830. "name": "0.192.in-addr.arpa.",
  831. "key_name": "",
  832. "dns_servers": [
  833. { "ip_address": "172.16.2.5" }
  834. ]
  835. }
  836. ]
  837. }
  838. }</userinput>
  839. </screen>
  840. </para>
  841. </section> <!-- end of "d2-example" -->
  842. </section> <!-- end of section "d2-configuration" -->
  843. <section>
  844. <title>DHCP-DDNS Server Limitations</title>
  845. <para>The following are the current limitations of the DHCP-DDNS Server.</para>
  846. <itemizedlist>
  847. <listitem>
  848. <simpara>
  849. Requests received from the DHCP servers are placed in a
  850. queue until they are processed. Currently all queued requests
  851. are lost when the server shuts down.
  852. </simpara>
  853. </listitem>
  854. </itemizedlist>
  855. </section>
  856. </chapter> <!-- DHCP-DDNS Server -->