|
NAMEgen6dns — generate IPv6 DNS address and reverse recordsSYNOPSYSgen6dns {-h|-V}gen6dns -R [-b <bits>] prefix|hostname ... gen6dns [options] [-f] [-s|-S] {-p prefix |-6 ipv4addr ...} inputfile ... gen6dns [options] [-r] [-b <bits>] [-o origin] {-p prefix |-6 ipv4addr ...} inputfile ... gen6dns [options] -d [-o origin] {-p prefix ...} {-P prefix ...} inputfile ... DESCRIPTIONWith gen6dns it is easy to generate forward and reverse DNS records for IPv6 hosts. If you have a list of hostnames and mac addresses where each host is assigned to a subnet, the command will generate AAAA and PTR records for all the hosts.It is possible and intended to use several provider prefixes to generate more than one AAAA record per host. Additionally gen6dns is able to use scope identifier to support split DNS configurations with different views. A simple example will be a network with one subnet and a couple of
hosts in it:
#name int_id / mac_address subnet_id ipad 00:17:53:85:80:3b :1: # ipad uses a mac address based id nas 0018.37ac.7801 :1: # same for nas, but different syntax laptop ::d9b2:56f3:7694:1c5c :1: # random static interface id (MS) rtr-int 00:13:35:a2:91:f3 :1: rtr-ext ::1 :0: # manually set interface id The interface identifier field can be specified as a MAC address
or a (up to 64 bit long) Interface Identifier starting with two colons. The
subnet Id is written as a hex digit string with up to 4 digits (16 Bit)
enclosed in colon characters.
gen6dns -f -S -p 2001:db8:b5b1:ab00::/56 hosts ipad IN AAAA 2001:db8:b5b1:ab01:217:53ff:fe85:803b nas IN AAAA 2001:db8:b5b1:ab01:218:37ff:feac:7801 laptop IN AAAA 2001:db8:b5b1:ab01:d9b2:56f3:7694:1c5c rtr-int IN AAAA 2001:db8:b5b1:ab01:213:35ff:fea2:91f3 rtr-ext IN AAAA 2001:db8:b5b1:ab00::1 You can also generate a list of PTR records: gen6dns -r -o example.com -p 2001:db8:b5b1:ab00::/56 hosts b.3.0.8.5.8.e.f.f.f.3.5.7.1.2.0.1.0 IN PTR ipad.example.com. 1.0.8.7.c.a.e.f.f.f.7.3.8.1.2.0.1.0 IN PTR nas.example.com. c.5.c.1.4.9.6.7.3.f.6.5.2.b.9.d.1.0 IN PTR laptop.example.com. 3.f.1.9.2.a.e.f.f.f.5.3.3.1.2.0.1.0 IN PTR rtr-int.example.com. 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0 IN PTR rtr-ext.example.com. GENERAL OPTIONS
MODE SPECIFIC OPTIONSSome of the options are only available or useful in case of generating forward DNS records, while others are only useful for reverse record generation and some are used for dynamic dns updates.
SAMPLE USAGETake a look at the example directory of the source tree for examples to use gen6dns in different secenarios (residential user, SOHO network).FILES
A file with a %%SUBNET SECTION to map subnet names to
subnet identifier.
In the following example, if the IPv6 prefix on the command line will be just a /56 (2001:db8:1:ef00::/56), only the righmost 8 bits of the subnet id will be used. So "subnet1" will result in 2001:db8:1:efb1::/64 and "subnet2" in 2001:db8:1:efb2::/64. %%SUBNET SECTION #name subnetid subnet1 :0ab1: subnet2 :0ab2: subnet3 :0001:
A file with a %%SCOPE SECTION to map IPv6 prefixes to scope
parameter. It's primary use is to put ULA names into a different view than
into the one used for global IPv6 addresses.
# # A file for scope definitions (domain names, views, and matching prefix) # %%SCOPE SECTION #name view domain matchprefix prov1 * example.de. 2003::/19 # telekom prov2 * example.de. 2a00::/22 # vodafone (arcor) glob none example.de. 2000::/3 # match on any public prefix ula intern mgmt.example.de. fd00::/8
A file with an optional %%HOST SECTION to map host (interface) names to interface identifiers and subnet id's. # # A file with host names, IID (mac address or interface identifier) and related subnet id # %% HOST SECTION #name int_id / mac_address subnet_id scope horst 00:17:53:85:80:3b clt [prov1, prov2] ns1 ::53 srv [prov1] ns2 ::d9b2:56f3:7694:1c5c srv [prov2] hugo <24h> 00:13:35:a2:91:f4 :1: [prov1, prov2, mgmt] ^ IN A 1.2.3.4 ^ IN SSHFP 1 1 1234563733937933773072370274272427e8= ^ IN SSHFP 1 2 533a563733937933773072370274272427e8= gustav.test 0013.35a2.91f5 :1: [mgmt] rtr1 ::100b:0:0:1 lo [mgmt] The name of the host is the first string in a line. If it is a
multi homed host, than it is the name of one of the interfaces of this host.
The name can be a subdomain (e.g. host.ext) and optionally followed by a TTL
specification enclosed in angle brackets.
The next field is the interface identifier, specified as the rightmost 64 bit of the IPv6 address, or as a 48 bit ethernet mac address. In the last case the usual way to write down a mac address is supported (colon or dashed seperated six bytes or dot seperated two byte hex values). In the former case the string must start with two colons, and must be specified as a 64 bit IPv6 address which could be abbreviated in the usual way. The next field is the subnet ID written as subnet id name or as the subnet id number (enclosed in colons). The last field is the list of scopes for this host entry. The list is enclosed in squared brackets with each entry delimited by comma. BUGSSome of the options are only meaningful in certain gen6dns modes.A subnet specific scope would be useful too. There are some debug commands implemented in the file parser which helps in debugging the internal data structures. %%DEBUG print-scopelist %%DEBUG print-subnetlist %%DEBUG print-prefixlistThose commands should not used during normal operation. The caret syntax of an host entry is not supported in dynamic update mode. However, this is an ugly hack anyway and will not supported in upcoming versions of gen6dns. AUTHORSWritten by Holger ZulegerCOPYRIGHTCopyright (c) 2015 by Holger Zuleger. Licensed under the BSD Licences. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.SEE ALSOnamed(8), rndc(8), soaserial(1), dig(1)
Visit the GSP FreeBSD Man Page Interface. |