LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-23-2013, 01:20 AM   #1
Rafael25
Member
 
Registered: Jul 2012
Posts: 55

Rep: Reputation: Disabled
Domain name is not resolving


Hi,

I am try to set the custom name servers for my domain.
I have two name servers with two different IP Address for ns1 and ns2
I have set the ns1 and ns2 record entry in my domain zone file
But still my domain name cant be resolved.
Here is zone file content:
$TTL 14400
@ 86400 IN SOA ns1.exampl.com. andyr.exampl.com. (
2013032202 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds

exampl.com. IN NS ns1.exampl.com.
exampl.com. IN NS ns2.exampl.com.


exampl.com. IN A 12.12.12.12

ns1 IN A 12.12.12.12

ns2 IN A 12.12.12.12

localhost.exampl.com. IN A 127.0.0.1

exampl.com. IN MX 0 exampl.com.

www IN CNAME exampl.com.
ftp IN A 12.12.12.12

How can i check that my nameservers are working or not?
I have try to check with nslookp command :
root > nslookup ns1.example.com
It gives the following output:
;; Got SERVFAIL reply from 127.0.0.1, trying next server
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can't find ns1.example.com: NXDOMAIN

What more changes i have to made?
 
Old 03-23-2013, 03:51 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Quote:
How can i check that my nameservers are working or not?
You can use dig to query any of your nameservers. Eg:
Code:
dig exampl.com @ns1.exampl.com
dig ns1.exampl.com @ns2.exampl.com
Since you got a SERVFAIL, you can use some bind utilities to do tests:
Code:
 named-checkconf -z
named-checkzone exampl.com /path/to/zonefiles/exampl.com

Quote:
I have two name servers with two different IP Address for ns1 and ns2
According to the zone file posted the 2 NS have the same IP (unless you put the same because the actual IPs are masked)
Also similar to the above, the zone file posted is for the zone exampl.com and you're using nslookup to resolve ns1.example.com. I guess you're testing for the same zone name

Regards
 
Old 03-23-2013, 04:19 AM   #3
Rafael25
Member
 
Registered: Jul 2012
Posts: 55

Original Poster
Rep: Reputation: Disabled
Hi,

thanks for the reply.
I run the following commands
>>dig exampl.com @ns1.exampl.com
dig ns1.exampl.com @ns2.exampl.com

It gives the following output
Quote:
dig: couldn't get address for 'ns1.example.com': failure
dig: couldn't get address for 'ns2.example.com': failure
>>named-checkzone exampl.com /path/to/zonefiles/exampl.com

Quote:
zone exampl.com/IN: loaded serial 2013032202
OK
Should i have to put the other Ip in ns2 record?

I am unable to undestand the following:
Quote:
Also similar to the above, the zone file posted is for the zone exampl.com and you're using nslookup to resolve ns1.example.com. I guess you're testing for the same zone name
 
Old 03-23-2013, 04:48 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
dig: couldn't get address for 'ns1.example.com': failure
dig: couldn't get address for 'ns2.example.com': failure
Use the IPs instead
Code:
dig ns1.exampl.com @12.12.12.12

Quote:
zone exampl.com/IN: loaded serial 2013032202
OK
The zonefile is correct. That good.


Quote:
Should i have to put the other Ip in ns2 record?
Yes, for redundancy the 2 NS RRs are better to use different IPs


Quote:
I am unable to undestand the following:
Quote:
Also similar to the above, the zone file posted is for the zone exampl.com and you're using nslookup to resolve ns1.example.com. I guess you're testing for the same zone name
What I mean is that you mix exampl.com and example.com in your posts.
 
Old 03-23-2013, 05:15 AM   #5
Rafael25
Member
 
Registered: Jul 2012
Posts: 55

Original Poster
Rep: Reputation: Disabled
Hi,

>>dig ns1.exampl.com @12.12.12.12


Quote:
dig ns1.example.com @12.12.12.12

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.5 <<>> ns1.example.com @12.12.12.12
;; global options: printcmd
;; connection timed out; no servers could be reached
Ok i understood that i mixed up with example and exampl.
 
Old 03-23-2013, 09:05 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
dig ns1.example.com @12.12.12.12

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.5 <<>> ns1.example.com @12.12.12.12
;; global options: printcmd
;; connection timed out; no servers could be reached
You're supposed to replace 12.12.12.12 with the actual IP of your dns server
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
domain not resolving, please help pinoyskull Linux - General 2 08-16-2007 10:40 AM
Domain name to IP resolving in C++ athena_1 Programming 3 07-29-2006 08:19 AM
domain not resolving backustwo Linux - Networking 4 03-28-2006 11:17 AM
Domain name not resolving proerly Homer Glemkin Linux - Networking 1 01-26-2005 01:14 PM
Resolving my domain name to my IP Komakino Linux - Networking 4 11-13-2004 06:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration