ddns.xml 29 KB

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