ddns.xml 38 KB

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