SLAC CPE Software Engineering Group
Stanford Linear Accelerator Center
System Admin

MCC DNS Configuration

SLAC Detailed
SLAC Computing
Software Home
Software Detailed
 

 

Programmers' Guides, Users' Guides

07-Sep-2010


DNS Configuration

DNS makes it possible to refer to IP-based systems (hosts) by human-friendly names (domain name).

Name resolution is the act of determining the IP address(es) of a given hostname. DNS basically

provides

  • Resolved hostnames to IP addresses (forward lookup)
  • Resloves IP addresses into hostnames (reverse lookup)
  • Allows machines to be logically grouped by name domains

There are two servers on LCLSDMZ, providing System Services, including DNS, to clients on controls networks. The servers are only accessible by root, and there are no NFS mounts to any servers.  Security updates will follow the same update rules as our LCLSDMZ Taylor'd servers.  We have up to 10 days for high security patches to be applied. 

The two servers are mccsrv01 as the primary and mccsrv02 as the secondary. For testing, we use lcls-prod01 for the secondary.

DNS Installation

BIND is the most widely used DNS server on the Internet. RHEL uses BIND 9. Install BIND as

below:

mount -t nfs 134.79.151.39:/share1 /nfs/nas03
yum install bind

The DNS daemon is called "named". Setup DNS daemon: named, as below:

/sbin/chkconfig --add named
/sbin/chkconfig named on
/sbin/chkconfig --list named

 

DNS Server Configuration

  • zone files in /var/named

Create/install zone files in /var/named directory. I tar'd up the /var/named directory:      ~brobeck/NAMED-2010.tar

[root@mccsrv01 ~]# ls /var/named/
127.DB MCC.DB NAMED.IN-ADDR_172_19
134.79.db MCCDEV.DB NAMED.IN-ADDR_172_21
data MCCFS0.DB NAMED.IN-ADDR_172_27
domain-name-service.cache MCCFS1.DB root-hints.ca
empty.DB named.conf slaves
GTW4.DB named.hosts WWW-MCC.DB
local.DB NAMED.IN-ADDR_134

  • /etc/named.config

Edit /etc/named.conf, a configuration file, which is read by named during dameon startup. See Apendix I.


  • Check /etc/resolv.conf

[root@mccsrv01 ~]# cat /etc/resolv.conf
domain slac.stanford.edu
search slac.stanford.edu
nameserver 127.0.0.1
options timeout:1

nameserver 134.79.18.45
nameserver 134.79.18.46
nameserver 134.79.18.40

DNS Client configuration

[jingchen@lcls-srv20 ~]$ cat /etc/resolv.conf
search slac.stanford.edu
nameserver 134.79.151.12  # mccsrv01

# will include nameserver mccsrv02
nameserver 134.79.151.11  # mcc

Test

[jingchen@lcls-srv20 ~]$ nslookup lcls-srv01
Server: 134.79.151.12
Address: 134.79.151.12#53

Name: lcls-srv01.slac.stanford.edu
Address: 172.27.8.25

Showing it uses mccsrv01 as DNS for query.

[jingchen@lcls-srv20 ~]$ host lcls-srv01 mccsrv01
Using domain server:
Name: mccsrv01
Address: 134.79.151.12#53
Aliases:

lcls-srv01.slac.stanford.edu has address 172.27.8.25

 


Apendix I - /etc/named.conf

 

   #Global options

// Default named.conf generated by install of bind-9.2.4-30.el4_8.4 
options {
directory "/var/named";                            
pid-file "/var/run/named/named.pid";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/tmp/named-memstats";

sortlist {
{ 134.79.48/22; { 134.79.48/22; }; };
{ 134.79.151/24; { 134.79.151/24; }; };
{ 134.79.176/22; { 134.79.176/22; }; };
{ 134.79.184/22; { 134.79.184/22; }; };
{ 172.19.52/22; { 172.19.52/22; }; };
{ 172.27.8/22; { 172.27.8/22; 134.79.151/24; 172.19.52/22; 134.79.176/22; }; };
};

# Server fowards queries it can't answers to SCCS DNS servers. Don't a # try root server if got no answer

forward only;   
forwarders { 134.79.18.41; 134.79.18.45; };

};
/*include "/etc/rndc.key";

controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
*/

# root zone as default

zone "." IN {
type hint;
file "domain-name-service.cache";
};

# slave server. When a slave DNS starts, it tries to conatct SCCS DNS #servers (masters) and get a current copy of the db. If the slave stores a #local copy (named.hosts), it will just ask the master for serial number of #the db, and compare and check if there is any change, and decide if the #slave uses the stored copy of db

zone "SLAC.Stanford.EDU" IN {
type slave;
file "named.hosts";
masters {
134.79.18.41; // NS4
134.79.18.45; // NS5
};
};

#loopback zone (used for X process).
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

# Reverse lookup zones. All slaves.

zone "79.134.IN-ADDR.ARPA" {
type slave;
file "NAMED.IN-ADDR_134";
masters {
134.79.18.41; // NS4
134.79.18.45; // NS5
};
};

zone "19.172.IN-ADDR.ARPA" {
type slave;
file "NAMED.IN-ADDR_172_19";
masters {
134.79.18.41; // NS4
134.79.18.45; // NS5
};
};

zone "27.172.IN-ADDR.ARPA" {
type slave;
file "NAMED.IN-ADDR_172_27";
masters {
134.79.18.41; // NS4
134.79.18.45; // NS5

};
};

zone "21.172.IN-ADDR.ARPA" {
type slave;
file "NAMED.IN-ADDR_172_21";
masters {
134.79.18.41; // NS4
134.79.18.45; // NS5
};
};

/*
The following is for our MultiHomed hosts.
We were running into issues because DNS
would return multiple IPs for our Multihomed
hosts. Now SCS will only have one IP address
per nodename with a CNAME for our Multihomed
hosts pointing to our "-LAVC" address.
ex) MCCDEV IN CNAME MCCDEV-LAVC

We will use the *.DB files to distribute IPs
to our multihomed hosts.
*/

zone "WWW-MCC.SLAC.STANFORD.EDU" {
type master;
file "WWW-MCC.DB";
};

zone "MCCDEV.SLAC.STANFORD.EDU" {
type master;
file "MCCDEV.DB";
};

zone "MCC.SLAC.STANFORD.EDU" {
type master;
file "MCC.DB";
};

zone "MCCFS0.SLAC.STANFORD.EDU" {
type master;
file "MCCFS0.DB";
};

zone "MCCFS1.SLAC.STANFORD.EDU" {
type master;
file "MCCFS1.DB";
};

zone "opi00gtw04.SLAC.STANFORD.EDU" {
type master;
file "GTW4.DB";
};

logging{
channel simple_log {
file "/var/log/named/bind.log" versions 3 size 5m;
severity info;
print-time yes;
print-severity yes;
print-category yes;
};
};


 



Programmers' Guides, Users' Guides, Requirements, Design, Papers, Administration, How-To, Hardware, IOC, Database

[SLAC CPE Software Engineering Group][ SLAC Home Page]


Created by: Ken Brobeck  07-May-2010

Modified by Jingchen Zhou 28-Aug-2010