LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dns name resolution problem (https://www.linuxquestions.org/questions/linux-newbie-8/dns-name-resolution-problem-647802/)

cool47 06-08-2008 10:44 AM

dns name resolution problem
 
hello,

I have simple dns problem. I don't know how to solve it.
All are virtual machines

server:192.168.0.1, client2 to client4 ip address are 192.168.0.2 to .4

resolv.conf
search example.com
nameserver 192.168.0.1

server named file and zone file.

zone "example.com" IN {
type master;
file "example.com.zone";
};

$TTL 86400
@ IN SOA server.example.com root.server.example.com. (..... etc )

IN NS server.example.com

localhost IN A 127.0.0.1
client2 IN A 192.1680.2
client3 IN A 192.1680.3
client4 IN A 192.1680.4

can** Ping from all clients to server and clients to clients.
from clients to server all commands are working ,dig ,lynx,ping
can't *** ping from server to client.
showing name resolution error. ip is working.

I can't see any error in log messages.
when i run nslookup client2 showing some that
id missmatched expection aaaa and found bbbb (a,b-numbers).
server failed.
Is there any problem in my config file or something else ?
Thanks in advance

dkm999 06-08-2008 11:24 PM

I assume that the named is running on the server, since all the clients can resolve names to addresses. In that case, on the server only, the line in /etc/resolv.conf really ought to be
Code:

nameserver 127.0.0.1
See if that helps the server to resolve the client names into addresses.

cool47 06-09-2008 09:06 AM

No change. I install the nfs4 server in server, it can't find the ip address of the clients. it works fine if i put ip address. i disabled the selinux still not working my name resolution .

dkm999 06-09-2008 12:47 PM

I just re-read your original post in the cold light of morning, and there is a typo in your specification of client addresses in the A records. You said
Code:

client2 IN A 192.1680.2
client3 IN A 192.1680.3
client4 IN A 192.1680.4

This should be
Code:

client2 IN A 192.168.0.2
client3 IN A 192.168.0.3
client4 IN A 192.168.0.4


cool47 06-09-2008 05:12 PM

sorry for that. here i did some mistakes. In my configuration i checked everything, it is correct. I did re installation server with rhel5. No change, the same problem exists.
thanks in advance.

twlilinux 06-09-2008 05:57 PM

If everything else fails, you can always use a paid service like easyDNS.

-------
My favorite websites:
Buy and sell class notes, old exams, papers, lab reports, admission essays.
Ask and answer Linux questions.
Read free books without walking to the library.

dkm999 06-09-2008 10:53 PM

I think the next way to attack this problem is to run nslookup on your server (where the DNS translation fails) to find out what the server thinks is going on. This program will send a query to your nameserver, and tell you what the reply is. So your conversation should look like this:
Code:

$ nslookup
> client2
server 127.0.0.1
address 127.0.0.1#53

Name: client2.example.com
Address: 192.168.0.2
>

Let us know what it actually says; this may lead to a solution.

You can also try to resolve client2.example.com, and 192.168.0.2, to see what the resolver thinks of that.

cool47 06-10-2008 11:24 AM

Hello dkm999,

Yes you are right. the problem was local resolver. in log/messages -
server1 named[3325]: client 192.168.0.1 #32773:view localhost_resolver: received notify for zone 'example.com': not authoritative. server1 named [3325] running..
I am confused which files and what contents exactly change to solve this problem in rhel5.
thanks in advance.

cool47 06-10-2008 11:53 AM

Hello dkm999,

Yes i did some changes, now i can ping from server to clients. it is comming. Now the problem is nslookup.
what i did is added these lines in /etc/named.rfc.. file
zone "example.com" IN {
type master;
file "example.com.zone";
};
so i can ping from server to all clients. Now no problem for ping. i don't know this is the right way.
also i changed soa and ns records in localhost.zone and localdomain.zone to accordingly.
but nslookup fails.
server#nslookup client2
server : 127.0.0.1
address : 127.0.0.1#53
***server can't find clent2:SERVFAIL
but from client it is correct.

THANKS IN ADVANCE

dkm999 06-10-2008 03:10 PM

The SERVFAIL return (from your named process) should produce an error log message somewhere that will describe the problem. It is almost certainly a problem with your /etc/named.conf declarations, but the exact reason will be in that error message.

These error messages can be a little tough to track down, since the logging facilities for named are so complex and general. If you do not have a logging section defined in /etc/named.conf, then the errors will show up in the syslog files, if you have that set up to actually post the log entries for stuff that named sends to syslog. The syslog level that you want for these messages is probably notice (which gives you those and all more severe messages); this is set in /etc/syslog.conf.

cool47 06-11-2008 11:50 AM

Hello dkm999,

Thank you for your valuable replies. I did some more changes to var/named. whatever the files contains soa and ns made changes to according to zone file, changed the permission of zone file to 755 and modified the resolver to usuall search example.com, nameserver 192.168.0.1. Now i can do whatever i can't earlier. working perfectly, no problem. I DON'T KNOW IS THERE ANY IMPORTANT IN THESE MODIFICATION ? can you briefly explain me ? can i get example of how do i change the /etc/syslog.conf so that all the errors,warning from named to a perticular directory.

Thanks in advance.

dkm999 06-11-2008 12:32 PM

It sounds like you have a pretty solid configuration now. Congratulations.

It is essential that the named daemon configuration and the resolver configuration match. It seems that you now have accomplished that. My earlier recommendation that you make your /etc/resolv.conf file say
Code:

search example.com
nameserver 127.0.0.1

was based on an assumption that, in your /etc/named.conf file, there was something like this
Code:

options {
listen-on {127.0.0.1;}
}

If the server was told to listen only on 192.168.0.1, that would interfere with the recommended scheme, which is still preferred, because it removes a dependency in named on the address of the server.

While you are examining your /etc/named.conf, look at the section that starts out "logging {".
Within that block, there may be a set of declarations like this:
Code:

channel "syslg" {
syslog daemon;
severity info;
}

This block tells named the facility and error level of messages to send to syslog. Info will give you most messages that you will care about. The facility name will be used by syslog for message steering.

Further down in the logging block, there may be a line saying
Code:

category default {syslg;}
This tells named that it should, by default, send all messages to the channel defined earlier, pointed at the syslog daemon.

Then, in the file /etc/syslog.conf, make sure that you have a line like this:
Code:

daemon.info; mail.none;authpriv.none;cron.none        /var/log/messages
This line tells the syslog daemon that is should post any message sent to it with severity "info" or higher to the file /var/log/messages.

It might be that you will see *.info instead of daemon.info in /etc/syslog.conf. This more general spec will include all the daemon-facility messages (like the ones that we have told named to generate).

Of course, whenever you make changes to the configuration files, you need to restart the corresponding daemon (or tell it to reload).

HTH

cool47 06-12-2008 11:05 AM

Hello dkm999,

Heartily Congragulation for your response and timely guidance.
Thank you very much.


All times are GMT -5. The time now is 02:58 AM.