![]() |
Reference Manual |
NAME
ns - query the configured Domain Name Server, printing all returned Resource RecordsSYNOPSIS
ns [option] IPaddr|name|domainDESCRIPTION
Command ns queries the current Domain Name Server for details of the specified IP address, fully-qualified Name or Domain.SEE ALSOAll returned Resource Records are printed in the following format:
name: type value\n
If an IP address was specified, the query is converted to a Pointer Query (irrespective of the chosen option).
If name is an alias, the canonical name is returned and the output should be analysed for an appropriate IP address.
It is quite likely that a host has more than one IP address, in which case the output should be analysed for an appropriate IP address.
Option -h queries the DNS server for Host Info about a specified host.
Option -m queries the DNS server for Mail Exchange information for the specified domain.
Option -n queries the DNS server for Name Server information for the specified domain.
Option -s queries the DNS server for Service Location information for the specified domain.
Example:
% ns nat32.com
nat32.com:A 216.215.250.99
nat32.com:NS ns9.valuetech.net
nat32.com:NS ns5.valuetech.net
ns9.valuetech.net:A 216.206.134.1
ns5.valuetech.net:A 216.28.70.171
%If a query fails, an error message is printed. In the following example, the specifed domain nat33.com does not exist, because the response from the DNS Server had the authoritative bit set.
Example:
% ns nat33.com
ERROR: Name Error [Authoritative]
%If a DNS server is not configured, a Root Server will be contacted and all returned Resource Records for a specified domain will be printed. The user should then use the setns command to set the NAT32 DNS address to an IP address in one of the returned A records and then issue an ns -n domain command to find the IP address of an authoritative Name Server for the specified domain. The setns command should then again be used to set the NAT32 DNS server to that address.
Full details of the Domain Name Service can be found in RFC 1034 and 1035.
conf, icmap, netcfg, ping, setd, setns