Problem
Is there a document that describes how to set up a DNS architecture in a stable closed network?
Solution
This Technical Article has been implemented with SCO OpenServer6 and MP3 which runs bind8 and with later maintenance with bind9.
Setting up a DNS architecture in a stable closed network:
=========================================================Why Do We Want to Do This?
-------------------------Traditionally, using /etc/hosts has been satisfactory as a method of maintaining host and address information. This worked well when systems were not connected to the Internet, and network architectures were relatively stable and simple.
Connecting to the Internet creates several issues for a SCO server that can make reliance on a /etc/hosts file problematic.
Issues we need to consider when configuring DNS include:
First, if we are to connect to the Internet from a SCO server; if the server itself is not configured as a DNS server, then it needs to be able to access a DNS server; which means we must populate the /etc/resolv.conf file with nameserver entries. Once a nameserver(s) is configured, even in a closed network, any SVR5 binaries will by default ignore the hosts file, even if hostresorder is set.
This is because the hostresorder directive in resolv.conf is deprecated in Bind 8 and above. This can be overridden for the SVR5 binaries that are included with the O/S by modifying the /etc/netconfig file to change the resolver's library selection, but many applications (i.e. browsers, email servers etc) often have their own resolvers and will ignore the changes to the /etc/netconfig library ordering. This creates an often confusing scenario where some things appear to work fine and others don't.
The second issue is that as a network becomes more complex, even in a closed network, attempting to maintain multiple hosts files and keep them in sync can become labour intensive.
A third area of concern in a network with Internet access, is that relying on external DNS can introduce security issues, and external DNS servers are not likely to provide internal network addressing information (and, publishing your internal addressing architecture on public DNS servers can be a serious security risk).
Finally, and probably most important, is that relying on external DNS servers for internet address information can create a large performance issue. The resolver will not cache data from DNS lookups. This means that if your server has to look up the same address many times during the day (as a mail server or browsers would), every lookup is going to trigger an iterative query to an outside server. This will tie up sockets on the server, and will tie up the restricted bandwidth your organization has out to the Internet. An internal DNS server however, will cache all lookups, significantly improving performance of many server and client applications.
Architecture - closed network:
------------------------------In a closed network (i.e. one which does not have access to the Internet or where access is restricted, i.e. through a firewall or dial-up) access to name services for the worldwide web and outside email is not required for local accesses, but it may be beneficial to provide DNS services for lookups of internal systems (see above), both to centralize management of hosts information and to improve performance of TCP related services and applications.
Ideally we would want to have two primary nameservers so as to provide a degree of redundancy. The advantage of two primaries is they would both be considered authoritative. The disadvantage is the zone files on both need to be maintained.
Configuring a primary nameserver.
---------------------------------There are two ways to build the nameserver files on your SCO server.
If the network architecture is relatively simple (i.e. one subnet, one domain name, no sub-domains) you can use the h2n utility to 'build' the DNS configuration files from the hosts file. The advantage of this approach is that you can simply maintain your hosts file and then rebuild the DNS configuration files as required by re-running h2n. The disadvantage of h2n is it does not support many of the advanced capabilities of Bind 8 & 9 and does require some modifications to the hosts file to create 'usable' DNS configuration files.
The second approach is to simply write the DNS configuration files and maintain them with your favourite text editor. The advantage to this approach is that you can create as complex a DNS architecture as you like and can support all of the advanced features of Bind 8 or 9.We will address both approaches in this example.
ACME.COM - our sample domain:Assuming a domain name of acme.com with a subnet of 192.168.1.x->192.168.1.255 with the following hosts file:
# /etc/hosts file
127.0.0.1 localhost
192.168.1.1 mail1 mail1.acme.com
192.168.1.2 mail2 mail2.acme.com
192.168.1.7 gondor gondor.acme.com
192.168.1.11 server1 server1.acme.com
192.168.1.12 server2 server2.acme.com
192.168.1.13 server3 server3.acme.com
192.168.1.111 client1 client1.acme.com
192.168.1.112 client2 client2.acme.com
192.168.1.113 client3 client3.acme.com
# gondor will be our nameserverIn order to use this hosts file with h2n though, we need to make some modifications. h2n can create some special records in DNS, i.e. MX records for mail servers, if we modify the hosts file accordingly. It also assumes that every server is a potential mail destination, so adds MX records for every machine unless we explicitly tell it not to. Finally, we will typically have some machines that have aliases for different uses, and we need to ensure these are assigned correctly as DNS CNAME entries.
In the above example, our only mail servers are mail1 and mail2, with mail2 being a backup server for the domain. Also, server1 is our internal web server and we would like to access it as intranet.acme.com, server2 is our database server that we want to access as db.acme.com and finally server3 is our accounting server that we will access as acctg.acme.com
To accommodate the alias names in a hosts file, the changes we would make would be to append the aliases to the appropriate host entry and the file would look like this:
# @(#)hosts,v 6.1 1993/08/21 02:17:48 stevea Exp - STREAMware TCP/IP source
# SCCS IDENTIFICATION
127.0.0.1 localhost
192.168.1.1 mail1 mail1.acme.com
192.168.1.2 mail2 mail2.acme.com
192.168.1.7 gondor gondor.acme.com
192.168.1.11 server1 server1.acme.com intranet intranet.acme.com
192.168.1.12 server2 server2.acme.com db db.acme.com
192.168.1.13 server3 server3.acme.com acctg acctg.acme.com
192.168.1.111 client1 client1.acme.com
192.168.1.112 client2 client2.acme.com
192.168.1.113 client3 client3.acme.com
# gondor will be our nameserverPlease Note the /etc/hosts file doesn't support MX records so by default there is no way to define MX targets for the domain in a hosts file. Using hosts for name resolution normally requires that email addresses include the hostname in the address, i.e. george@mail1.acme.com as opposed to george@acme.com, as well as assuming that any host in the network can accept email, (i.e. george@client1.acme.com would bet considered a legitimate email address). There is also no way with hosts to configure email fallback in the event mail1.acme.com was down. We will therefore specify the MX values as command line arguments in h2n.
Using h2n to build our DNS configuration files:
-----------------------------------------------Prior to running h2n, we need to make a few modifications to the files to get the configuration we want. First, we need to ensure that all email will only go to mail1 and mail2 and that mail2 only act as a failover mail server.
To do this we will make a change to the hosts file. We do not want a bunch of redundant MX entries created so we will add a [no smtp] directive to all of the server lines. These changes are added in the line comments like this:
# @(#)hosts,v 6.1 1993/08/21 02:17:48 stevea Exp - STREAMware TCP/IP source
# SCCS IDENTIFICATION
127.0.0.1 localhost
192.168.1.1 mail1 mail1.acme.com
192.168.1.2 mail2 mail2.acme.com
192.168.1.7 gondor gondor.acme.com # [no smtp]
192.168.1.11 server1 server1.acme.com intranet intranet.acme.com # [no smtp]
192.168.1.12 server2 server2.acme.com db db.acme.com # [no smtp]
192.168.1.13 server3 server3.acme.com acctg acctg.acme.com # [no smtp]
192.168.1.111 client1 client1.acme.com # [no smtp]
192.168.1.112 client2 client2.acme.com # [no smtp]
192.168.1.113 client3 client3.acme.com # [no smtp]
# gondor will be our nameserverThe h2n command will generate the configuration files in the directory that you are currently in, so before running it cd to the /etc/named.d directory if you are on OSR6 or to the /etc/inet/named.d directory and then run:
# h2n -d acme.com -n 192.168.1 -m 10:mail1 -m 20:mail2h2n will complain of a missing, optional, "-s" but will create the necessary
files with an assumption. For Bind9 it is recommended to run "h2n" with the "-s LIST SERVER for all zones", eg:# h2n -d acme.com -n 192.168.1 -m 10:mail1 -m 20:mail2 -s "gondor.acme.com"To determine what version of bind you are running, run "named -v".
The -d directive tells h2n to create a forward lookup file for the acme.com domain, and the -n directive creates a reverse lookup file for the 192.168.1 subnet. The -m directives define the MX records and priority for this domain. This will create a set of files in /etc/named.d (on OSR6) or /etc/inet/named.d (on UW714):
named.conf
conf.cacheonly
db.acme
db.192.168.1
db.127.0.0It is recommended to copy or link the named.conf file to /etc where /etc/named will be expecting it, see TA127234, "h2n Creates files but named won't start", as:
# ln -s /etc/named.d/named.conf /etc/named.confIn addition for Bind9 servers add the following step:
Bind9:
-----
At ISL a /etc/named.d/root.cache file will have been created. This needs
to:# ln -s /etc/named.d/root.cache /etc/named.d/db.cache
# ln -s /etc/named.d/root.cache /etc/db.cacheThe content of these files is:named.confoptions {
directory "/etc/named.d";
};zone "0.0.127.IN-ADDR.ARPA" in { type master; file "db.127.0.0"; notify no; };
zone "acme.com" in { type master; file "db.acme"; };
zone "1.168.192.IN-ADDR.ARPA" in { type master; file "db.192.168.1"; };
zone "." in { type hint; file "db.cache"; };
conf.cacheonlyoptions {
directory "/etc/named.d";
};zone "0.0.127.IN-ADDR.ARPA" in { type master; file "db.127.0.0"; notify no; };
zone "." in { type hint; file "db.cache"; };
db.acme@ IN SOA gondor.acme.com. root.gondor.acme.com. ( 1 10800 3600 604800 86400 )
IN NS gondor.acme.com.localhost IN A 127.0.0.1mail1 IN A 192.168.1.1
mail1 IN MX 10 mail1.acme.com.
IN MX 10 mail1.acme.com.
IN MX 20 mail2.acme.com.mail2 IN A 192.168.1.2
mail2 IN MX 10 mail2.acme.com.
IN MX 10 mail1.acme.com.
IN MX 20 mail2.acme.com.Gondor IN A 192.168.1.7server1 IN A 192.168.1.11
intranet IN CNAME server1.acme.com.server2 IN A 192.168.1.12
db IN CNAME server2.acme.com.server3 IN A 192.168.1.13
acctg IN CNAME server3.acme.com.client1 IN A 192.168.1.111client2 IN A 192.168.1.112client3 IN A 192.168.1.113db.192.168.1@ IN SOA gondor.acme.com. root.gondor.acme.com. ( 1 10800 3600 604800 86400 )
IN NS gondor.acme.com.1.1.168.192.IN-ADDR.ARPA. IN PTR mail1.acme.com.
2.1.168.192.IN-ADDR.ARPA. IN PTR mail2.acme.com.
7.1.168.192.IN-ADDR.ARPA. IN PTR gondor.acme.com.
11.1.168.192.IN-ADDR.ARPA. IN PTR server1.acme.com.
12.1.168.192.IN-ADDR.ARPA. IN PTR server2.acme.com.
13.1.168.192.IN-ADDR.ARPA. IN PTR server3.acme.com.
111.1.168.192.IN-ADDR.ARPA. IN PTR client1.acme.com.
112.1.168.192.IN-ADDR.ARPA. IN PTR client2.acme.com.
113.1.168.192.IN-ADDR.ARPA. IN PTR client3.acme.com.db.127.0.0@ IN SOA gondor.acme.com. root.gondor.acme.com. ( 1 10800 3600 604800 86400 )
IN NS gondor.acme.com.1.0.0.127.IN-ADDR.ARPA. IN PTR localhost.
#You must also modify your /etc/resolv.conf file manually to
domain acme.com
search acme.com
nameserver 0.0.0.0Now restart the server.After restart you can test the server with# nslookup client1Which should return# nslookup client1
Server: gondor
Address: 0.0.0.0Name: client1.acme.com
Address: 192.168.0.111If "named" does not start, which is a requirement of "nslookup" to work, then check /usr/adm/syslog or try to start "named -d 9", ie. with further debugging which will be recorded in the 'syslog' file.
Manually creating DNS Files:
----------------------------We will need several files on each of the primary nameservers.
(Please Note: on OpenServer the default location for DNS files is /etc/named.d, on UnixWare it is /etc/inet/named.d. Also, on UnixWare the named.conf file is placed in /etc/inet as opposed to /etc/on Openserver). The following examples are from OpenServer 6.
The root.cache file already exists in this directory, and since we're not accessing the Internet it does not need to be updated.
The primary nameservers for the network should be set-up with A and PTR records for all of the systems in the network. If email is to function then there should also be MX records in these servers pointing to the central email servers.
The files required are:named.conf The configuration file for the server db.acme The forward lookup file for the domain db.192.168.1 The reverse lookup file for the domain db.127.0.0 The reverse lookup file for the loopback address
All of the files created are to go in /etc/named.d and have permissions bin:bin and 444
Copy the named.conf file created to /etc and edit the /etc/resolv.conf file to be:
domain acme.com
search acme.com
nameserver 0.0.0.0To manually create the DNS configuration for the above network, we will use a text editor to create the following files:
/etc/named.confOptions { directory "/etc/named.d"; }; zone "acme.com" in { type master; file "db.acme"; }; zone "1.168.192.in-addr.arpa" in { type master; file "db.192.168.1"; }; zone "0.0.127.in-addr.arpa" in { type master; file "db.127.0.0"; notify no; }; zone "." in { type hint; file "root.cache"; };
The root.cache file is a hints file for external lookups. Since we won't be looking up any external addresses this file is somewhat redundant, but does need to be specified here.
db.acme$TTL 21600
acme.com. IN SOA gondor.acme.com. george.acme.com. (
200811121245 ; Serial Number
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
26w ; Expire after 26 weeks
1h ; Negative TTL cache time
)
IN NS gondor.acme.com.acme.com. 6w IN MX 10 mail1.acme.com. acme.com. 6w IN MX 20 mail2.acme.com. IN TXT "my private network" localhost 6w IN A 127.0.0.1 mail1 6w IN A 192.168.1.1 mail2 6w IN A 192.168.1.2 gondor 6w IN A 192.168.1.7 server1 6w IN A 192.168.1.11 server2 6w IN A 192.168.1.12 server3 6w IN A 192.168.1.13 client1 6w IN A 192.168.1.111 client 2 6w IN A 192.168.1.112 client 3 6w IN A 192.168.1.113
intranet 6w IN CNAME server1.acme.com. db 6w IN CNAME server2.acme.com. acctg 6w IN CNAME server3.acme.com.
_____________________________________________________________________General Notes:
--------------The$TTL directive is the time to live in seconds for this information. Since this is a closed network this information should rarely change so this can be a very large number.
George.acme.com is not a machine FQDN, but the DNS naming of a contact for DNS problems, in this case it is equivalent to the email address george@acme.com The serial number is just a date string, but this should be incremented whenever any of the information in these files is changed. We've assumed there is going to be one nameserver in this domain, gondor.acme.com.
Please Note: all of the FQDN's have a period at the end. This is required.
________________________________________________________________________The 2 MX records list two internal mail exchangers for this domain. Please Note the domain name here is followed by a period. We need this so we can run email internally (although you only may have one mailserver). Note also you still need an A record for each of the mail servers.
The balance of the records are for the other machines in the network. There is no period on the ends of the names so the parent domain, acme.com, will be appended to these names to form a FQDN.
Finally, all of the records have a custom TTL of 6w or 6 weeks. As this is a private network, and if we assume it is relatively stable, we can set a very high time to live for records. The advantage of this is that any caching servers that get this information will consider it valid for a long time, eliminating the need for zone transfers from the primary, except at reboot. This also addresses the issue of the primary servers being down for maintenance.
db.192.168.1$TTL 21600
acme.com. IN SOA gondor.acme.com. george.acme.com.
(
200811121245 ; Serial Number
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
26w ; Expire after 26 weeks
1h ; Negative TTL cache time
)
IN NS gondor.acme.com.
1.168.192.in-addr.arpa. 6w IN PTR mail1.acme.com.
2.168.192.in-addr.arpa. 6w IN PTR mail2.acme.com.
7.168.192.in-addr.arpa. 6w IN PTR gondor.acme.com.
11.168.192.in-addr.arpa. 6w IN PTR server1.acme.com.
12.168.192.in-addr.arpa. 6w IN PTR server2.acme.com.
13.168.192.in-addr.arpa. 6w IN PTR server3.acme.com.
111.168.192.in-addr.arpa. 6w IN PTR client1.acme.com.
112.168.192.in-addr.arpa. 6w IN PTR client2.acme.com.
113.168.192.in-addr.arpa. 6w IN PTR client3.acme.com.db.127.0.0@ IN SOA gondor.acme.com george.acme.com (200811121245 8w 8w 8w 8w) IN NS gondor.acme.com.
1.0.0.127.in-addr.arpa. IN PTR localhost.This last file is simply needed so that a reverse lookup on 127.0.0.1 will return the correct value of localhost with no domain added. Note in the last line localhost is followed by a period. If the period is missing a reverse lookup on 127.0.0.1 would return localhost.acme.com.
Finally, create a caching file with the commands (if it doesn¿t currently exist)
touch /etc/named.d/db.cache
chown bin:bin /etc/named.d/db.cache
chmod 644 /etc/named.d/db.cacheOnce these files are created, edit the server's /etc/resolv.conf file to be:
domain acme.com
search acme.com
nameserver 127.0.0.1Reboot the server and your DNS server is running.
Repeat all of the above on a second machine to create a second primary server if desired (and obviously add A and PTR records for that machine as well as additional NS records).
Setting up caching or slave servers:
------------------------------------There are advantages in setting up caching or slave servers on all of the SCO servers running in your network. First, the caching or slave DNS server will actually consume less resources than the default resolver, and performance of TCP applications and services will be improved. Second, the caching or slave servers will continue to function even if the primary is down for the TTL of any records. The preferred method is to make the other servers slaves, as this will radically simplify management at the expense of trivial server load.
Caching Server:
---------------The caching server requires a named.conf file; a root hints file (which is created during ISL of the O/S and need not be changed) and a single zone file for the 127.0.0.1 reverse lookup. On SCO OpenServer these files are by default in /etc/named.d directory. The other two files are as follows and will be the same on any caching server:
named.confoptions {
directory "/etc/named.d";
{forwarders {192.168.1.7; };
forward only;
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "db.127.0.0";
};
zone "localhost" in {
type "master";
file "db.localhost";`
};
zone "." {
type hint;
file "root.cache";
};Please Note the forwarders directive. This tells the caching server to get all information it doesn't have from gondor, and not try to go out to the internet master servers. This is essential as we've assumed internet access doesn't exist.
db.127.0.0acme.com. IN SOA localhost. george.acme.com (200811121245 8w 8w 8w 8w) IN NS localhost. 1.0.0.127.in-addr.arpa. IN PTR localhost.
Please Note: the nameserver here is localhost. (with trailing period), not gondor.
Modify the caching servers /etc/resolv.conf file to bedomain acme.com
search acme.com
nameserver 0.0.0.0Finally, create a caching file with the commands (if it doesn't currently exist)
touch /etc/named.d/db.cache
chown bin:bin /etc/named.d/db.cache
chmod 644 /etc/named.d/db.cacheAfter creating these files, reboot the server and it will begin functioning as a caching nameserver. They will get all of their data from the master servers.
Ideally though, we would like the server to populate its cache immediately whenever it is booted. To do this all we need do is force a zone transfer on reboot after the TCP services are started. We can do this by adding a couple of lines to the /etc/rc2.d/S85tcp file as follows:
# dig @192.168.1.7 acme.com axfr
# dig @192.168.1.7 -x 192.168.1.0.32 axfrThis forces a full zone transfer of the acme.com zone and the 192.168.1.xxx reverse zones from gondor.
These lines could also be added to a cron script to be executed nightly.
Managing this configuration:In this configuration the caching nameservers will get all of their data from the primary servers and they will function until a reboot if the primaries are down. The disadvantage of the caching servers is there is no simple way to force a zone transfer to all of the caching servers when the primary is updated, except to manually trip it with the above dig commands on EACH caching server. The solution to this is to set the caching servers up as slaves instead of caching only servers.
Setting up a slave Server:
--------------------------To set up a name server we will copy the named.conf and db.127.0.0 files to the directory /etc/named.d from gondor to each slave server. We then edit the named.conf file to read:
Options { directory "/etc/named.d"; }; zone "acme.com" in { type slave; masters {192.168.1.7; }; file "named.hosts"; }; zone "1.168.192.in-addr.arpa" in { type slave; masters {192.168.1.7; }; file "named.rev"; }; zone "0.0.127.in-addr.arpa" in { type master; file "db.127.0.0"; notify no; }; zone "." in { type hint; file "root.cache"; };
Please Note: the change of type master to type slave for the acme.com and 192.168.1 networks and addition of the masters directive.
We then edit the slave servers /etc/resolv.conf file to read:
domain acme.com
search acme.comFinally, create a caching file with the commands (if it doesn¿t currently exist)
touch /etc/named.d/db.cache
chown bin:bin /etc/named.d/db.cache
chmod 644 /etc/named.d/db.cacheNow when we reboot the server, it will automatically do a zone transfer from the primary and begin functioning as a full nameserver.
Managing this configuration:
----------------------------The slave server configuration needs virtually no management on OpenServer 6MP3 as it is running BIND 9. Whenever the primary servers' serial number is incremented, the primaries will trip a bind NOTIFY to the slaves and they will transfer the zone data from the primary. This effectively automates management of the slave DNS servers as long as the serial number on the primary is incremented when changes are made.
NOTES: Troubleshooting:There is a limitation that a bind 9 can't be a slave or caching server to a bind 8. So in an environment where the primary is openserver with bind 8 uw can't be a slave or caching server.
There are issues with secure dns on UW. It seems to keep corrupting itself. This appears to be recognised as a bind 9 problem.
NOTES: Here are the actual files listed for convenience:First, a Primary DNS:
---------------------/etc/named.d:db.127.0.0 :@ IN SOA gondor.acme.com. root.gondor.acme.com. ( 1 10800 3600 604800 86400 )
IN NS gondor.acme.com.1.0.0.127.IN-ADDR.ARPA. IN PTR localhost.db.192.168.0 :@ IN SOA gondor.acme.com. root.gondor.acme.com. ( 1 10800 3600 604800 86400 )
IN NS gondor.acme.com.1.0.168.192.IN-ADDR.ARPA. IN PTR mail1.acme.com.
2.0.168.192.IN-ADDR.ARPA. IN PTR mail2.acme.com.
11.0.168.192.IN-ADDR.ARPA. IN PTR server1.acme.com.
12.0.168.192.IN-ADDR.ARPA. IN PTR server2.acme.com.
13.0.168.192.IN-ADDR.ARPA. IN PTR server3.acme.com.
111.0.168.192.IN-ADDR.ARPA. IN PTR client1.acme.com.
112.0.168.192.IN-ADDR.ARPA. IN PTR client2.acme.com.
113.0.168.192.IN-ADDR.ARPA. IN PTR client3.acme.com.
7.0.168.192.IN-ADDR.ARPA. IN PTR gondor.acme.com.
5.0.168.192.IN-ADDR.ARPA. IN PTR shire.acme.com.db.acme :@ IN SOA gondor.acme.com. root.gondor.acme.com. (
1;
10800;
3600;
604800;
86400;
)
IN NS gondor.acme.com.
IN MX 10 mail1.acme.com.
IN MX 20 mail2.acme.com.localhost IN A 127.0.0.1mail1 6w IN A 192.168.0.1mail2 IN A 192.168.0.2gondor IN A 192.168.0.7
shire IN A 192.168.0.5server1 IN A 192.168.0.11
intranet IN CNAME server1.acme.com.server2 IN A 192.168.0.12
db IN CNAME server2.acme.com.server3 6w IN A 192.168.0.13
acctg IN CNAME server3.acme.com.client1 IN A 192.168.0.111client2 IN A 192.168.0.112client3 IN A 192.168.0.113db.cache :;
; @(#) root.cache 121.1 04/04/06
;
; This file holds the information on root name servers needed to
; initialize cache of Internet domain name servers
; (e.g. reference this file in the "cache . <file>"
; configuration file of BIND domain name servers).
;
; This file is made available by InterNIC
; under anonymous FTP as
; file /domain/named.root
; on server FTP.INTERNIC.NET
; -OR- RS.INTERNIC.NET
;
; last update: Jan 29, 2004
; related version of root zone: 2004012900
;
;
; formerly NS.INTERNIC.NET
;
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
;
; formerly NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
;
; formerly C.PSI.NET
;
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
;
; formerly TERP.UMD.EDU
;
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
;
; formerly NS.NASA.GOV
;
. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
;
; formerly NS.ISC.ORG
;
. 3600000 NS F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
;
; formerly NS.NIC.DDN.MIL
;
. 3600000 NS G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
;
; formerly AOS.ARL.ARMY.MIL
;
. 3600000 NS H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
;
; formerly NIC.NORDU.NET
;
. 3600000 NS I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
;
; operated by VeriSign, Inc.
;
. 3600000 NS J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
;
; operated by RIPE NCC
;
. 3600000 NS K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
;
; operated by ICANN
;
. 3600000 NS L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12
;
; operated by WIDE
;
. 3600000 NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
; End of File/etc/named.conf :options { directory "/etc/named.d"; // listen-on {127.0.0.1; 192.168.0.7; }; // allow-query { 127.0.0.1; 192.168.0.0/24; }; };
zone "0.0.127.IN-ADDR.ARPA" in { type master; file "db.127.0.0"; notify no; };
zone "acme.com" in { type master; file "db.acme"; };
zone "0.168.192.IN-ADDR.ARPA" in { type master; file "db.192.168.0"; };
zone "." in { type hint; file "db.cache"; };
For a cached DNS:
-----------------/etc/named.d:db.0.0.127 :$TTL 86400 ; zone's default ttl 1 day
@ IN SOA localhost. hostmaster.localhost. (
2008121801 ; serial number [12/18/08 13:38:29]
10800 ; refresh 3 hours
1800 ; retry 30 minutes
14000000 ; expire 23 weeks 1 day 53 minutes 20 seconds
86400 ) ; negative caching ttl 1 day
IN NS localhost.
1 IN PTR localhost.db.localhost :$TTL 86400 ; zone's default ttl 1 day
@ IN SOA localhost. hostmaster.localhost. (
2008121801 ; serial number [12/18/08 13:38:29]
10800 ; refresh 3 hours
1800 ; retry 30 minutes
14000000 ; expire 23 weeks 1 day 53 minutes 20 seconds
86400 ) ; negative caching ttl 1 day
IN NS localhost.
IN A 127.0.0.1
IN MX 100 localhost.root.cache :0 length initiallydb.cache :0 length initally/etc/named.conf :// named.confoptions { directory "/etc/named.d"; forward only; forwarders {192.168.0.7;}; }; zone "." in { type hint; file "db.cache"; }; zone "localhost" in { type master; file "db.localhost"; }; zone "0.0.127.in-addr.arpa" in { type master; file "db.0.0.127"; }; include "/etc/named.d/.security.d/key.include" ;
For a Slave DNS:
----------------/etc/named.d:root.cache :0 length initiallydb.127.0.0 :@ IN SOA gondor.acme.com. root.gondor.acme.com. ( 1 10800 3600 604800 86400 )
IN NS gondor.acme.com.1.0.0.127.IN-ADDR.ARPA. IN PTR localhost.db.192.168.0 :; BIND version named 8.4.4 Thu Jun 09 01:14:37 PDT 2005
; BIND version SCO BUILD
; zone '0.168.192.IN-ADDR.ARPA' first transfer
; from [192.168.0.7].53:53 (local [192.168.0.5].32799) using AXFR at Tue Dec 16 18:57:59 2008
; NOT TSIG verified
$ORIGIN 168.192.IN-ADDR.ARPA.
0 86400 IN SOA gondor.acme.com. root.gondor.acme.com. (
1 10800 3600 604800 86400 )
86400 IN NS gondor.acme.com.
$ORIGIN 0.168.192.IN-ADDR.ARPA.
113 86400 IN PTR client3.acme.com.
12 86400 IN PTR server2.acme.com.
7 86400 IN PTR gondor.acme.com.
13 86400 IN PTR server3.acme.com.
1 86400 IN PTR mail1.acme.com.
2 86400 IN PTR mail2.acme.com.
111 86400 IN PTR client1.acme.com.
5 86400 IN PTR shire.acme.com.
11 86400 IN PTR server1.acme.com.
112 86400 IN PTR client2.acme.com.db.acme :; BIND version named 8.4.4 Thu Jun 09 01:14:37 PDT 2005
; BIND version SCO BUILD
; zone 'acme.com' first transfer
; from [192.168.0.7].53:53 (local [192.168.0.5].32800) using AXFR at Tue Dec 16 18:57:59 2008
; NOT TSIG verified
$ORIGIN com.
acme 86400 IN SOA gondor.acme.com. root.gondor.acme.com. (
1 10800 3600 604800 86400 )
86400 IN NS gondor.acme.com.
86400 IN MX 10 mail1.acme.com.
86400 IN MX 20 mail2.acme.com.
$ORIGIN acme.com.
server1 86400 IN A 192.168.0.11
mail2 86400 IN A 192.168.0.2
db 86400 IN CNAME server2.acme.com.
server2 86400 IN A 192.168.0.12
server3 3628800 IN A 192.168.0.13
shire 86400 IN A 192.168.0.5
client1 86400 IN A 192.168.0.111
gondor 86400 IN A 192.168.0.7
client2 86400 IN A 192.168.0.112
client3 86400 IN A 192.168.0.113
localhost 86400 IN A 127.0.0.1
acctg 86400 IN CNAME server3.acme.com.
intranet 86400 IN CNAME server1.acme.com.
mail1 3628800 IN A 192.168.0.1/etc/named.conf :options {
directory "/etc/named.d";
};zone "0.0.127.IN-ADDR.ARPA" in { type master; file "db.127.0.0"; notify no; };
zone "acme.com" in { type slave ; file "db.acme"; masters { 192.168.0.7; }; };
zone "0.168.192.IN-ADDR.ARPA" in { type slave; file "db.192.168.0"; masters { 192.168.0.7; }; };
zone "." in { type hint; file "db.cache"; };
See also
The SCO Tec Forum 2008 presentations at:
Kirk Farquhar "Deploying & Configuring a DNS Server on OpenServer 6 or UnixWare 7"
http://www.sco.com/2008forum/presentations/Farquhar_DNS_on_SCO_Servers.pdfKIrk Farquhar "Introduction to DNS and Application Issues related to DNS"
http://www.sco.com/2008forum/presentations/Farquhar_Intro_to_DNS.pdfTA127234, "h2n Creates files but named won't start"TA127256, "The latest maintenance release for my SCO Unix server upgraded bind from an earlier version to bind9. What issues might I need to consider when migrating to a later bind version?"