cfgnamesrv command

Purpose

Directly manipulates domain name server entries for local resolver routines in the system configuration database.

Syntax

To Add a Name Server Entry

cfgnamesrv -add { -ipaddr IPAddress | -dname DomainName | -slist SearchList}

To Delete a Name Server Entry

cfgnamesrv -rm { -ipaddr IPAddress | -domain | -slist}

To Change a Name Server Entry

cfgnamesrv -ch DomainName

To Display a Name Server Entry

cfgnamesrv -ls [ -namesrv | -domain | -slist ]

To Create the Configuration Database File

cfgnamesrv -mk [ -ipaddr IPAddress [ -dname DomainName ] [ -slist SearchList ] ]

To Change a Search List Entry

cfgnamesrv -chslist SearchList

Description

The cfgnamesrv command adds or deletes domain name server entries for local resolver routines in the system configuration database. To add a name server entry, specify an Internet Protocol address and, optionally, a domain name.

The cfgnamesrv command can show one or all domain name server entries in the system configuration database. There are three types of domain name server entries:
  • A domain entry identifying the name of the local Internet domain.
  • A name server entry that identifies the Internet address of a domain name server for the local domain. The address must be in dotted decimal format.
  • A search list entry that lists all the domains to search when resolving hostnames. This is a space delimited list.

One domain entry and a maximum of three name server entries can exist in the system configuration database. One search entry can exist.

Flags

Flag name Description
-add Adds an entry to the system configuration database.
-ch DomainName Changes the domain name in the system configuration database.
-chslist Changes the search list.
-dname Indicates that the command deals with the domain name entry.
-domain Specifies that the operation is on the domain name. Use this flag with the -rm flag and the -ls flag.
-ipaddr IPAddress Indicates that the command deals with a name server entry. Use dotted decimal format for the given IP address.
-ls Shows all domain and name server entries in the configuration system database. If you use the -ipaddr flag, the cfgnamesrv command shows all name server entries. If you use the -domain flag, the cfgnamesrv command shows the domain name entry found in the database.
-mk Creates the system configuration database.
-namesrv Specifies that the -ls flag should print all name server entries.
-rm Deletes an entry in the system configuration database. It must be used with the -ipaddr IPAddress flag or the -domain flag. The -ipaddr flag deletes a name server entry. The -domain flag deletes the domain name entry.
-slist Specifies that the operation is on the search list. Use this flag with the -rm and -ls flag.
-slist SearchList Changes the search list in the system configuration database.

Examples

  1. To add a domain entry with a domain name of abc.aus.century.com, type:
    cfgnamesrv -add -dname abc.aus.century.com
  2. To add a name server entry with IP address 192.9.201.1, type:
    cfgnamesrv  -add  -ipaddr 192.9.201.1 
  3. To show all system configuration database entries related to domain name server information used by local resolver routines, type:
    cfgnamesrv  -ls
    The output is given in the following format:
    domain xyz.aus.century.com
    name server 192.9.201.1
  4. To set the search list abc.aus.century.com xyz.aus.century.com, type:
    cfgnamesrv -chslist abc.aus.century.com xyz.aus.century.com



Last updated: Wed, November 18, 2020