[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]
Commands Reference, Volume 2
host Command
Purpose
Resolves a host name into an Internet address or an
Internet address into a host name.
Syntax
host [-n [ -a ]
[ -c Class ] [ -d ] [ -r ] [ -t Type ] [ -v ] [ -w ] [ -z ]] Hostname | Address [ Server ]
hostnew [ -a ] [ -c Class ] [ -d ]
[ -r ] [ -t Type ] [ -v ] [ -w ] [ -z ] Hostname | Address [ Server ]
Description
The /usr/bin/host command returns
the Internet address of a host machine when the HostName parameter is specified and the name of the host when the Address parameter is specified. The host command
also displays any aliases associated with the HostName parameter.
If the local host is using the DOMAIN protocol, the local or remote name server database is queried before
searching the local /etc/hosts file.
The host command may also return
other name records found in the DNS (Domain Name System). The -z flag specifies this mode. The other flags allow for the customization
of the query.
Flags
-a |
Equivalent to using "-v -t *" |
-c Class |
Specifies the class to look in when searching non-Internet data.
Valid classes are:
- IN
- Internet class
- CHAOS
- Chaos class
- HESIOD
- MIT Althena Hesiod class
- ANY
- Wildcard (any of the above)
- *
- Wildcard (any of the above)
|
-d |
Turns on debugging mode. |
-n |
Equivalent to issuing the /usr/bin/hostnew command.
The hostnew command is the 5.2 version of the host command. |
-r |
Disables recursive processing. |
-t Type |
Specifies the type of record to query for. Valid types are:
- A
- Host's Internet address
- CNAME
- Canonical name for an alias
- HINFO
- Host CPU and operating system type
- KEY
- Security Key Record
- MINFO
- Mailbox or mail list information
- MX
- Mail exchanger
- NS
- Nameserver for the named zone
- PTR
- Host name if the query is an Internet address; otherwise, the pointer
to other information
- SIG
- Signature Record
- SOA
- Domain's "start-of-authority" information
- TXT
- Text information
- UINFO
- User information
- WKS
- Supported well-known services
|
-v |
Verbose mode. |
-w |
Waits forever for a reply from the DNS server. |
-z |
Uses the new output that displays resource record information. |
Parameters
Address |
Specifies the Internet address of the host machine to use in resolving
the host name. The Address parameter must be a valid
Internet address in dotted decimal format. |
HostName |
Specifies the name of the host machine to use in resolving the Internet
address. The HostName parameter can be either a unique
host name or a well-known host name (such as nameserver, printserver, or timeserver, if these exist). |
Server |
Specifies the nameserver to query. |
Examples
- To display the address of a host machine named mephisto, enter:
host mephisto
Information similar to the following is displayed:
mephisto is 192.100.13.5, Aliases: engr, sarah
- To display the host whose address is 192.100.13.1, enter:
host 192.100.13.1
Information similar
to the following is displayed:
mercutio is 192.100.13.1
- To display the MX records for the domain named test.ibm.com, enter:
host -n -t mx test.ibm.com
or
hostnew -t mx test.ibm.com
Information similar to the following is displayed:
test.ibm.com mail is handled (pri=10) by test1.tt.ibm.com
test.ibm.com mail is handled (pri=10) by test2.aix.ibm.com
Files
/etc/hosts |
Contains the Internet Protocol (IP) name and addresses of hosts on
the local network. |
Related Information
The hostname command.
The named daemon.
Network Overview in AIX 5L Version 5.2 System Management Guide: Communications and Networks.
[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home |
Legal |
Search ]