DNS 2 : Starting and testing

Start Bind

[root@dlp ~]# systemctl start named.service

Starting named: [ OK ]

[root@dlp ~]# chkconfig named on

[root@dlp ~]# nano /etc/sysconfig/network-scripts/ifcfg-eth0
DNS1=10.0.0.30

This is optional and depends on your own configuration.

Make sure server can resolve domain names or IP addresses.

Change settings where server to name resolution.

Dig is the tools to test the name service.

[root@dlp ~]# dig dlp.server.world. #(note the final dot . )
; <<>> DiG 9.8.1-RedHat-9.8.1-2.fc16 <<>> dlp.server.world.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7450

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:

;dlp.server.world.
IN
A
;; ANSWER SECTION:

dlp.server.world.
86400
IN
A
10.0.0.30
# normally answered
;; AUTHORITY SECTION:

server.world.
86400
IN
NS
dlp.server.world.
;; Query time: 0 msec
;; SERVER: 10.0.0.30#53(10.0.0.30)
;; WHEN: Wed Nov 9 07:34:22 2011

;; MSG SIZE rcvd: 64
[root@dlp ~]#
dig -x 10.0.0.30
; <<>> DiG 9.8.1-RedHat-9.8.1-2.fc16 <<>> -x 10.0.0.30
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14612

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:

;30.0.0.10.in-addr.arpa.
IN
PTR
;; ANSWER SECTION:

30.0.0.10.in-addr.arpa.
86400
IN
PTR
dlp.server.world.
# normally answered
;; AUTHORITY SECTION:

0.0.10.in-addr.arpa.
86400
IN
NS
dlp.server.world.
;; ADDITIONAL SECTION:

dlp.server.world.
86400
IN
A
10.0.0.30
;; Query time: 0 msec
;; SERVER: 10.0.0.30#53(10.0.0.30)
;; WHEN: Wed Nov 9 07:35:14 2011
;; MSG SIZE rcvd: 100

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s