ddns.xml 30 KB

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