Enterprise linux dig command uses the Guinness

In unix and linux, it is recommended that you use the dig command to replace nslookup. dig command nslookup stronger than a lot of features, unlike nslookkup have to set to set, and the strange trouble. Here are some of the more commonly used dig command:

# Dig the most basic usage
dig @ server qianlong.com

# Use dig check data transfer zone

dig @ server qianlong.com AXFR



# Use dig check zone data transmission of incremental

dig @ server qianlong.com IXFR = N

# See reverse analysis with dig

dig-x 124.42.102.203 @ server

# Find an authorized domain dns server

dig qianlong.com + nssearch

# From the root server to start the tracking process to resolve a domain name

dig qianlong.com + trace

# See what you are using the F root dns server

dig + norec@F.ROOT-SERVERS.NET HOSTNAME.BIND CHAOS TXT

# Show the version number of bind
dig @ bind_dns_server CHAOS TXT version.bind



********************************
You can download a www.isc.org to bind for windows version of the installation, after installation of windows can use the command dig. ^ O ^

ftp://ftp.isc.org/isc/bind/contrib/ntbind-9.3.0/BIND9.3.0.zip
*********************************
Use
DNS query utility.

Syntax
dig [@ server] [-b address] [-c class] [-f filename] [-k filename] [-n] [-p port #] [-t type] [-x addr] [-y name: key] [name] [type] [class] [queryopt ...]

dig [-h]

dig [global-queryopt ...] [query ...]

Description
dig (domain information search engine) for the inquiry command is a DNS domain name server of the flexible tool. It performs DNS search, shows a request from the domain name server to return a reply. Most DNS administrators use dig the problem as a DNS fault diagnosis, because it is flexible, and easy-to-use, clear output. Although usually dig the use of command-line parameters, but it can also batch mode by reading from the file search request. Unlike earlier versions, dig the BIND9 allow the realization of a number of queries issued from the command line. Unless a specific request was informed that the domain name server, dig will try / etc / resolv.conf for all servers listed. When not specified any command line parameters or options, dig the "." (Root) the implementation of NS query.

Logo

-b address set to be asked about the IP address of the source address. This must be the host of a network interface on a legitimate address.
-c class default query type (IN for internet) by the option-c reset. class can be any legal type, such as the HS record Hesiod query or query type CHAOSNET recorded CH.
-f filename so dig in batch mode to run through from the file filename to read a series of search requests to be addressed. File contains a number of inquiries; one per line. Each document should be a command line interface and use the query to dig the same approach to the organization.
-h When using the option-h, the command displays a brief summary of line parameters and options.
-k filename to be signed by the DNS queries sent by dig and use the services of their signature (TSIG) response, with the option-k specified TSIG key file.
-n default cases, the use of RFC2874 definition domain and IP6.ARPA binary search IPv6 address label. In order to use the earlier, the use of IP6.INT domain and nibble labels RFC1886 method, specify options-n (nibble).
-p port # If you need to query a non-standard port number, use the option-p. port # is the dig will send its query port number, instead of the standard DNS port number 53. This option can be used to test non-standard port number has been configured to listen on the domain name server query.
set query-t type type type. BIND9 support can be any valid query type. The default query type is A, unless the provision of-x option to indicate a reverse query. By specifying the type of AXFR may request a regional transfer. When the need to increase regional transmission (IXFR) when, type set to ixfr = N. Incremental Zone Transfer will be included in the region since the SOA record serial number changed to N after the changes in the region.
-x addr reverse query (the address is mapped to the name) through the-x option can be simplified. addr is an IPv4 decimal address for the sector or colon IPv6 address for the sector. When using this option, no need to provide name, class and type parameters. automatically dig similar 11.12.13.10.in-addr.arpa domain name inquiries, and inquiries were set up for the type and category of PTR and IN.
-y name: key command line you can through the-y option specifies the TSIG key; name is the name of the TSIG password, key is the actual password. 64-bit encrypted password is a string, usually by the dnssec-keygen (8) to generate. When multi-user systems in use option-y to be cautious, because the password in the ps (1) output, or shell history file may be visible. When using dig and TSCG certification, it was the name of the server inquiry need to know the password and decoding rules. In BIND, by providing the correct password and server statements in named.conf to achieve.

Parameters
global-queryopt ... Global Query option (please refer to a number of inquiries).
Query query option (see query option).

Query option
No. dig inquiry option, it affects the way search and results display. Some request header in the query set or reset flag, part of the decision to indicate the types of return information, to identify other strategies for overtime and try again. Options were taken each query prefix (+) of the keyword identification. Some keywords set or reset an option. Prefix is usually seeking the meaning of anti-keyword string no. The distribution of other keyword values of the options, such as the timeout interval. They are like the format + keyword = value. Query options are:

+ [no] tcp
The use of the domain name server query [do not use] TCP. Default behavior is to use UDP, unless it is AXFR or IXFR request, TCP connection to use.
+ [no] vc
Query name server to use [do not use] TCP. + [no] tcp backup provides backward-compatible syntax. on behalf of VC vc.
+ [no] ignore
Neglected to respond to the interruption of UDP instead of TCP try again. TCP default retry operation.
+ domain = somename
Somename set contains a single domain search list, it seems that / etc / resolv.conf in the pseudo-instruction specified domain, and enable search list processing as if to set the + search option.
+ [no] search
Use [do not use] the search list or domain in resolv.conf pseudo-instruction (if any) the definition of the search list. Not use the default search list.
+ [no] defname
Not recommended as the + [no] search synonyms.
+ [no] aaonly
This option is not anything. It is used to provide resolver set unrealized mark the old versions of dig compatibility.
+ [no] adflag
In the query set [not set] AD (authentic data) bit. AD is currently in place only in response to the standard meaning, and there is no query, but the integrity of consideration for such performance in the query can be set.
+ [no] cdflag
In the query set [not set] CD (checking disabled) bit. It does not run the server in response to requests for information on the legality of DNSSEC.
+ [no] recursive
Switch query RD (requirements Recursion) bit set. Settings in the default position, that is, under normal circumstances dig send recursive queries. When using the query option + nssearch or + trace when the auto-disable recursion.
+ [no] nssearch
When this option is set, dig attempts to find a name that contains the network to be found above the authority of the domain name server, and displays each network segment in the SOA record of the domain name server.
+ [no] trace
Query name to be switched to the root name server from the beginning of the path tracking agent. Default does not use tracking. Once the opening track, dig the use of iterative queries to resolve to be the name. It in accordance with the reference from the root servers, showing the use of analytical queries from each of the server response.
+ [no] cmd
Settings displayed in the output that the version of dig and the query used in the initial Notes option. Notes default display.
+ [no] short
Provide a brief answer. Default format is a lengthy reply to the information.
+ [no] identify
When the + short option is enabled, the show [or do not show] the IP address provided by responsive and port number. If the request for a brief response format, the default does not display the server response source address and port number.
+ [no] comments
Switch output shows the comment line. Note the default value is displayed.
+ [no] stats
The query option setting display statistical information: queries, the response size and so on. Default query statistics.
+ [no] qr
Shows that [do not show] to send the query request. Default do not show.
+ [no] question
When they returned response, the show [not displayed] request query part of the problem. Default as part of the notes to the problem.
+ [no] answer
Shows that [do not display] the answer part of response. Default display.
+ [no] authority
Shows that [do not display] the authority part of response. Default display.
+ [no] additional
Shows that [do not display] the additional part of response. Default display.
+ [no] all
Set or clear all display signs.
+ time = T
For the query timeout set for T seconds. Default is 5 seconds. If T is set to a number less than 1, then 1 second as a query timeout.
+ tries = A
Set up to send UDP queries to the server to retry the number of requests for the A, instead of the default 3 times. If A is less than or equal to 0, then try again using the number 1.
+ ndots = D
For full consideration, set to be appear in the name of D points. Default value is used in / etc / resolv.conf in the definition statement ndots, or 1, if there is no statement so ndots. Fewer points with the name be interpreted as relative names, and by searching the list of domains or file / etc / resolv.conf domain in the search for pseudo-instruction.
+ bufsize = B
EDNS0 Set the UDP message buffer size of B bytes. Buffer zone of maximum and minimum values for the 65535 and 0 respectively. Value outside the range of automatic rounding to the nearest valid value.
+ [no] multiline
To detailed multi-line format similar to SOA records, and incidental notes readable. Default value is displayed on every single line of a record in order to dig in the output of the computer analysis.
A number of inquiries
dig the BIND9 support specified in the command line on a number of inquiries (to support the-f batch file option of the additional functionality). Each query can use their own flag, options and query options.

Under such circumstances, described in the above command-line syntax, each query argument on behalf of an individual query. Each option by the arbitrary standards and signs, to be query name, an optional query type and class as well as any applicable to the query query option.

Can also be used for all inquiries are effectively set global query options. Global Query command-line option must be in the first name, category, type, options, logo and query options before tuples. Any global query options (except the + [no] cmd option) can be the following query to reset the particular option. For example:

dig + qr www.isc.org any-x 127.0.0.1 isc.org ns + noqr shows how to dig for the three queries from the command line of departure: a response to any inquiries www.isc.org a reverse query 127.0.0.1 and a NS record query for isc.org. + Qr applied global query option, so that dig shows the initial query for each query. Finally, the query has a local query option + noqr, said the dig in search isc.org the NS records do not show the initial query.

Example
Dig a typical call like this:

dig @ server name type where:

server
Query name server to be the name or IP address. Can be delimited by the IPv4 address or a colon-delimited IPv6 address. When provided by the host server parameters, dig in the query domain name servers to resolve the name before. If there are no parameters can be provided by the server, dig a reference / etc / resolv.conf, and then query the list of domain name server where. Shows that the response from the domain name server.
name
Will have to query the name of the resource record.
type
The necessary inquiries of the type of show - ANY, A, MX, SIG, and any valid query type. If you do not provide any type of parameter, dig record A would execute the query.

0 评论:

发表评论