Defines parameters for the netcd daemon.
The /etc/netcd.conf file is the default configuration file for the netcd daemon. This file is part of TCP/IP in Network Support Facilities.
To change the /etc/netcd.conf file, run the stopsrc -s netcd command and then the startsrc -s netcd command. The netcd.conf file specifies the map resolvers that are cached, and supplies parameters to the netcd daemon.
A template of the netcd.conf file is provided in the /usr/samples/tcpip directory.
If you do not use any configuration files, the netcd daemon proceeds with the default values indicated later in this section.
cache <space><space><tab><tab> dns <space><space> local <tab><tab> foo
The syntax for each individual keyword is described in the following sections.
Cache description declarations
Syntax
cache <type_of_cache> <type_of_map> <hash_size> <cache_ttl>
0 to n cache declarations describe what is cached. If no such line is specified, the default line is cache all all 128 60.
The maps supported for yp are passwd.byname, passwd.byuid, group.byname, group.bygid, netid.byname, and passwd.adjunct.byname.
The hash_size parameter specifies the number of lines for the cache (a cache is a hash table). The default value is 128.
The cache_ttl parameter specifies the length of time during which an entry is kept in the cache. Its unit is minute. The value of 0 is infinite; the default value is 60. The cache_ttl parameter is not taken into account for local caches. For dns, it is not suggested to specify a non-null value, because if you specify a non-null value, it overwrites the DNS time-to-live (TTL) sent back when DNS finds the entry. Otherwise, each entry is kept in the cache for the duration of the TTL that the DNS specifies.
Security declarations
The three following declarations allow the netcd daemon to run in the secure mode (for example, security against code execution because of stack overflow):
Item | Description |
---|---|
owner <value> | Specifies the owner of the netcd daemon during its execution. The default value is root. |
group <value> | Specifies the group owner of the netcd daemon during its execution. The default value is system. |
home_dir <value> | Specifies the working directory for the netcd daemon during its execution. The default value is /. |
Log file declarations
Item | Description |
---|---|
log_file <file> | Specifies the name of the log file for the netcd daemon. The default value is /var/tmp/netcd.log. |
log_rotate <number> | Specifies the number of rotations for the log file. The default is no rotation, which is specified by not including a log_rotate declaration. |
log_size <number> | Specifies the size of the log file, in case of rotation, in KB. |
Additional declarations
Item | Description |
---|---|
net_scan_frequency <value> | Specifies the scan frequency, in minutes, of the network cache for expired entries because of TTL. The default value is 1. |
local_scan_frequency <value> | Specifies the scan frequency, in minutes, of the local files for modified dates. When a local file (for example, /etc/hosts) is detected as modified, the corresponding local cache is reloaded with the content of the file. The default value is 1. |
socket_queue_size <value> | Specifies the size of the message queue for the socket that the netcd daemon uses to communicate with the requesting applications. This value indicates how many waiting requests the netcd daemon will accept. The default value is 256. |
cache local hosts 1024
cache local all 512
cache all protocols 600 1440
cache david all 128