ddns.xml 31 KB

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