HP-UX IP Address and Client Management Administrator's Guide HP-UX 11i v2, HP-UX 11i v3
applications and services call gethostbyname() for rainbow, an array of IP addresses is
returned and applications typically use the first IP address in the array. With the round-robin
address rotation, the name server rotates the order of the addresses returned, so connections to
rainbow are balanced among red, blue, and green.
Round-robin address cycling also affects multi-homed hosts (hosts with multiple IP addresses).
However, if a multi-homed host belongs to multiple subnets, the address records are sorted by
the resolver to favor the addresses to which the querying host is directly connected, or those that
correspond to the networks in the querying host’s sort list (specified in /etc/named.conf).
For multi-homed hosts with multiple interfaces attached to the same subnet, load sharing is not
done for outbound traffic. The transport software selects an interface for outbound traffic according
to the target IP address and uses that interface consistently, regardless of the interfaces on which
it receives inbound traffic from the target IP address.
Round-robin address cycling is enabled by default. To disable this feature, you can add the
following entry to the /etc/named.conf file:
options no-round-robin.
How BIND Resolves Host Names
This section describes the steps BIND undertakes to resolve the host name. BIND allows you to
enter host names that are not fully qualified (that is, host names that do not contain every label
from the host to the root and end with a dot), because typing complete domain names is
cumbersome.
NOTE: It is always correct to use a name that contains all the labels from the host to the root
and does not end with a dot. Names that end in a dot are not allowed in the following places:
mail addresses, the hostname command, and network-related configuration files. You can use
names that contain all the name components and end with a dot in commands like nslookup,
ping, and telnet, to facilitate the lookup process.
To resolve a host name, BIND uses the following methods:
• If the input host name ends with a dot, BIND looks it up as is, without appending any
domains to the host name.
• If the input host name contains the number of dots specified by the ndots option in the
/etc/resolv.conf file, BIND looks it up as is, before appending any domains to the host
name. (The default value of ndots is 1; therefore, if the input host name contains one dot,
it is looked up as is before any domains are appended to it.)
• If the input host name contains a single component (that is, host name without any dots),
and you have set up a host aliases file, BIND looks in your aliases file to translate the alias
to a fully qualified host name.
You can create a host aliases file for frequently used host names, as shown in the following
example file, myaliases:
john zircon.chem.purdue.edu
melody fermata.music.purdue.edu
The alias (the first field on each line) must be a single word, without any dots. john is an
alias name for zircon.chem.purdue.edu.
To use the file, set the HOSTALIASES environment variable to the name of the file, as in the
following example:
20 Overview