From 1cae4e83c69d5788f06081c16c9d78a41b8ba71b Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Thu, 26 Jun 2014 10:36:26 -0400 Subject: [PATCH] [3436] Added example JSON files for D2 Added new example files for D2: ddns/sample1.json ddns/template.json --- doc/examples/ddns/sample1.json | 112 ++++++++++++++++++++++++++++++++ doc/examples/ddns/template.json | 105 ++++++++++++++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100755 doc/examples/ddns/sample1.json create mode 100755 doc/examples/ddns/template.json diff --git a/doc/examples/ddns/sample1.json b/doc/examples/ddns/sample1.json new file mode 100755 index 0000000000..922027f515 --- /dev/null +++ b/doc/examples/ddns/sample1.json @@ -0,0 +1,112 @@ +# This is an example configuration file for D2, Kea's DHCP-DDNS processor. +# It supports updating two Forward DNS zones "four.example.com" and +# "six.example.com"; and one Reverse DNS zone, "2.0.192.in-addr.arpa." + +{ +# ------------------ DHCP-DDNS --------------------- +# +"DhcpDdns": +{ + +# -------------- Global Parameters ---------------- +# +# D2 will listen for update requests for Kea DHCP servers at 172.16.1.10 +# on port 53001. Maximum time to we will wait for a DNS server to +# respond to us is 1000 ms. + + "ip_address": "172.16.1.10", + "port": 53001, + "dns_server_timeout" : 1000, + +# +# ----------------- Forward DDNS ------------------ +# +# 1. Zone - "four.example.com. +# It uses TSIG, key name is "d2.md5.key" +# It is served by one DNS server which listens for DDNS requests at +# 172.16.1.1 on the default port 53 (standard DNS port) +# +# 2. Zone - "six.example.com." +# It does not use TSIG. +# It is server by one DNS server at "2001:db8:1::10" on port 7802 + + "forward_ddns": + { + "ddns_domains": + [ +# DdnsDomain for zone "four.example.com." + { + "name": "four.example.com.", + "key_name": "d2.md5.key", + "dns_servers": + [ + { + "ip_address": "172.16.1.1" + } + ] + }, + +# DdnsDomain for zone "six.example.com." + { + "name": "six.example.com.", + "dns_servers": + [ + { + "ip_address": "2001:db8:1::10", + "port": 7802 + } + ] + } + ] + }, + +# +# ----------------- Reverse DDNS ------------------ +# +# We will update Reverse DNS for one zone "2.0.192.in-addr-arpa". It +# uses TSIG with key "d2.sha1.key" and is served by two DNS servers: +# one listening at "172.16.1.1" on 53001 and the other at "192.168.2.10". +# + "reverse_ddns": + { + "ddns_domains": + [ + { + "name": "2.0.192.in-addr.arpa.", + "key_name": "d2.sha1.key", + "dns_servers": + [ + { + "ip_address": "172.16.1.1", + "port": 53001 + }, + { + "ip_address": "192.168.2.10" + } + ] + } + ] + }, + +# +# ------------------ TSIG keys --------------------- +# +# Each key has a name, an algorithm (HMAC-MD5, HMAC-SHA1, HMAC-SHA224...) +# and a base-64 encoded shared secret. +# + "tsig_keys": + [ + { + "name": "d2.md5.key", + "algorithm": "HMAC-MD5", + "secret": "LSWXnfkKZjdPJI5QxlpnfQ==" + }, + { + "name": "d2.sha1.key", + "algorithm": "HMAC-SHA1", + "secret": "hRrp29wzUv3uzSNRLlY68w==" + } + ] +} + +} diff --git a/doc/examples/ddns/template.json b/doc/examples/ddns/template.json new file mode 100755 index 0000000000..19bea2f87c --- /dev/null +++ b/doc/examples/ddns/template.json @@ -0,0 +1,105 @@ +# This file may be used a template for constructing DHCP-DDNS JSON +# configuration. +# +# Default values that may be omitted are '#' commented out. + +# If in a file by itself, it must start with a left-curly-bracket. +{ + +"DhcpDdns" : +{ +# +# -------------- Global Parameters ---------------- +# +# All of the global parameters have default values as shown. If these +# are satisfactory you may omit them. +# +# "ip_address" : "127.0.0.1", +# "port" : 53001, +# "dns_server_timeout" : 100, +# "ncr_protocol" : "UDP" +# "ncr_format" : "JSON" + +# +# ----------------- Forward DDNS ------------------ +# + "forward_ddns" : + { + "ddns_domains" : + [ + { + "name" : "", +# "key_name" : "", + "dns_servers" : + [ + { + "ip_address" : "" +# ,"port" : 53 + } +# , +# { +# next DNS server for this DdnsDomain +# } +# : + ] + } +# , +# { +# next Forward DdnsDomain +# } +# : + ] + }, + +# +# ----------------- Reverse DDNS ------------------ +# + "reverse_ddns" : + { + "ddns_domains" : + [ + { + "name" : "", +# "key_name" : "", + "dns_servers" : + [ + { + "ip_address" : "" +# ,"port" : 53 + } +# , +# { +# next DNS server for this DdnsDomain +# } +# : + ] + } +# , +# { +# next Reverse DdnsDomain +# } +# : + ] + }, +# +# ------------------ TSIG keys --------------------- +# + "tsig_keys" : + [ + { + "name" : "", + "algorithm" : "", +# Valid values for algorithm are: HMAC-MD5, HMAC-SHA1, +# HMAC-SHA224, HMAC-SHA256, +# HMAC-SHA384, HMAC-SHA512 + "secret" : "" + } +# , +# { +# next TSIG Key +# } + ] +} + +# If in a file by itself, it must end with an right-curly-bracket. +}