HP OpenVMS Systems Documentation |
HP TCP/IP Services for OpenVMS
|
Previous | Contents | Index |
The query options are:
Names with fewer dots are interpreted as relative names and are searched for in the domains listed in the search or domain directive in your resolver configuration.
The BIND Version 9 implementation of dig supports the specification of multiple queries on the command line (in addition to supporting the -f batch file option). Each of those queries can be supplied with its own set of flags, options, and query options.Each query argument represent an individual query in the command-line syntax. Each individual query consists of any of the standard options and flags, the name to be looked up, an optional query type and class, and any query options that are needed.
A global set of query options, which should be applied to all queries, can also be supplied. These global query options must precede the first tuple of name, class, type, options, flags, and query options supplied on the command line. Any global query options (except for the +[no]cmd option) can be overridden by a query-specific set of query options.
The following example shows how to use dig from the command line to make three lookups:
- An ANY query for www.isc.org
- A reverse lookup of 127.0.0.1
- A query for the NS records of isc.org .
#1 |
---|
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr ; <<>> DiG 9.2.0 <<>> +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38437 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 5 ;; QUESTION SECTION: ;www.isc.org. IN ANY ;; ANSWER SECTION: www.isc.org. 3421 IN CNAME isc.org. ;; AUTHORITY SECTION: isc.org. 3421 IN NS gns1.nominum.com. isc.org. 3421 IN NS gns2.nominum.com. isc.org. 3421 IN NS ns-ext.vix.com. isc.org. 3421 IN NS ns-int.vix.com. isc.org. 3421 IN NS ns1.gnac.com. ;; ADDITIONAL SECTION: ns1.gnac.com. 17389 IN A 209.182.195.77 gns1.nominum.com. 92 IN A 198.133.199.1 gns2.nominum.com. 68661 IN A 198.133.199.2 ns-ext.vix.com. 2601 IN A 204.152.184.64 ns-int.vix.com. 828 IN A 204.152.184.65 ;; Query time: 134 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Tue Nov 6 13:09:16 2001 ;; MSG SIZE rcvd: 241 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16441 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;1.0.0.127.in-addr.arpa. IN PTR ;; ANSWER SECTION: 1.0.0.127.in-addr.arpa. 86400 IN PTR localhost. ;; AUTHORITY SECTION: 0.0.127.in-addr.arpa. 86400 IN NS localhost. ;; ADDITIONAL SECTION: localhost. 86400 IN A 127.0.0.1 ;; Query time: 224 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Tue Nov 6 13:09:16 2001 ;; MSG SIZE rcvd: 93 ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9922 ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 5 ;; QUESTION SECTION: ;isc.org. IN NS ;; ANSWER SECTION: isc.org. 3421 IN NS ns-ext.vix.com. isc.org. 3421 IN NS ns-int.vix.com. isc.org. 3421 IN NS ns1.gnac.com. isc.org. 3421 IN NS gns1.nominum.com. isc.org. 3421 IN NS gns2.nominum.com. ;; ADDITIONAL SECTION: ns1.gnac.com. 17389 IN A 209.182.195.77 gns1.nominum.com. 92 IN A 198.133.199.1 gns2.nominum.com. 68661 IN A 198.133.199.2 ns-ext.vix.com. 2601 IN A 204.152.184.64 ns-int.vix.com. 828 IN A 204.152.184.65 ;; Query time: 198 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Tue Nov 6 13:09:17 2001 ;; MSG SIZE rcvd: 223 |
A global query option of +qr is applied so that dig shows the initial query it made for each lookup. The final query has a local query option of +noqr , which means that dig will not print the initial query when it looks up the NS records for isc.org .
The final portion of the output displays the following information:
- Amount of time the query took
- Server and port to which the query was sent, in the form server#port
- Date and time of the query
- Message size
The host utility allows you to look up Internet host names. By default, the host utility converts between host names and Internet addresses, but its functionality can be extended with the use of options.
host [-a"C"dlrTvw] [-c class] [-n] ["-N" ndots] ["-R" number] [-t type] ["-W" wait] name [server]
Use quotation marks to preserve the casing of uppercase options. |
The host utility is used to convert names to IP addresses and vice versa. When no arguments or options are given, the host utility prints a short summary of its command line arguments and options.
name
Specifies the domain name that is to be looked up. It can also be a dotted-decimal IPv4 address or a colon-delimited IPv6 address, in which cases the host performs a reverse lookup for that address by default.[server]
Specifies the name or IP address of the name server that the host utility should query instead of the server or servers listed in your resolver configuration.
-a
Equivalent to setting the -v option and asking the host utility to make a query of type ANY ."-C"
Displays the SOA records for zone name from all the listed authoritative name servers for that zone. The list of name servers is defined by the NS records that are found for the zone. The -C option must be enclosed in quotation marks. For example:
$ host "-C" name-c class
Makes a DNS query of class class. This can be used to look up hesiod or CHAOSnet class resource records. The default class is IN (Internet).-d
Specifies verbose output.-l
Selects list mode. This makes the host utility perform a zone transfer for zone name. The argument is provided for compatibility with older implemementations. This option is equivalent to making a query of type AXFR.-n
Specifies that reverse lookups of IPv6 addresses should use the IP6.INT domain and nibble labels, as defined in RFC 1886. The default is to use IP6.ARPA and binary labels, as defined in RFC 2874."-N" number
Sets the number of dots that have to be in the zone name for it to be considered absolute. The default value is 1. Names with fewer dots are interpreted as relative names and are searched for in the domains listed in the search path defined in the resolver configuration."-R" number
Changes the number of UDP retries for a lookup. The value for number indicates how many times the host utility repeats a query that does not get answered. The default number of retries is 1. If number is negative or zero, the number of retries defaults to 1.-r
Makes nonrecursive queries. Setting this option clears the RD (recursion desired) bit in the query that the host utility makes. This should mean that the name server receiving the query does not attempt to resolve name. The -r option enables host to mimic the behavior of a name server by making nonrecursive queries and expecting to receive answers to those queries that are usually referrals to other name servers."-T"
Uses a TCP connection when querying the name server. By default, the host utility uses UDP when making queries.TCP is automatically selected for queries that require it, such as zone transfer (AXFR) requests.
-t type
Selects the query type. type can be any recognized query type, such as CNAME, NS, SOA, SIG, KEY, or AXFR. When no query type is specified, the host utility automatically selects an appropriate query type. By default, the host utility looks for A records, but if the -C option is specified, queries are made for SOA records. If name is a dotted-decimal IPv4 address or a colon-delimited IPv6 address, the host utility queries for PTR records.-v
Generates verbose output."-W" wait
Makes the host utility wait for the number of seconds specified by wait before making the query. If wait is less than 1, the wait interval is set to 1 second.-w
Waits forever for a reply. The time to wait for a response is set to the number of seconds given by the hardware's maximum value for an integer quantity.
6.11.2 Using NSLOOKUP to Query a Name Server
The
nslookup
utility is a debugging tool provided with BIND that allows anyone to
directly query a name server and retrieve information. Use NSLOOKUP to
determine whether your local name server is running correctly or to
retrieve information from remote servers.
nslookup makes direct queries to name servers around the world to obtain DNS information, which includes the following:
The nslookup utility is deprecated. HP recommends that you use the dig utility instead. |
For online information about using the nslookup utility, enter the following command:
$ HELP TCPIP_SERVICES NSLOOKUP |
The following sections describe some problems commonly encountered with
BIND and how to solve them.
6.11.3.1 Server Not Responding
A missing client name in the BIND server's database files results in lack of service to that client. If records that point to the name servers (NS records) in a domain are missing from your server's database files, you might see the following messages:
%TCPIP-W-BIND_NOSERVNAM, Server with address 199.85.8.8 is not responding %TCPIP-E-BIND_NOSERVERS, Default servers are not available %TCPIP-W-NORECORD, Information not found -TCPIP-E-BIND_NOSERVERS, Default servers are not available |
When the CONVERT/ULTRIX BIND /DOMAIN command creates the .DB files from the hosts database, it cannot detect the existence or the names of name servers in a domain. Therefore, it does not add NS records for the name servers to the .DB files.
To solve the problem, follow these steps:
This chapter describes how to use DNS to balance the network traffic on a multihomed host or on network servers when you have multiple systems providing the same network service.
TCP/IP Services provides two methods for balancing work load using DNS:
This chapter discusses how to use DNS to balance server work load and includes the following topics:
TCP/IP Services defines the term DNS cluster to refer to
several A resource records for a single host name. This could be the A
resource records for a multihomed host or the A resource records for
one or more servers which are to share a work load.
7.2 Round-Robin Scheduling
Round-robin (or "cyclic") scheduling is the default load-sharing method used by a DNS server. If multiple resource records satisfy a query, the BIND server returns them each time in a round-robin order. The round-robin scheme is a simple rotation where client requests are passed from one cluster member to the next. The round-robin scheme is also useful for MX records to share mail loads among multiple equivalent gateways of the same MX preference.
Unlike the traditional load-balancing method, round-robin does not take into account the current work load on the DNS cluster members and does not know whether these hosts are up or down.
The following example demonstrates how round-robin load sharing works.
In the example, the DNS cluster alias is defined as robin . When the DNS server receives queries for robin , it shuffles the A resource records in a round-robin manner.
; ; TCP/IP DNS cluster load sharing - round robin method ; DNS cluster alias: "robin" robin IN A 9.20.208.47 IN A 9.20.208.30 IN A 9.20.208.72 ; birdy IN A 9.20.208.47 seagull IN A 9.20.208.30 owl IN A 9.20.208.72 ; |
A user enters the TELNET command, specifying the DNS cluster alias ROBIN. The first query to the DNS name server results in the following TELNET session:
$ TELNET ROBIN %TELNET-I-TRYING, Trying ... 9.20.208.47 %TELNET-I-SESSION, Session 01, host birdy, port 23 -TELNET-I-ESCAPE, Escape character is ^] |
The TELNET client connects to host birdy at IP address 9.20.208.47, the first resource record in the list.
The second query to the name server results in the following TELNET session:
$ TELNET ROBIN %TELNET-I-TRYING, Trying ... 9.20.208.30 %TELNET-I-SESSION, Session 01, host seagull, port 23 -TELNET-I-ESCAPE, Escape character is ^] |
The TELNET client connects to host seagull at IP address 9.20.208.30, the next resource record in the list.
The third query to the name server results in the following TELNET session:
$ TELNET ROBIN %TELNET-I-TRYING, Trying ... 9.20.208.72 %TELNET-I-SESSION, Session 01, host owl, port 23 -TELNET-I-ESCAPE, Escape character is ^] |
TELNET connects to host owl at IP address 9.20.208.72, the next resource record in the list.
The fourth query to the name server results in the following TELNET session:
$ TELNET ROBIN %TELNET-I-TRYING, Trying ... 9.20.208.47 %TELNET-I-SESSION, Session 01, host birdy, port 23 -TELNET-I-ESCAPE, Escape character is ^] |
TELNET again connects to host birdy at IP address 9.20.208.47. This is the start of the cycle repeating. The cycle repeats for the subsequent queries.
The SHOW HOST display for this DNS name server shows the shuffling effect in greater detail. Notice that the output displays the cluster alias name for each host involved in round-robin scheduling.
TCPIP> SHOW HOST ROBIN BIND database Server: 9.20.208.72 owl.ucx.ern.sea.com Host address Host name 9.20.208.47 robin.ucx.ern.sea.com 9.20.208.30 robin.ucx.ern.sea.com 9.20.208.72 robin.ucx.ern.sea.com TCPIP> SHOW HOST ROBIN BIND database Server: 9.20.208.72 owl.ucx.ern.sea.com Host address Host name 9.20.208.30 robin.ucx.ern.sea.com 9.20.208.72 robin.ucx.ern.sea.com 9.20.208.47 robin.ucx.ern.sea.com TCPIP> SHOW HOST ROBIN BIND database Server: 9.20.208.72 owl.ucx.ern.sea.com Host address Host name 9.20.208.72 robin.ucx.ern.sea.com 9.20.208.47 robin.ucx.ern.sea.com 9.20.208.30 robin.ucx.ern.sea.com TCPIP> SHOW HOST ROBIN BIND database Server: 9.20.208.72 owl.ucx.ern.sea.com Host address Host name 9.20.208.47 robin.ucx.ern.sea.com 9.20.208.30 robin.ucx.ern.sea.com 9.20.208.72 robin.ucx.ern.sea.com |
BIND Version 9 uses random cyclic scheduling, in which the server randomly chooses a starting point in the RRset and returns the records in order starting at that point, wrapping around the end of the RRset if necessary.
Previous | Next | Contents | Index |