AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  Recommended methods to deal with DNS Timeouts

    Posted Mon June 11, 2007 07:34 PM

    Originally posted by: nh4aix


    Hello...

    we are seeing some DNS timeouts... What methods have worked for other folks in dealing with this? Debating one option setting variables in /etc/environment vs. tuning in resolv.conf.

    Having never worked DNS timeouts before, interested to see what worked for others...

    Thanks....
    #AIX-Forum


  • 2.  Re: Recommended methods to deal with DNS Timeouts

    Posted Tue June 12, 2007 10:27 AM

    Originally posted by: SystemAdmin


    I do think that, you need to tune/work on both /etc/resolv.conf as well as the time out variables on /etc/environment.following information might give you some idea about time out variables.
    Following is best practice to avoid the long wait by client before it times out on particular DNS SERVER.

    Configure multiple nameserver directives - the resolv.conf file should contain multiple DNS Servers to ensure DNS resolution resilience. Having more than one nameserver directive will ensure that the resolver will query other servers if the first nameserver doesn't respond. The resolver queries the name servers in the order in which they are entered in the resolv.conf.
    Configure options retry - The options retry directive sets the number of times the resolver will query each nameserver. Since DNS resolution takes place over UDP, it is wise to instruct the resolver to issue at least one retry to a name server before giving up and moving on to the next name server in the list.
    Configure options retrans - The options retrans directive sets the retransmit timeout in seconds that the resolver should wait before timing out. By setting this value to 1 second, you can ensure that the resolver doesn't take too long between queries to a particular name server.
    1. export RES_RETRY=8

    1. export RES_TIMEOUT=2

    These variables can be added on /etc/environment

    Default AIX takes 75 seconds for timeout,with above configuration the timeout is 8+16=24 seconds
    #AIX-Forum


  • 3.  Re: Recommended methods to deal with DNS Timeouts

    Posted Wed June 13, 2007 08:10 AM

    Originally posted by: SystemAdmin


    At the risk of sounding trite the way to deal with DNS timeouts is to not have them. In a normal environment this should never happen. Why is it happening to you? If your nameserver is going down then you should get a better nameserver. If you need to be able to resolve some hostnames come what may then you should have them in /etc/hosts and set your /etc/netsvc.conf to ensure that the hosts file is searched first.

    HTH

    Jim Lane
    #AIX-Forum


  • 4.  Re: Recommended methods to deal with DNS Timeouts

    Posted Fri June 15, 2007 09:15 AM

    Originally posted by: nh4aix



    Thanks to all for your suggestions... these look very helpful.
    #AIX-Forum


  • 5.  Re: Recommended methods to deal with DNS Timeouts

    Posted Tue June 19, 2007 11:52 AM

    Originally posted by: SystemAdmin


    We had this same problem a couple of months ago. We needed a way to make the retries 'faster' than the 75 seconds for each call. The 75 sec timeout period comes from two values in /etc/environment called RES_RETRY and RES_TIMEOUT. The way it works is the dns client will try to contact the dns server, then if it doesn't get an answer back it will wait 5 seconds and try again, then it will wait 10 secs and try again, 20 sec and try again, 40 secs and try again.... and thats for each IP address in the /etc/resolv.conf file before it goes to the local information.
    .
    5 + 10 + 20 + 40 = 75 secs

    To prevent this from happening, IBM made this recommendation and its worked great:
    edit /etc/environment for these settings:

    1. DNS variables to cut down number and interval of retries
    export RES_RETRY=1
    export RES_TIMEOUT=2

    Hope this helps,
    Sherry

    #AIX-Forum


  • 6.  Re: Recommended methods to deal with DNS Timeouts

    Posted Tue June 19, 2007 11:57 AM

    Originally posted by: SystemAdmin


    We had this same problem a couple of months ago. We needed a way to make the retries 'faster' than the 75 seconds for each call. The 75 sec timeout period comes from two values in /etc/environment called RES_RETRY and RES_TIMEOUT. The way it works is the dns client will try to contact the dns server, then if it doesn't get an answer back it will wait 5 seconds and try again, then it will wait 10 secs and try again, 20 sec and try again, 40 secs and try again.... and thats for each IP address in the /etc/resolv.conf file.

    5 + 10 + 20 + 40 = 75 secs
    (If you have the DNS server addresses in /etc/hosts this may not be a problem.)
    To prevent this from happening, IBM made this recommendation and its worked great:
    edit /etc/environment for these settings:

    1. DNS variables to cut down number and interval of retries
    export RES_RETRY=1
    export RES_TIMEOUT=2

    Hope this helps,
    Sherry

    #AIX-Forum