dig.1

来自「非常好的dns解析软件」· 1 代码 · 共 558 行 · 第 1/2 页

1
558
字号
.\" Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC").\" Copyright (C) 2000-2003 Internet Software Consortium..\" .\" Permission to use, copy, modify, and distribute this software for any.\" purpose with or without fee is hereby granted, provided that the above.\" copyright notice and this permission notice appear in all copies..\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH.\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY.\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,.\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM.\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR.\" PERFORMANCE OF THIS SOFTWARE..\".\" $Id: dig.1,v 1.23.18.19 2007/01/30 00:23:44 marka Exp $.\".hy 0.ad l.\"     Title: dig.\"    Author: .\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>.\"      Date: Jun 30, 2000.\"    Manual: BIND9.\"    Source: BIND9.\".TH "DIG" "1" "Jun 30, 2000" "BIND9" "BIND9".\" disable hyphenation.nh.\" disable justification (adjust text to left margin only).ad l.SH "NAME"dig \- DNS lookup utility.SH "SYNOPSIS".HP 4\fBdig\fR [@server] [\fB\-b\ \fR\fB\fIaddress\fR\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-f\ \fR\fB\fIfilename\fR\fR] [\fB\-k\ \fR\fB\fIfilename\fR\fR] [\fB\-p\ \fR\fB\fIport#\fR\fR] [\fB\-q\ \fR\fB\fIname\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-x\ \fR\fB\fIaddr\fR\fR] [\fB\-y\ \fR\fB\fI[hmac:]\fR\fIname:key\fR\fR] [\fB\-4\fR] [\fB\-6\fR] [name] [type] [class] [queryopt...].HP 4\fBdig\fR [\fB\-h\fR].HP 4\fBdig\fR [global\-queryopt...] [query...].SH "DESCRIPTION".PP\fBdig\fR(domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use\fBdig\fRto troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than\fBdig\fR..PPAlthough\fBdig\fRis normally used with command\-line arguments, it also has a batch mode of operation for reading lookup requests from a file. A brief summary of its command\-line arguments and options is printed when the\fB\-h\fRoption is given. Unlike earlier versions, the BIND9 implementation of\fBdig\fRallows multiple lookups to be issued from the command line..PPUnless it is told to query a specific name server,\fBdig\fRwill try each of the servers listed in\fI/etc/resolv.conf\fR..PPWhen no command line arguments or options are given, will perform an NS query for "." (the root)..PPIt is possible to set per\-user defaults for\fBdig\fRvia\fI${HOME}/.digrc\fR. This file is read and any options in it are applied before the command line arguments..PPThe IN and CH class names overlap with the IN and CH top level domains names. Either use the\fB\-t\fRand\fB\-c\fRoptions to specify the type and class or use the\fB\-q\fRthe specify the domain name or use "IN." and "CH." when looking up these top level domains..SH "SIMPLE USAGE".PPA typical invocation of\fBdig\fRlooks like:.sp.RS 4.nf dig @server name type .fi.RE.spwhere:.PP\fBserver\fR.RS 4is the name or IP address of the name server to query. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation. When the supplied\fIserver\fRargument is a hostname,\fBdig\fRresolves that name before querying that name server. If no\fIserver\fRargument is provided,\fBdig\fRconsults\fI/etc/resolv.conf\fRand queries the name servers listed there. The reply from the name server that responds is displayed..RE.PP\fBname\fR.RS 4is the name of the resource record that is to be looked up..RE.PP\fBtype\fR.RS 4indicates what type of query is required \(em ANY, A, MX, SIG, etc.\fItype\fRcan be any valid query type. If no\fItype\fRargument is supplied,\fBdig\fRwill perform a lookup for an A record..RE.SH "OPTIONS".PPThe\fB\-b\fRoption sets the source IP address of the query to\fIaddress\fR. This must be a valid address on one of the host's network interfaces or "0.0.0.0" or "::". An optional port may be specified by appending "#<port>".PPThe default query class (IN for internet) is overridden by the\fB\-c\fRoption.\fIclass\fRis any valid class, such as HS for Hesiod records or CH for CHAOSNET records..PPThe\fB\-f\fRoption makes\fBdig \fRoperate in batch mode by reading a list of lookup requests to process from the file\fIfilename\fR. The file contains a number of queries, one per line. Each entry in the file should be organised in the same way they would be presented as queries to\fBdig\fRusing the command\-line interface..PPIf a non\-standard port number is to be queried, the\fB\-p\fRoption is used.\fIport#\fRis the port number that\fBdig\fRwill send its queries instead of the standard DNS port number 53. This option would be used to test a name server that has been configured to listen for queries on a non\-standard port number..PPThe\fB\-4\fRoption forces\fBdig\fRto only use IPv4 query transport. The\fB\-6\fRoption forces\fBdig\fRto only use IPv6 query transport..PPThe\fB\-t\fRoption sets the query type to\fItype\fR. It can be any valid query type which is supported in BIND9. The default query type "A", unless the\fB\-x\fRoption is supplied to indicate a reverse lookup. A zone transfer can be requested by specifying a type of AXFR. When an incremental zone transfer (IXFR) is required,\fItype\fRis set toixfr=N. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone's SOA record was\fIN\fR..PPThe\fB\-q\fRoption sets the query name to\fIname\fR. This useful do distingish the\fIname\fRfrom other arguments..PPReverse lookups \- mapping addresses to names \- are simplified by the\fB\-x\fRoption.\fIaddr\fRis an IPv4 address in dotted\-decimal notation, or a colon\-delimited IPv6 address. When this option is used, there is no need to provide the\fIname\fR,\fIclass\fRand\fItype\fRarguments.\fBdig\fRautomatically performs a lookup for a name like11.12.13.10.in\-addr.arpaand sets the query type and class to PTR and IN respectively. By default, IPv6 addresses are looked up using nibble format under the IP6.ARPA domain. To use the older RFC1886 method using the IP6.INT domain specify the\fB\-i\fRoption. Bit string labels (RFC2874) are now experimental and are not attempted..PPTo sign the DNS queries sent by\fBdig\fRand their responses using transaction signatures (TSIG), specify a TSIG key file using the\fB\-k\fRoption. You can also specify the TSIG key itself on the command line using the\fB\-y\fRoption;\fIhmac\fRis the type of the TSIG, default HMAC\-MD5,\fIname\fRis the name of the TSIG key and\fIkey\fRis the actual key. The key is a base\-64 encoded string, typically generated by\fBdnssec\-keygen\fR(8). Caution should be taken when using the\fB\-y\fRoption on multi\-user systems as the key can be visible in the output from\fBps\fR(1)or in the shell's history file. When using TSIG authentication with\fBdig\fR, the name server that is queried needs to know the key and algorithm that is being used. In BIND, this is done by providing appropriate\fBkey\fRand\fBserver\fRstatements in\fInamed.conf\fR..SH "QUERY OPTIONS".PP\fBdig\fRprovides a number of query options which affect the way in which lookups are made and the results displayed. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies..PPEach query option is identified by a keyword preceded by a plus sign (+). Some keywords set or reset an option. These may be preceded by the stringnoto negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They have the form\fB+keyword=value\fR. The query options are:.PP\fB+[no]tcp\fR.RS 4Use [do not use] TCP when querying name servers. The default behaviour is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used..RE.PP\fB+[no]vc\fR.RS 4Use [do not use] TCP when querying name servers. This alternate syntax to\fI+[no]tcp\fRis provided for backwards compatibility. The "vc" stands for "virtual circuit"..RE.PP\fB+[no]ignore\fR.RS 4Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed..RE.PP\fB+domain=somename\fR.RS 4Set the search list to contain the single domain\fIsomename\fR, as if specified in a\fBdomain\fRdirective in\fI/etc/resolv.conf\fR, and enable search list processing as if the\fI+search\fRoption were given..RE.PP\fB+[no]search\fR.RS 4Use [do not use] the search list defined by the searchlist or domain directive in\fIresolv.conf\fR(if any). The search list is not used by default..RE.PP\fB+[no]showsearch\fR.RS 4Perform [do not perform] a search showing intermediate results..RE.PP\fB+[no]defname\fR.RS 4Deprecated, treated as a synonym for\fI+[no]search\fR.RE.PP\fB+[no]aaonly\fR.RS 4Sets the "aa" flag in the query..RE.PP

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?