LSF needs to match host names with the corresponding Internet host addresses. Host names and addresses can be looked up in the /etc/hosts
file, Sun's Network Information System/Yellow Pages (NIS or YP), or the Internet Domain Name Service (DNS). DNS is also known as the Berkeley Internet Name Domain (BIND) or named
, which is the name of the BIND daemon. Each UNIX host is configured to use one or more of these mechanisms.
Each host has one or more network addresses; usually one for each network to which the host is directly connected. Each host can also have more than one name. The first name configured for each address is called the official name; other names for the same host are called aliases.
LSF uses the configured host naming system on each host to look up the official host name for any alias or host address. This means that you can use aliases as input to LSF, but LSF always displays the official name.
On Digital Unix systems, the /etc/svc.conf
file controls which name service is used. On Solaris systems, the /etc/nsswitch.conf
file controls the name service. On other hosts, the following rules apply:
/etc/resolv.conf
file, your host is using DNS for name lookups
ypcat hosts
prints out a list of host addresses and names, your system is looking up names in NIS
/etc/hosts
file
The manual pages for the gethostbyname
function, the ypbind
and named
daemons, the resolver
functions, and the hosts
, svc.conf
, nsswitch.conf
, and resolv.conf
files explain host name lookups in more detail.
Hosts which have more than one network interface usually have one Internet address for each interface. Such hosts are called multi-homed hosts. LSF identifies hosts by name, so it needs to match every one of these addresses with a single host name. To do this, the host name information must be configured so that all of the Internet addresses for a host resolve to the same name.
Some system manufacturers recommend that each network interface, and therefore, each Internet address, be assigned a different host name. Each interface can then be directly accessed by name. This setup is often used to make sure NFS requests go to the nearest network interface on the file server, rather than going through a router to some other interface. Configuring this way can confuse LSF, because there is no way to determine that the two different names (or addresses) mean the same host. LSF provides a workaround for this problem.
All host naming systems can be configured so that host address lookups always return the same name, while still allowing access to network interfaces by different names. Each host has an official name and a number of aliases, which are other names for the same host. By configuring all interfaces with the same official name but different aliases, you can refer to each interface by a different alias name while still providing a single official name for the host.
Here are examples of /etc/hosts
entries. The first example is for a host with two interfaces, where the host does not have a unique official name.
# Address Official name Aliases
# Interface on network A
AA.AA.AA.AA host-AA.domain host.domain host-AA host
# Interface on network B
BB.BB.BB.BB host-BB.domain host-BB host
Looking up the address AA.AA.AA.AA
finds the official name host-AA.domain
. Looking up address BB.BB.BB.BB
finds the name host-BB.domain
. No information connects the two names, so there is no way for LSF to determine that both names, and both addresses, refer to the same host.
Here is the same example, with both addresses configured for the same official name.
# Address Official name Aliases
# Interface on network A
AA.AA.AA.AA host.domain host-AA.domain host-AA host
# Interface on network B
BB.BB.BB.BB host.domain host-BB.domain host-BB host
With this configuration, looking up either address returns host.domain
as the official name for the host. LSF (and all other applications) can determine that all the addresses and host names refer to the same host. Individual interfaces can still be specified by using the host-AA
and host-BB
aliases.
Sun's NIS uses the /etc/hosts
file on the NIS master host as input, so the format for NIS entries is the same as for the /etc/hosts
file.
The configuration format is different for DNS. The same result can be produced by configuring two address (A) records for each Internet address. Following the previous example:
# name class type address
host.domain IN A AA.AA.AA.AA
host.domain IN A BB.BB.BB.BB
host-AA.domain IN A AA.AA.AA.AA
host-BB.domain IN A BB.BB.BB.BB
Looking up the official host name can return either address. Looking up the interface-specific names returns the correct address for each interface.
Address-to-name lookups in DNS are handled using PTR records. The PTR records for both addresses should be configured to return the official name:
# address class type name
AA.AA.AA.AA.in-addr.arpa IN PTR host.domain
BB.BB.BB.BB.in-addr.arpa IN PTR host.domain
If it is not possible to change the system host name database, you can create a hosts file local to the LSF system. This file only needs to have entries for multi-homed hosts. Host names and addresses not found in this file are looked up in the standard name system on your host.