ddns.xml 31 KB

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