ddns.xml 36 KB

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