[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4 Files Reference

netsvc.conf File

Purpose

Specifies the ordering of certain name resolution services.

Description

The /etc/netsvc.conf file is used to specify the ordering of certain services in AIX;specifically, name resolution for sendmail, the gethostbyname, gethostaddr, and gethostent subroutines, in addition to alias resolution for sendmail.

AIX offers several services for resolving host names and aliases. gethostbyname, gethostbyaddr, and gethostent use the services for resolving names. A default is set to determine the order in which these services are tried for resolving host names and Internet Protocol (IP) addresses.

Resolving Names

The default order can be overwritten by creating the configuration file, /etc/netsvc.conf, and specifying the desired ordering. To specify the host ordering:

hosts = value [, 
value}

where value can be {bind|local|nis]

bind Uses BIND/DNS services for resolving names
local Searches the local /etc/hosts file for resolving names
nis Uses NIS services for resolving names

The environment variable NSORDER overrides the host settings in the /etc/netsvc.conf file.

Resolving Aliases

The sendmail program searches the local file /etc/aliases or uses NIS, if specified, for resolving aliases. The default can be overwritten by specifying how to resolve aliases in the /etc/netsvc.conf file. To specify alias ordering to sendmail:

alias = value [, 
value}

where value can be {files|nis]

files Searches the local /etc/aliases file for the alias
nis Uses NIS services for resolving alias

The order is specified on one line with values separated by commas. White spaces are permitted around the commas and the equal sign. The values specified and their ordering are dependent on the network configuration.

Examples

To use only /etc/hosts for resolving names, enter:

hosts = local

To use /etc/hosts for resolving names, but if the name cannot be found in /etc/hosts, then NIS is to be used, enter the following. (NIS should be running if you specify it.)

hosts = local , nis

To use NIS for resolving names and also make it authoritative and use BIND, enter:

hosts = nis = auth , bind

To override default and use only NIS for resolving aliases in sendmail, enter:

aliases = nis

Files

/etc/netsvc.conf    Specifies the path to the file.

Related Information

The sendmail command.

The gethostbyname subroutine, gethostbyaddr subroutine, and gethostent subroutine.

TCP/IP Name Resolution in AIX Version 4.3 System Management Guide: Communications and Networks


[ Previous | Next | Contents | Glossary | Home | Search ]