1828235 Members
2239 Online
109975 Solutions
New Discussion

Nameserver setting

 
SOLVED
Go to solution
O'lnes
Regular Advisor

Nameserver setting

My new setup linux server is quite slow now when conneting (telnet)from client , someone said to me , it would be better if modify the ??? resolv.conf ??? , what nameserver should I add to? How do I modify it to improve the connection speed? Thanks.
Andy
3 REPLIES 3
I_M
Honored Contributor
Solution

Re: Nameserver setting

Hi

I guess "someone" try to give you advice that hostname resolution cause your problem.
If you want to do trouble shoot,
check following.

1) telnet to server ip
2) telnet to server hostname
3) do "nslookup client ip" on the server.
4) do "nslookup client hostname" on the server
5) do "nslookup server ip" on the client.
6) do "nslookup server hostname" on the client.

If all DNS information are configured without problem, you will find no difference in the tests.
If "telnet to IP" = "telnet to hostname", then you need to find another reason.

> what nameserver should I add?
Are they on the Internet or LAN?

Also check /etc/nsswitch.conf.
This file control which method to use when name lookup required.

good luck
Philip Burrow
New Member

Re: Nameserver setting

Slow connections like that can be caused by linux trying to do a reverse lookup on the IP that's connecting: I've noticed it particularly with SSH but I am not sure if telnetd does it.

In any case, if you're on a small LAN the chances are you wont have any name servers, so adding arbitrary ones to resolv.conf wont help.

You could try adding the client workstation to /etc/hosts, so linux will know the hostname of the IP which connects. So for example, your /etc/hosts might look like this:

127.0.0.1 banana localhost.localdomain


HTH.
Dirk Wiedemann
Respected Contributor

Re: Nameserver setting

Hello,

some fundamental informations:
in most cases there are 3 kinds of nameservices: files, dns and nis.
First check your /etc/nsswitch.conf file. In this file it is configured, which service the system use in which order.
the system tries first the first entry and so on.
for example:
hosts: files dns
means, if a programm tries to resolv a systemname from a known IP-adress or a IP-adress from a known systemname it looks first in the file /etc/hosts. If resolv is successful, procedure stops. Otherwise the system send a request to a configured dns-server. nis is not used in this example.
If dns is used, the next important file is /etc/resolv.conf. In this file you configure the ip-adress of one or more dns-servers and the domains to search for adresses.
It's a good idea to configure first files to reduce network traffic.
For configuring a dns server you of course must know if there is one reachable.

Some tips:
- if you have a dns-server its important that the dns-tables are actual. Your new linux-server must be register on the dns server in both directions (name->ip, ip->name)
- to speed up your performance you can configure you linux server as a caching only dns server. That means, the linux server cached all dns information he has once requested from the dns server.

hope this is helpful
Dirk