HP OpenVMS Systems Documentation
HP TCP/IP Services for OpenVMS
Sends domain name query packets to name servers.
dig [@server] domain [query-type] [query-class] [+query-option] [-dig-option] [%comment]
Domain Information Groper ( dig ) is a flexible command line utility you can use to gather information from Domain Name System servers. The dig utility has two modes: simple interactive mode, which makes a single query; and batch mode, which executes a query for each query in a list of several query lines. All query options are accessible from the command line.
serverEither a domain name or an IP address expressed in dotted-decimal notation. If this optional field is omitted, dig attempts to use the default name server for your machine.
If you specify a domain name, dig resolves the query using the domain name resolver (BIND). If your system does not support DNS, you may have to specify an network address in dotted-decimal notation. Alternatively, if a DNS server is available, that server must be listed in the local hosts database.
domainThe domain name for which you are requesting information. See the -x option for a convenient way to specify a reverse translation address query.
query-typeThe type of information (DNS query type) that you are requesting. If you omit this parameter, the default value for query-type is a (network address). BIND recognizes the following query types:
Query Type Query Class Description a T_A Network address any T_ANY All information about the specified domain mx T_MX Mail exchanger for the domain ns T_NS Name servers soa T_SOA Zone of authority record hinfo T_HINFO Host information axfr T_AXFR Zone transfer (must ask an authoritative server) txt T_TXT Arbitrary number of strings (see RFC 1035 for the complete list)
query-classThe network class requested in the query. If you moit this parameter, the default is in (C_IN, Internet class domain). BIND recognizes the following classes:
Query Type Query Class Description in C_IN Internet class domain any C_ANY All class information
See RFC 1035 for a complete list of query classes.
You can use the query-class any statement to specify a class or a type of query. dig parses the first occurrence of any to mean query-type = T_ANY . To specify query-class = C_ANY , you must either specify any twice or set query-class using the -c option.
%ignored-commentUse the percent (%) character to include an argument that is not parsed. This can be useful if you are running dig in batch mode. Instead of resolving every @server-domain-name in a list of queries, you can avoid the overhead of doing so, and still have the domain name on the command line as a reference. For example:
dig @18.104.22.168 %venera.isi.edu mx isi.edu
-<dig-option>Use the hyphen (-) character to specify an option that affects the operation of dig . The options described in the Table A-1 are currently available (although not guaranteed to be useful). Options that are uppercase characters must be specified in quotes. For example, dig -"P"
Table A-1 dig Options Option Description -x dot-notation-address Convenient form for specifing reverse translation of IP address. Instead of:dig 22.214.171.124.in-addr.arpa
you can use:dig -x 126.96.36.199
-f file File for dig batch mode. The file contains a list of query specifications ( dig command lines) that are to be executed successively. Lines beginning with ;, #, or \n are ignored. Other options can still appear on the command line and will be in effect for each batch query. "-T" time Time (in seconds) between the start of successive queries when running in batch mode. Can be used to keep two or more batch dig commands running synchronously. The default value is 0. Use quotation marks to preserve the case of this option. -p port Port number. Queries a name server listening to a nonstandard port number. The default is 53. "-P" After query returns, executes a ping command to compare response times. This option issues the following command:$ MCR TCPIP$PING "-C" 3 server_name
Use quotation marks to preserve the case of this option.
-t query-type Type of query. Specifies either an integer value to be included in the type field, or uses the abbreviated mnemonic (such as mx ). -c query-class Class of query. Specifies either an integer value to be included in the class field, or use the abbreviated mnemonic (such as in ).
+<query-option>Use the plus (+) character to specify an option to be changed in the query packet or to change dig output specifics. Many of these options are the same options accepted by nslookup . If an option requires a parameter, use the following format:
+ keyword [=value]
Most keywords can be abbreviated. Parsing of the "+" options is very simplistic---a value must not be separated from its keyword by any spaces. The following keywords are currently available:
Keyword Abbreviation Default Description [no] debug deb deb Turn on/off debugging mode. [ no ] d2 nod2 Turn on or off extra debugging mode. [ no ] recurse rec rec Use or do not use recursive lookup. retry=# ret 4 Set number of retries to #. time=# ti 4 Set timeout length to # seconds. [ no ] ko noko Keep open option (implies vc ). [ no ] vc novc Use or do not use virtual circuit. no defname def def Use or do not use default domain name. [ no ] search sea sea Use or do not use domain search list. domain=NAME do Set default domain name to NAME. [ no ] ignore i noi Ignore or do not ignore truncation errors. [ no ] primary pr nopr Use or do not use primary server. no aaonly aa noaa Authoritative query only flag. [ no ] cmd cmd Echo parsed arguments. [ no ] stats st st Display query statistics. [ no ] Header H H Display basic header. [ no ] header he he Display header flags. [ no ] ttlid tt tt Display TTLs. [ no ] cl nocl Display class information. [ no ] qr noqr Display outgoing query [ no ] reply rep rep Display reply. [ no ] ques qu qu Display question section. [ no ] answer an an Display answer section. [ no ] author au au Display authoritative section. [ no ] addit ad ad Display additional section. pfdef Set to default display flags. pfmin Set to minimal default display flags. pfset=# Set display flags to # (# can be hexadecimal, octal, or decimal). pfand=# Bitwise and display flags with #. pfor=# Bitwise or display flags with #.
The following examples show how to use the dig command.
$ dig ; <<>> DiG 8.1 <<>> ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6 ;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13 ;; QUERY SECTION: ;; ., type = NS, class = IN ;; ANSWER SECTION: . 1d20h1m11s IN NS E.ROOT-SERVERS.NET. . 1d20h1m11s IN NS D.ROOT-SERVERS.NET. . 1d20h1m11s IN NS A.ROOT-SERVERS.NET. . 1d20h1m11s IN NS H.ROOT-SERVERS.NET. . 1d20h1m11s IN NS C.ROOT-SERVERS.NET. . 1d20h1m11s IN NS G.ROOT-SERVERS.NET. . 1d20h1m11s IN NS F.ROOT-SERVERS.NET. . 1d20h1m11s IN NS B.ROOT-SERVERS.NET. . 1d20h1m11s IN NS J.ROOT-SERVERS.NET. . 1d20h1m11s IN NS K.ROOT-SERVERS.NET. . 1d20h1m11s IN NS L.ROOT-SERVERS.NET. . 1d20h1m11s IN NS M.ROOT-SERVERS.NET. . 1d20h1m11s IN NS I.ROOT-SERVERS.NET. ;; ADDITIONAL SECTION: E.ROOT-SERVERS.NET. 2d20h1m11s IN A 188.8.131.52 D.ROOT-SERVERS.NET. 2d20h1m11s IN A 184.108.40.206 A.ROOT-SERVERS.NET. 2d20h1m11s IN A 220.127.116.11 H.ROOT-SERVERS.NET. 2d20h1m11s IN A 18.104.22.168 C.ROOT-SERVERS.NET. 2d20h1m11s IN A 22.214.171.124 G.ROOT-SERVERS.NET. 2d20h1m11s IN A 126.96.36.199 F.ROOT-SERVERS.NET. 2d20h1m11s IN A 188.8.131.52 B.ROOT-SERVERS.NET. 2d20h1m11s IN A 184.108.40.206 J.ROOT-SERVERS.NET. 2d20h1m11s IN A 220.127.116.11 K.ROOT-SERVERS.NET. 2d20h1m11s IN A 18.104.22.168 L.ROOT-SERVERS.NET. 2d20h1m11s IN A 22.214.171.124 M.ROOT-SERVERS.NET. 2d20h1m11s IN A 126.96.36.199 I.ROOT-SERVERS.NET. 2d20h1m11s IN A 188.8.131.52 ;; Total query time: 4013 msec ;; FROM: lassie.ucx.lkg.dec.com to SERVER: default -- 184.108.40.206 ;; WHEN: Wed Aug 9 16:42:08 2000 ;; MSG SIZE sent: 17 rcvd: 436
This example shows how to query your default name server for query type NS (default query type) and query class IN (default query class). The output shows the address records for the root name servers and their IP addresses.
$ dig microsoft.com mx ; <<>> DiG 8.1 <<>> microsoft.com mx ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6 ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 12, ADDITIONAL: 8 ;; QUERY SECTION: ;; microsoft.com, type = MX, class = IN ;; ANSWER SECTION: microsoft.com. 2h18m8s IN MX 10 mail2.microsoft.com. microsoft.com. 2h18m8s IN MX 10 mail3.microsoft.com. microsoft.com. 2h18m8s IN MX 10 mail4.microsoft.com. microsoft.com. 2h18m8s IN MX 10 mail5.microsoft.com. microsoft.com. 2h18m8s IN MX 10 mail1.microsoft.com. ;; AUTHORITY SECTION: com. 5d22h12m9s IN NS A.ROOT-SERVERS.NET. com. 5d22h12m9s IN NS E.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS F.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS F.ROOT-SERVERS.NET. com. 5d22h12m9s IN NS J.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS K.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS A.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS M.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS G.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS C.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS I.GTLD-SERVERS.NET. com. 5d22h12m9s IN NS B.GTLD-SERVERS.NET. ;; ADDITIONAL SECTION: mail2.microsoft.com. 2h8m41s IN A 220.127.116.11 mail3.microsoft.com. 2h27s IN A 18.104.22.168 mail4.microsoft.com. 1h53m4s IN A 22.214.171.124 mail5.microsoft.com. 2h8m43s IN A 126.96.36.199 mail1.microsoft.com. 2h8m43s IN A 188.8.131.52 A.ROOT-SERVERS.NET. 2d19h47m37s IN A 184.108.40.206 E.GTLD-SERVERS.NET. 1d9h45m57s IN A 220.127.116.11 F.GTLD-SERVERS.NET. 3h16m16s IN A 18.104.22.168 ;; Total query time: 4019 msec ;; FROM: lassie.ucx.lkg.dec.com to SERVER: default -- 22.214.171.124 ;; WHEN: Wed Aug 9 16:55:42 2000 ;; MSG SIZE sent: 31 rcvd: 493
This example shows how to obtain the mail server records for Microsoft.
Assigns an address to a network interface, and configures and displays network interface parameters.
ifconfig interface_id [address_family] [address[/bitmask]] [dest_address] [parameters]
ifconfig -a [-d] [-u] [-v] [address_family]
ifconfig -l [-d] [-u] [-v] [address_family]
ifconfig [-v] interface-id [address_family]
Use the ifconfig command to define the network address of each interface. You can also use the ifconfig command at other times to display all interfaces that are configured on a system, to redefine the address of an interface, or to set other operating parameters.
If you want to redefine the interface address or the net mask, you should stop TCP/IP Services. Otherwise, any TCP/IP process currently running will continue to use the old address and net mask and will fail.
Any user can query the status of a network interface; only a privileged user can modify the configuration of network interfaces.
You specify an interface with the ifconfig interface-id syntax. (See your hardware documentation for information on obtaining an interface ID.)
If you specify only interface-id, the ifconfig program displays the current configuration for the specified network interface only.
If a protocol family is specified by the address_family parameter, ifconfig reports only the configuration details specific to that protocol family.
When changing an interface configuration, if the address family cannot be inferred from the address parameter, an address family must be specified. The address family is required because an interface can receive transmissions in different protocols, each of which can require a separate naming scheme.
The address parameter is the network address of the interface being configured. For the inet address family, the address parameter is either a host name or an IP address in the standard dotted-decimal notation with or without the optional Classless Inter-Domain Routing (CIDR) bit mask (/bitmask). If you specify bitmask, do not use the netmask parameter.
The destination address (dest_address) parameter specifies the address of the correspondent on the remote end of a point-to-point link.
-aDisplays information about all interfaces that are configured on a system.
-dDisplays information about interfaces that are down.
-lDisplays interface names that are configured on a system.
-uDisplays information about interfaces that are up.
-vDisplays detailed information about interfaces, such as hardware addresses.
alias alias_address[/bitmask]Establishes an additional network address for this interface. This can be useful when changing network numbers and you want to continue to accept packets addressed to the old interface.
If you do not specify a bit mask or net mask with the alias address, the default net mask is based on the alias address's network class.
If you are using the optional bit mask argument, do not use the net mask argument.
-alias alias_addressRemoves the network address specified. This can be used if you incorrectly specified an alias or if an alias is no longer needed. The -alias parameter functions in the same manner as the delete parameter.
aliaslist address_list[/bitmask]Establishes a range of additional network addresses for this interface. The range can be a comma-separated list or a hyphenated list, and is inclusive. You can also specify the optional CIDR bit mask (/bitmask) argument at the end of the list. Do not use both a comma-separated list and a hyphenated list for a range.
-aliaslistRemoves a range of network addresses for this interface. This can be useful when deleting network numbers and you want to keep the primary interface address. The -aliaslist rules are the same as for the aliaslist parameter.
allmultiEnables the reception of all multicast packets.
-allmultiDisables the reception of all multicast packets.
arpEnables the use of the Address Resolution Protocol (ARP) in mapping between network-level addresses and link-level addresses. This parameter is on by default.
-arpDisables the use of the ARP. Use of this parameter is not recommended.
broadcast broad_addressSpecifies the address to use to represent broadcasts to the network. The default broadcast address is the address with a host part consisting of all ones (1). Note that the computation of the host part is dependent on netmask (see the description of the netmask parameter).
delete [net_address]Removes the network address specified. Use this parameter if you incorrectly specified an alias or if the alias was no longer needed. If you have incorrectly set an NS address, removing all NS addresses w ill allow you to specify the host portion again.
Previous Next Contents Index