Translate

Thursday 29 January 2015

DNS lookup configuration

AIX offers a confusing array of options when configuring your system to be a simple DNS client. The traditional way is to create an "/etc/resolv.conf" file and add the address of up to three DNS servers e.g.

nameserver      192.168.1.40
nameserver      192.168.1.1
nameserver      10.10.1.66
domain  mydomain.local




The problem is that this configuration will only ever contact the first nameserver in the list, and only move to the next if the resolution fails, and following a timeout. This can be seen when you login to a server and it takes a long time before the password prompt appears (there could be other reasons for this).



nameserver      192.168.1.40
nameserver      192.168.1.1
nameserver      10.10.1.66
domain  mydomain.local

options rotate
options timeout:2
options attempts:2



These additional cause the server to contact the servers on a round-robin basis and to move to the next server following two failed attempts, with a two second timeout.

options debug


Those that are interested in analysing their traffic can add the debug option, however this will generate a lot of information and affect performance.


The next file to tune is "/etc/netsvc.conf":

hosts=local4,bind

In it's simplest form this statement tells AIX to resolve only IPv4 addresses and to check the "/etc/hosts" file before consulting DNS. This "local,bind" would check both IPv4 and IPv6, and reversing the order, or removing the "local" entry would give DNS absolute precedence.

It doesn't finish there as there is also a dedicated network caching daemon (netcd) which is started from the SRC (lssrc -s netcd).The daemon is controlled by the "/etc/netcd.conf" and it creates a log file: "/var/tmp/netcd.log".

There is an example configuration file in "/usr/samples/tcpip/netcd.conf".




No comments:

Post a Comment