Installing and Administering Internet Services

Chapter 3 125
Configuring and Administering the BIND Name Service
Configuring the Resolver to Set Timeout Values
Configuring the Resolver to Set Timeout
Values
Timeout values are configured for clients (resolver routines) that use
DNS with the RES_RETRY and RES_RETRANS options. These options
allow you to set the number of re-transmissions (RES_RETRY) and the
time between each retransmission (RES_RETRANS). Setting smaller
timeout values enable you to get better performance. You can configure
the timeout values by defining environment variables, editing the
/etc/resolv.conf configuration file, or using the resolver APIs.
Valid values for RES_RETRY and RES_RETRANS options are any
positive, non-zero integer. By default, the system will try to re-transmit 4
times, and the time between each retransmission is 5000 milliseconds.
If the RES_RETRY and RES_RETRANS options contain an invalid
value, the default values are set and an error message is logged in the
syslog. The returned values of the APIs will indicate if the values
specified were valid or not.
Configuring Timeout Values using Environment
Variables
You can set the RES_RETRY and RES_RETRANS options by defining
them as environment variables. Setting the timeout values using
environment variables only sets the RES_RETRY and RES_RETRANS
values for individual users.
Set the environment variable with the export command, typing the
following at the prompt:
export RES_RETRY=1
export RES_RETRANS=300
The variable values, 1 and 300, can be replaced with another value.
The value for RES_RETRANS should not be less than 200
milliseconds.