Testing:Bind

From Mandriva Community Wiki

Jump to: navigation, search
bind

Return to Testing Home

Contents

Information

  • Package: bind
  • Summary: A DNS (Domain Name System) server
  • Description: BIND (Berkeley Internet Name Domain) is an implementation of the DNS (domain Name System) protocols. BIND includes a DNS server (named), which resolves host names to IP addresses, and a resolver library (routines for applications to use when interfacing with DNS). A DNS server allows clients to name resources or objects and share the information with other network machines. The named DNS server can be used on workstations as a caching name server, but is generally only needed on one machine for an entire network. Note that the configuration files for making BIND act as a simple caching nameserver are included in the caching-nameserver package.

Test Scenarios

Test case 1

Install bind and bind-utils. In this test, we will create a simple internal domain to test bind. Our test network is described below:

intranet.mydomain 			10.0.1.0/24	Internal network
mail.intranet.mydomain			10.0.1.8	Smtp server
dhcp010 to dhcp030.intranet.mydomain 	10.0.1.10 to	workstation addresses
					10.0.1.30
dns.intranet.mydomain			10.0.1.9	Internal DNS server
gateway.intranet.mydomain		10.0.1.1	Default output route.

Next, create the file /etc/named.conf as following:

// global options
options {
    directory "/var/named";
    allow-query { 127.0.0.1; 10.0.1.0/24; };
    allow-transfer { none; };
    notify no;

};

// root servers
zone "." {
    type hint;
    file "named.ca";
};

// reverse DNS
zone "0.0.127.in-addr.arpa" {
    type master;
    file "0.0.127.in-addr.arpa";
};

// main domain
zone "intranet.mydomain" {
    type master;
    file "intranet.mydomain";
};

// main domain reverse DNS
zone "1.0.10.in-addr.arpa" {
    type master;
    file "1.0.10.in-addr.arpa";
};

// rndc key
key "rndc-key" {
    algorithm hmac-md5;
    secret "NqVZsacU5f1BK/+We21bng==";
};

// rndc control channel
controls {
    inet 127.0.0.1 port 953
        allow { 127.0.0.1; } keys { "rndc-key"; };
};

Now we generate the zone files. First, /var/named/intranet.mydomain, as follow:

$TTL 86400 ; TTL standard
$ORIGIN intranet.mydomain.

@	IN	SOA	dns.intranet.mydomain.	hostmaster.intranet.mydomain.	(
					1		; serial number
					10800		; refresh after 3 hours
					3600		; retry after 1 hour
					604800		; expire after 1 week
					86400	)	; 1 day minimum TTL

;
; nameserver
;
@	IN	NS	dns.intranet.mydomain.

;
; mailserver
; priority 10
@	IN	MX	10	mail.intranet.mydomain.

;
; server addresses
;
gateway		IN	A	10.0.1.1
mail		IN	A	10.0.1.8
dns		IN	A	10.0.1.9

;
; workstation addresses
;
$GENERATE 10-30 dhcp0$ A 10.0.1.$

;
; aliases
;
ns1	IN	CNAME	dns

;
; localhost is a exception
;
localhost	IN	A	127.0.0.1

Create the DNS reverse map /var/named/1.0.10.in-addr.arpa as following:

$TTL 86400
$ORIGIN 1.0.10.in-addr.arpa.

@	IN	SOA	dns.intranet.mydomain.	hostmaster.intranet.mydomain.	(
				1	; serial
				10800	; refresh after 3 hours
				3600	; retry after 1 hour
				604800	; expire after 1 week
				86400 )	; 1 day minimum TTL

;
; nameserver
;
@	IN	NS	dns.intranet.mydomain.

;
; reverse DNS of servers
;
1	IN	PTR	gateway.intranet.mydomain.
8	IN	PTR	mail.intranet.mydomain.
9	IN	PTR	dns.intranet.mydomain.

;
; reverse DNS of workstations
;
$GENERATE 10-30 $ PTR dhcp0$.intranet.mydomain.

Now the reverse map for local interface /var/named/0.0.127.in-addr.arpa:

$TTL 86400
$ORIGIN 0.0.127.in-addr.arpa.

@	IN	SOA	dns.intranet.mydomain.	hostmaster.intranet.mydomain. 	(
				1	; serial
				28800	; refresh
				14400	; retry
				3600000	; expire
				86400 )	; minimum

;
; nameserver
;
@	IN	NS	dns.intranet.mydomain.

;
; only this entry
;
1	IN	PTR	localhost.

Test procedure: Run on a terminal:

1. Start bind: service named start

2. Zone transfer must be denied:

dig +short @127.0.0.1 intranet.mydomain axfr
; Transfer failed

3. IP address for dhcp019.intranet.mydomain:

dig +short @127.0.0.1 dhcp019.intranet.mydomain
10.0.1.19

4. Reverse DNS for 10.0.1.19:

dig +short @127.0.0.1 -x 10.0.1.19
dhcp019.intranet.mydomain

5. MX register:

dig +short @127.0.0.1 intranet.mydomain mx
10 mail.intranet.mydomain

6. Start Of Authority (SOA):

dig +short @127.0.0.1 intranet.mydomain soa
dns.intranet.mydomain. hostmaster.intranet.mydomain 1 10800 3600 604800 86400

7. Nameserver cname:

dig +short @127.0.0.1 ns1.intranet.mydomain cname
dns.intranet.mydomain

8. Localhost reverse address:

dig +short @127.0.0.1 -x 127.0.0.1
localhost.


Testing Results

You can report the status of testing, based on the test scenario above, below. Please use the date the test(s) were completed, your name, the status of the test(s) (pass or fail), links to any bugs the tests you ran may have produced, and also note which version(s) of Mandriva Linux were tested.

Image:bug_small.png Search for open bugs against bind


Date Tester Status Bugs (if any) Version(s) Tested
Personal tools
Ad (via La Vignette)
Looking for a job?