[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
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, enter:

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

hosts = value [, 
value}

where value can be {bind|local|nis|bind4|bind6|local4|local6|nis4|nis6]

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
bind4 Uses BIND/DNS services for resolving only IPV4 addresses
bind6 Uses BIND/DNS services for resolving only IPV6 addresses
local4 Searches the local /etc/hosts file for resolving only IPV4 addresses
local6 Searches the local /etc/hosts file for resolving only IPV6 addresses
nis4 Uses NIS services for resolving only IPV4 addresses
nis6 Uses NIS services for resolving only IPV6 addresses

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, enter:

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

If you use /etc/hosts for resolving names, but the name cannot be found in /etc/hosts, then NIS can be used (NIS should be running if you specify it.) Enter:

hosts = local , nis

To use NIS for resolving names, 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


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]