Friday, November 09, 2007

resolv.conf and inetd and telnet and reverse dns

Interesting I recently had seen on a unix box after the resolv.conf was changed, telnet sessions were taking 20 seconds to initiate.

I told the unix guys to change the name servers for their machines as we were decommissioning a dns name server. After they made the change name resolution was working as expected, however there was a 20 second delay for telnet sessions and rlogon sessions. I was able to connect via ssh without a delay. I went to troubleshoot dns with nslookup and found the expected results without delay.

My first question was how do you get unix to re-read the manually edited resolv.conf - answer is the file is read on each dns request - most unix systems I have read about linux, freebsd, and hpux all are configured like this. The idea is the operating file system cache will have the file in memory and the file is quite small. So it is true that it is read on each request.

So telnet was configured to be called from inetd, the answer for this was to restart the inet daemon. I should state rather then a restart or reload, one of the admins had found many suggested simple killing and restarting the inetd deamon.

No comments: