host - the host name using a domain name server query

SYNOPSIS (Overview)

host [-l ] [-v ] [-w ] [-r ] [-d ] [-t querytype ] [-a ] host [server ]

DESCRIPTION (description)

Host query information Internet hosts that access to such information through a set of interconnected servers distributed among countries default, host simply do the conversion host name and Internet address but by `` -... T '' or `` - a '' option, which can be used to find all the information maintained by a host of domain name server.

Parameter can be a host name, or a numeric address. This program first think of it as a digital address of the host, if the attempt fails, then it as the host name. Binary number system digital address of the host separated by periods consisting of four ten such as 128.6.4.194. hostname name separated by periods composed, for example topaz.rutgers.edu. unless the name ends with a period, otherwise the local domain name will automatically be added later. Therefore, Rutgers user can input

 

It actually find "topaz.rutgers.edu". If the attempt fails, use the name of the original input and try again (this is "topaz"). E-mail and other network tools use the same strategy behind the name suffix the results call from hostname (1), the use of all the data points behind the first. (see description below Sx custom query host name.)

The first parameter is the name of the host you intend to query. If the address is a number, a reverse lookup on the implementation of `` (inverse query) '' In other words, the domain name system to view a series of stand-alone database, convert the numeric address into a name.

The second parameter is optional. It allows you to specify a particular server queries. If you do not use this parameter, use the default server (normally the local machine).

If the name is specified, you can see three different types of output here is their example:

 

sun4.rutgers.edu is a nickname for ATHOS.RUTGERS.EDU
ATHOS.RUTGERS.EDU has address 128.6.5.46
ATHOS.RUTGERS.EDU has address 128.6.4.4
ATHOS.RUTGERS.EDU mail is handled by ARAMIS.RUTGERS.EDU

The commands are `` Host sun4. '' The first line indicates `` sun4.rutgers.edu '' is actually an alias. Official name is `` ATHOS.RUTGERS.EDU. '' The next two lines address. If the system has multiple network interfaces, host address of each interface on each display line indicates that the last ATHOS.RUTGERS.EDU not belong to it the received mail, the mail by the ARAMIS.RUTGERS.EDU processing system has a plurality of processing some mail system, there may be multiple lines such display from a technical point of view, we believe that each system can receive e-mail should have such items if the system receives its own mail, there should be a mention of the system itself..; E.g:

 

However, many can receive its own mail system reluctant to mention this fact. If there is a `` mail IS the Handled by '' but did not address, which indicates that it is not part of the Internet, but to forward a message on the network system. Usenet, Bitnet and many other networks have similar items.

Options

In front of the host name to use a lot of options. Most option is only meaningful for the maintenance of the domain name database.

 

-w
This leads to a host permanent wait for a response. Under normal circumstances, a timeout after about one minute.
-v
The "red tape" output format, which is the official primary domain file formats are described in the manual page named (8). Without this option, the output of the basic terminology still follow this format, but try to be more intelligent for the average user display these If no `` -. V '' all "a", "mx", and "cname" item displays the corresponding "has address", "mail is handled by" and "is a nickname for", and TTL and type are not displayed.
-r
Close recursive queries. This means that the name server returns data only its own database. Do not ask for more information to other servers.
-d
Turn on debugging display network response details.
-t querytype
It allows you to specify querytype . To query an information manual page named (8) These parameters are defined types are currently supported:. `` A, '' `` ns, '' `` md, '' `` MF, ' ' `` CNAME ' ' `` SOA, ' ' `` MB, ' ' `` mg, ' ' `` of Mr, ' ' `` null, ' ' `` WKS, ' ' `` PTR, ' ' `` HINFO, '' `` minfo, '' `` MX, '' `` uInfo '' `` UID, '' `` gid , '' `` unspec . 'Furthermore, wildcards ( `` can be written as the any ' 'or `` * ' ') can specify any of the above (all) type. Type must be lowercase. Note that the default search order is the first `` A, ' 'and is `` MX, '' unless -v option is turned on, the default value is only `` a '' `` - t '' option in the filter host is useful information returned more content see below `` - L '' explanation of the options.
-a
All `` '' is equivalent to `` - V the any -t '
-l
List All field entry; for example:

 

All hosts in the domain will be listed rutgers.edu `` -. T '' option may be needed to filter the information received is the address of the default information, including PTR and NS records.

 

Command to download all rutgers.edu area (zone) to the official data the primary domain file format. (However, due to some complicated reasons, SOA records show twice.)

Note: `` - L '' to perform all the transmission region, and then it is filtered information required by the command last resort.

Custom queries host name

In general, if the user name does not contain any given period, host put the default domain name added at the end of its default domain can be defined in /etc/resolv.conf, but usually the name of the machine from a sentence later point extraction. users can environment variables LOCALDOMAIN specify a different default domain name. in addition, users can customize the host name abbreviation abbreviation stored in a file, one per line, the format name is an acronym, a space and then the full host name. the name of the file must HOSTALIASES pointed out that the environment variable.

Environment Variables

 

HOSTALIASES
Name of the file containing ( host alias, host full name ) pairs. 

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11087875.html