LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NameServer Resolv Performance Problem (https://www.linuxquestions.org/questions/linux-networking-3/nameserver-resolv-performance-problem-743972/)

instrumentpilot 07-30-2009 01:28 PM

NameServer Resolv Performance Problem
 
Hello folks, this morning I had a network performance problem that was not easy to troubleshoot. We had a DNS server go down and all my network connections from one linux server to another became incredibly slow.

Here it is: I had an /etc/resolv.conf file that looked like this
search mydomain.com
nameserver 192.168.1.1
nameserver 192.168.1.2
The 192.168.1.1 server went down. 192.168.1.2 took over, but it took 57 seconds to establish an ssh connection.

Can anyone help tell me why it didn't work faster? Is there something I can configure so lookup isn't wasting time with a dns server that is down? Even better would be a faster way for me to troubleshoot this.

Please help, I'd like to prevent this in the future.

P.S. I fixed the issue by reversing the order in /etc/resolv.conf

Michael Cunningham
RHCE

Suncoast 07-30-2009 07:53 PM

Some options that may help in /etc/resolv.conf

Rotate through all listed servers-Mostly for load balancing
options rotate

options timeout:2
Default value is 5, range is 2 to 30

options attempts:2
Range starts at zero.

multiples are entered on one line:
options rotate timeout:2 attempts:1

For server to server connectivity that have static IP's, consider adding entries to the hosts file. And of course when a DNS server drops or is dropped out of service, change the DHCP DNS parameter to list the up server first.

edit: Then your help desk can quickly do a dhcp renewal for windows callers with ipconfig /renew

Of course these will only work on hosts with static IP's.

Edit: And there is a sticky here from the security forum on a recent bind issue.

catkin 07-31-2009 07:03 AM

Hello Michael :)

Quote:

Please help, I'd like to prevent this in the future.
Suncoast's suggestions will help. You may also like to look at dnsmasq which will automatically choose the fastest responding DNS server.

Best

Charles

instrumentpilot 07-31-2009 10:21 AM

Thanks to both Suncoast and catkin. I'll look into both of these this morning.

Michael Cunningham
RHCE (with lots to learn)


All times are GMT -5. The time now is 10:03 AM.