Annotation of src/usr.bin/dig/host.1, Revision 1.1
1.1 ! florian 1: .\" $OpenBSD: host.1,v 1.13 2019/12/24 17:48:47 schwarze Exp $
! 2: .\"
! 3: .\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
! 4: .\"
! 5: .\" Permission to use, copy, modify, and/or distribute this software for any
! 6: .\" purpose with or without fee is hereby granted, provided that the above
! 7: .\" copyright notice and this permission notice appear in all copies.
! 8: .\"
! 9: .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
! 10: .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
! 11: .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
! 12: .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
! 13: .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
! 14: .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
! 15: .\" PERFORMANCE OF THIS SOFTWARE.
! 16: .\"
! 17: .Dd $Mdocdate: December 24 2019 $
! 18: .Dt HOST 1
! 19: .Os
! 20: .Sh NAME
! 21: .Nm host
! 22: .Nd DNS lookup utility
! 23: .Sh SYNOPSIS
! 24: .Nm
! 25: .Op Fl 46aCdilrsTVvw
! 26: .Op Fl c Ar class
! 27: .Op Fl m Ar flag
! 28: .Op Fl N Ar ndots
! 29: .Op Fl R Ar number
! 30: .Op Fl t Ar type
! 31: .Op Fl W Ar wait
! 32: .Ar name
! 33: .Op Ar server
! 34: .Sh DESCRIPTION
! 35: The
! 36: .Nm
! 37: command is a simple utility for performing DNS lookups.
! 38: It is normally used to convert names to IP addresses and vice versa.
! 39: .Pp
! 40: .Ar name
! 41: is the domain name that is to be looked up.
! 42: It can also be a dotted-decimal IPv4 address or a colon-delimited IPv6
! 43: address, in which case
! 44: .Nm
! 45: will by default perform a reverse lookup for that address.
! 46: .Ar server
! 47: is an optional argument which is either the name or IP address of the name
! 48: server that
! 49: .Nm
! 50: should query instead of the server or servers listed in
! 51: .Pa /etc/resolv.conf .
! 52: .Pp
! 53: The options are as follows:
! 54: .Bl -tag -width Ds
! 55: .It Fl 4
! 56: Use IPv4 only for query transport.
! 57: .It Fl 6
! 58: Use IPv6 only for query transport.
! 59: .It Fl a
! 60: "All". The
! 61: .Fl a
! 62: option is normally equivalent to
! 63: .Fl v
! 64: .Fl t Cm ANY .
! 65: It also affects the behaviour of the
! 66: .Fl l
! 67: list zone option.
! 68: .It Fl C
! 69: Check consistency:
! 70: .Nm
! 71: will query the SOA records for zone
! 72: .Ar name
! 73: from all the listed authoritative name servers for that zone.
! 74: The list of name servers is defined by the NS records that are found for the
! 75: zone.
! 76: .It Fl c Ar class
! 77: Query class: This can be used to lookup
! 78: .Cm HS
! 79: (Hesiod)
! 80: or
! 81: .Cm CH
! 82: (Chaosnet) class resource records.
! 83: The default class is
! 84: .Cm IN
! 85: (Internet).
! 86: .It Fl d
! 87: Print debugging traces.
! 88: Equivalent to the
! 89: .Fl v
! 90: verbose option.
! 91: .It Fl i
! 92: Obsolete.
! 93: Use the IP6.INT domain for reverse lookups of IPv6 addresses as defined in
! 94: RFC1886 and deprecated in RFC4159.
! 95: The default is to use IP6.ARPA as specified in RFC3596.
! 96: .It Fl l
! 97: List zone:
! 98: The
! 99: .Nm
! 100: command performs a zone transfer of
! 101: zone
! 102: .Ar name
! 103: and prints out the NS, PTR and address records (A/AAAA).
! 104: .Pp
! 105: Together, the
! 106: .Fl l
! 107: .Fl a
! 108: options print all records in the zone.
! 109: .It Fl m Ar flag
! 110: Memory usage debugging: the flag can be
! 111: .Cm record ,
! 112: .Cm usage ,
! 113: or
! 114: .Cm trace .
! 115: You can specify the
! 116: .Fl m
! 117: option more than once to set multiple flags.
! 118: .It Fl N Ar ndots
! 119: The number of dots that have to be in
! 120: .Ar name
! 121: for it to be considered absolute.
! 122: The default value is that defined using the ndots statement in
! 123: .Pa /etc/resolv.conf ,
! 124: or 1 if no ndots statement is present.
! 125: Names with fewer dots are interpreted as relative names and will be searched for
! 126: in the domains listed in the
! 127: .Vt search
! 128: or
! 129: .Vt domain
! 130: directive in
! 131: .Pa /etc/resolv.conf .
! 132: .It Fl R Ar number
! 133: Number of retries for UDP queries:
! 134: If
! 135: .Ar number
! 136: is negative or zero, the number of retries will default to 1. The default value
! 137: is 1.
! 138: .It Fl r
! 139: Non-recursive query:
! 140: Setting this option clears the RD (recursion desired) bit in the query.
! 141: This should mean that the name server receiving the query will not attempt to
! 142: resolve
! 143: .Ar name .
! 144: The
! 145: .Fl r
! 146: option enables
! 147: .Nm
! 148: to mimic the behavior of a name server by making non-recursive queries and
! 149: expecting to receive answers to those queries that can be referrals to other
! 150: name servers.
! 151: .It Fl s
! 152: Do
! 153: .Em not
! 154: send the query to the next name server if any server responds with a SERVFAIL
! 155: response, which is the reverse of normal stub resolver behavior.
! 156: .It Fl T
! 157: TCP:
! 158: By default,
! 159: .Nm
! 160: uses UDP when making queries.
! 161: The
! 162: .Fl T
! 163: option makes it use a TCP connection when querying the name server.
! 164: TCP will be automatically selected for queries that require it, such as zone
! 165: transfer (AXFR) requests.
! 166: .It Fl t Ar type
! 167: Query type:
! 168: The
! 169: .Ar type
! 170: argument can be any recognized query type:
! 171: .Cm CNAME ,
! 172: .Cm NS ,
! 173: .Cm SOA ,
! 174: .Cm TXT ,
! 175: .Cm DNSKEY ,
! 176: .Cm AXFR ,
! 177: etc.
! 178: .Pp
! 179: When no query type is specified,
! 180: .Nm
! 181: automatically selects an appropriate query type.
! 182: By default, it looks for A, AAAA, and MX records.
! 183: If the
! 184: .Fl C
! 185: option is given, queries will be made for SOA records.
! 186: If
! 187: .Ar name
! 188: is a dotted-decimal IPv4 address or colon-delimited IPv6 address,
! 189: .Nm
! 190: will query for PTR records.
! 191: .Pp
! 192: If a query type of
! 193: .Cm IXFR
! 194: is chosen the starting serial number can be specified by appending an equal
! 195: followed by the starting serial number (like
! 196: .Fl t Cm IXFR= Ns Ar 12345678 ) .
! 197: .It Fl V
! 198: Print the version number and exit.
! 199: .It Fl v
! 200: Verbose output.
! 201: Equivalent to the
! 202: .Fl d
! 203: debug option.
! 204: .It Fl W Ar wait
! 205: Timeout: Wait for up to
! 206: .Ar wait
! 207: seconds for a reply.
! 208: If
! 209: .Ar wait
! 210: is less than one, the wait interval is set to one second.
! 211: .Pp
! 212: By default,
! 213: .Nm
! 214: will wait for 5 seconds for UDP responses and 10 seconds for TCP connections.
! 215: .It Fl w
! 216: Wait forever: The query timeout is set to the maximum possible.
! 217: .El
! 218: .Sh FILES
! 219: .Pa /etc/resolv.conf
! 220: .Sh SEE ALSO
! 221: .Xr dig 1
! 222: .Sh AUTHORS
! 223: .An -nosplit
! 224: .An Internet Systems Consortium, Inc .