Directly manipulates domain name server entries for local resolver routines in the system configuration database.
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
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.
One domain entry and a maximum of three name server entries can exist in the system configuration database. One search entry can exist.
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. |
cfgnamesrv -add -dname abc.aus.century.com
cfgnamesrv -add -ipaddr 192.9.201.1
cfgnamesrv -ls
The
output is given in the following format: domain xyz.aus.century.com
name server 192.9.201.1
cfgnamesrv -chslist abc.aus.century.com xyz.aus.century.com