1*3fc9e2c3SDag-Erling Smørgrav.\" (c) Magerya Vitaly 2*3fc9e2c3SDag-Erling Smørgrav.\" 3*3fc9e2c3SDag-Erling Smørgrav.\" Copying and distribution of this file, with or without modification, 4*3fc9e2c3SDag-Erling Smørgrav.\" are permitted in any medium without royalty provided the copyright 5*3fc9e2c3SDag-Erling Smørgrav.\" notice and this notice are preserved. This file is offered as-is, 6*3fc9e2c3SDag-Erling Smørgrav.\" without any warranty. 7*3fc9e2c3SDag-Erling Smørgrav.Dd Aug 27, 2012 8*3fc9e2c3SDag-Erling Smørgrav.Dt LDNS-HOST 1 9*3fc9e2c3SDag-Erling Smørgrav.Os 10*3fc9e2c3SDag-Erling Smørgrav.Sh NAME 11*3fc9e2c3SDag-Erling Smørgrav.Nm ldns-host 12*3fc9e2c3SDag-Erling Smørgrav.Nd DNS lookup utility 13*3fc9e2c3SDag-Erling Smørgrav.Sh SYNOPSIS 14*3fc9e2c3SDag-Erling Smørgrav.Nm 15*3fc9e2c3SDag-Erling Smørgrav.Op Fl aCdilrsTvw46 16*3fc9e2c3SDag-Erling Smørgrav.Op Fl c Ar class 17*3fc9e2c3SDag-Erling Smørgrav.Op Fl N Ar ndots 18*3fc9e2c3SDag-Erling Smørgrav.Op Fl R Ar number 19*3fc9e2c3SDag-Erling Smørgrav.Op Fl t Ar type 20*3fc9e2c3SDag-Erling Smørgrav.Op Fl W Ar wait 21*3fc9e2c3SDag-Erling Smørgrav.Ar name 22*3fc9e2c3SDag-Erling Smørgrav.Op Ar server 23*3fc9e2c3SDag-Erling Smørgrav.Sh DESCRIPTION 24*3fc9e2c3SDag-Erling Smørgrav.Nm 25*3fc9e2c3SDag-Erling Smørgravis a simple utility for performing DNS lookups. It is normally 26*3fc9e2c3SDag-Erling Smørgravused to convert names to IP addresses and vice versa. 27*3fc9e2c3SDag-Erling Smørgrav.Pp 28*3fc9e2c3SDag-Erling Smørgrav.Ar name 29*3fc9e2c3SDag-Erling Smørgravis the domain name that is to be looked up. It can also be a 30*3fc9e2c3SDag-Erling Smørgravdotted-decimal IPv4 address or a colon-delimited IPv6 address, 31*3fc9e2c3SDag-Erling Smørgravin which case 32*3fc9e2c3SDag-Erling Smørgrav.Nm 33*3fc9e2c3SDag-Erling Smørgravwill by default perform a reverse lookup for that address. 34*3fc9e2c3SDag-Erling Smørgrav.Pp 35*3fc9e2c3SDag-Erling SmørgravWhen 36*3fc9e2c3SDag-Erling Smørgrav.Ar name 37*3fc9e2c3SDag-Erling Smørgravis not provided, 38*3fc9e2c3SDag-Erling Smørgrav.Nm 39*3fc9e2c3SDag-Erling Smørgravprints a short summary of it's usage. 40*3fc9e2c3SDag-Erling Smørgrav.Pp 41*3fc9e2c3SDag-Erling Smørgrav.Ar server 42*3fc9e2c3SDag-Erling Smørgravis an optional argument which is either a domain name or an IP 43*3fc9e2c3SDag-Erling Smørgravaddress of the name server that 44*3fc9e2c3SDag-Erling Smørgrav.Nm 45*3fc9e2c3SDag-Erling Smørgravshould query instead of the server or servers listed in 46*3fc9e2c3SDag-Erling Smørgrav.Pa /etc/resolv.conf . 47*3fc9e2c3SDag-Erling SmørgravWhen 48*3fc9e2c3SDag-Erling Smørgrav.Ar server 49*3fc9e2c3SDag-Erling Smørgravis a domain name, system resolver is used to obtain it's address. 50*3fc9e2c3SDag-Erling Smørgrav.Pp 51*3fc9e2c3SDag-Erling SmørgravSupported options: 52*3fc9e2c3SDag-Erling Smørgrav.Bl -tag -width indent 53*3fc9e2c3SDag-Erling Smørgrav.It Fl a 54*3fc9e2c3SDag-Erling SmørgravMake a verbose query of type 55*3fc9e2c3SDag-Erling Smørgrav.Cm ANY . 56*3fc9e2c3SDag-Erling SmørgravEquivalent to 57*3fc9e2c3SDag-Erling Smørgrav.Fl v Fl t Cm ANY . 58*3fc9e2c3SDag-Erling Smørgrav.It Fl C 59*3fc9e2c3SDag-Erling SmørgravQuery for 60*3fc9e2c3SDag-Erling Smørgrav.Cm SOA 61*3fc9e2c3SDag-Erling Smørgravrecords for zone 62*3fc9e2c3SDag-Erling Smørgrav.Ar name 63*3fc9e2c3SDag-Erling Smørgravfrom all of it's authoritative name servers. The list of name 64*3fc9e2c3SDag-Erling Smørgravservers is obtained via 65*3fc9e2c3SDag-Erling Smørgrav.Cm NS 66*3fc9e2c3SDag-Erling Smørgravquery for 67*3fc9e2c3SDag-Erling Smørgrav.Ar name . 68*3fc9e2c3SDag-Erling Smørgrav.It Fl c Ar class 69*3fc9e2c3SDag-Erling SmørgravPerform DNS query of class 70*3fc9e2c3SDag-Erling Smørgrav.Ar class . 71*3fc9e2c3SDag-Erling SmørgravRecognized classes are 72*3fc9e2c3SDag-Erling Smørgrav.Cm IN Pq Internet , 73*3fc9e2c3SDag-Erling Smørgrav.Cm CH Pq Chaosnet , 74*3fc9e2c3SDag-Erling Smørgrav.Cm HS Pq Hesiod , 75*3fc9e2c3SDag-Erling Smørgrav.Cm NONE , 76*3fc9e2c3SDag-Erling Smørgrav.Cm ANY 77*3fc9e2c3SDag-Erling Smørgravand 78*3fc9e2c3SDag-Erling Smørgrav.Cm CLASS Ns Ar N 79*3fc9e2c3SDag-Erling Smørgrav(where 80*3fc9e2c3SDag-Erling Smørgrav.Ar N 81*3fc9e2c3SDag-Erling Smørgravis a number from 1 to 255). Default is 82*3fc9e2c3SDag-Erling Smørgrav.Cm IN . 83*3fc9e2c3SDag-Erling Smørgrav.It Fl d 84*3fc9e2c3SDag-Erling SmørgravProduce verbose output. This is a synonym for 85*3fc9e2c3SDag-Erling Smørgrav.Fl v , 86*3fc9e2c3SDag-Erling Smørgravand is provided for backward compatibility. 87*3fc9e2c3SDag-Erling Smørgrav.It Fl i 88*3fc9e2c3SDag-Erling SmørgravUse IP6.INT domain for reverse lookups of IPv6 addresses (as 89*3fc9e2c3SDag-Erling Smørgravdefined in RFC1886; note that RFC4159 deprecates IP6.INT). 90*3fc9e2c3SDag-Erling SmørgravBy default IP6.ARPA is used. 91*3fc9e2c3SDag-Erling Smørgrav.It Fl l 92*3fc9e2c3SDag-Erling SmørgravList all 93*3fc9e2c3SDag-Erling Smørgrav.Cm NS, PTR, A 94*3fc9e2c3SDag-Erling Smørgravand 95*3fc9e2c3SDag-Erling Smørgrav.Cm AAAA 96*3fc9e2c3SDag-Erling Smørgravrecords in zone 97*3fc9e2c3SDag-Erling Smørgrav.Ar name 98*3fc9e2c3SDag-Erling Smørgravby performing a zone transfer 99*3fc9e2c3SDag-Erling Smørgrav.Pq Cm AXFR . 100*3fc9e2c3SDag-Erling SmørgravYou can combine this option with 101*3fc9e2c3SDag-Erling Smørgrav.Fl a 102*3fc9e2c3SDag-Erling Smørgravto print all records, or with 103*3fc9e2c3SDag-Erling Smørgrav.Fl t 104*3fc9e2c3SDag-Erling Smørgravto only print specific ones. 105*3fc9e2c3SDag-Erling Smørgrav.It Fl N Ar ndots 106*3fc9e2c3SDag-Erling SmørgravConsider names with at least this many dots as absolute. That 107*3fc9e2c3SDag-Erling Smørgravis, try to resolve them directly before consulting 108*3fc9e2c3SDag-Erling Smørgrav.Ic domain 109*3fc9e2c3SDag-Erling Smørgravor 110*3fc9e2c3SDag-Erling Smørgrav.Ic search 111*3fc9e2c3SDag-Erling Smørgravoptions from 112*3fc9e2c3SDag-Erling Smørgrav.Pa /etc/resolv.conf . 113*3fc9e2c3SDag-Erling Smørgrav.It Fl r 114*3fc9e2c3SDag-Erling SmørgravPerform non-recursive query to the name server by clearing RD 115*3fc9e2c3SDag-Erling Smørgrav.Pq Dq recursion desired 116*3fc9e2c3SDag-Erling Smørgravbit of the query. 117*3fc9e2c3SDag-Erling Smørgrav.It Fl R Ar number 118*3fc9e2c3SDag-Erling SmørgravRetry this many times when a query does not receive an answer 119*3fc9e2c3SDag-Erling Smørgravin time. The default is 1 retry. If 120*3fc9e2c3SDag-Erling Smørgrav.Ar number 121*3fc9e2c3SDag-Erling Smørgravis negative or zero, 1 is used instead. 122*3fc9e2c3SDag-Erling Smørgrav.It Fl s 123*3fc9e2c3SDag-Erling SmørgravReport SERVFAIL responses as they are, do not ignore them. 124*3fc9e2c3SDag-Erling Smørgrav.It Fl T 125*3fc9e2c3SDag-Erling SmørgravQuery name server over TCP. By default UDP is used, except for 126*3fc9e2c3SDag-Erling Smørgrav.Cm AXFR 127*3fc9e2c3SDag-Erling Smørgravand 128*3fc9e2c3SDag-Erling Smørgrav.Cm IXFR 129*3fc9e2c3SDag-Erling Smørgravqueries, which require TCP. 130*3fc9e2c3SDag-Erling Smørgrav.Nm 131*3fc9e2c3SDag-Erling Smørgravwill also retry UDP queries in TCP mode if the UDP response was 132*3fc9e2c3SDag-Erling Smørgravtruncated (i.e. had TC bit set). 133*3fc9e2c3SDag-Erling Smørgrav.It Fl t Ar type 134*3fc9e2c3SDag-Erling SmørgravPerform DNS query of type 135*3fc9e2c3SDag-Erling Smørgrav.Ar type , 136*3fc9e2c3SDag-Erling Smørgravwhich can be any standard query type name 137*3fc9e2c3SDag-Erling Smørgrav.Pq Cm A , CNAME , MX , TXT , No etc , 138*3fc9e2c3SDag-Erling Smørgrava wildcard query 139*3fc9e2c3SDag-Erling Smørgrav.Pq Cm ANY , 140*3fc9e2c3SDag-Erling Smørgravor 141*3fc9e2c3SDag-Erling Smørgrav.Cm TYPE Ns Ar N , 142*3fc9e2c3SDag-Erling Smørgravwhere 143*3fc9e2c3SDag-Erling Smørgrav.Ar N 144*3fc9e2c3SDag-Erling Smørgravis a number from 1 to 65535. For 145*3fc9e2c3SDag-Erling Smørgrav.Cm IXFR Pq incremental zone transfer 146*3fc9e2c3SDag-Erling Smørgravqueries the starting serial number can be specified by appending 147*3fc9e2c3SDag-Erling Smørgravan equal sign followed by the number 148*3fc9e2c3SDag-Erling Smørgrav.Pq e.g. Fl t Cm IXFR Ns =12345678 . 149*3fc9e2c3SDag-Erling Smørgrav.Pp 150*3fc9e2c3SDag-Erling SmørgravThe default is to query for 151*3fc9e2c3SDag-Erling Smørgrav.Cm A , AAAA , No and Cm MX 152*3fc9e2c3SDag-Erling Smørgravrecords, unless 153*3fc9e2c3SDag-Erling Smørgrav.Fl C 154*3fc9e2c3SDag-Erling Smørgravor 155*3fc9e2c3SDag-Erling Smørgrav.Fl l 156*3fc9e2c3SDag-Erling Smørgravoptions are given (in which case 157*3fc9e2c3SDag-Erling Smørgrav.Cm SOA 158*3fc9e2c3SDag-Erling Smørgravor 159*3fc9e2c3SDag-Erling Smørgrav.Cm AXFR 160*3fc9e2c3SDag-Erling Smørgravqueries are made) or 161*3fc9e2c3SDag-Erling Smørgrav.Ar name 162*3fc9e2c3SDag-Erling Smørgravis a valid IP address 163*3fc9e2c3SDag-Erling Smørgrav(in which case reverse lookup using 164*3fc9e2c3SDag-Erling Smørgrav.Cm PTR 165*3fc9e2c3SDag-Erling Smørgravquery is performed). 166*3fc9e2c3SDag-Erling Smørgrav.It Fl v 167*3fc9e2c3SDag-Erling SmørgravProduce verbose output. 168*3fc9e2c3SDag-Erling Smørgrav.It Fl w 169*3fc9e2c3SDag-Erling SmørgravWait forever (or for a very long time) for response from the 170*3fc9e2c3SDag-Erling Smørgravname server. 171*3fc9e2c3SDag-Erling Smørgrav.It Fl W Ar wait 172*3fc9e2c3SDag-Erling SmørgravWait this many seconds for a reply from name server before timing 173*3fc9e2c3SDag-Erling Smørgravout. If 174*3fc9e2c3SDag-Erling Smørgrav.Ar wait 175*3fc9e2c3SDag-Erling Smørgravis negative or zero, value of 1 is used. The default is to wait 176*3fc9e2c3SDag-Erling Smørgrav10 seconds for TCP connections, and 5 seconds for UDP (both are 177*3fc9e2c3SDag-Erling Smørgravsubject to retries, see option 178*3fc9e2c3SDag-Erling Smørgrav.Fl R ) . 179*3fc9e2c3SDag-Erling Smørgrav.It Fl 4 180*3fc9e2c3SDag-Erling SmørgravOnly use IPv4 transport. 181*3fc9e2c3SDag-Erling Smørgrav.It Fl 6 182*3fc9e2c3SDag-Erling SmørgravOnly use IPv6 transport. 183*3fc9e2c3SDag-Erling Smørgrav.El 184*3fc9e2c3SDag-Erling Smørgrav.Sh FILES 185*3fc9e2c3SDag-Erling Smørgrav.Pa /etc/resolv.conf 186*3fc9e2c3SDag-Erling Smørgrav.Sh SEE ALSO 187*3fc9e2c3SDag-Erling Smørgrav.Xr drill 1 , 188*3fc9e2c3SDag-Erling Smørgrav.Xr resolv.conf 5 189*3fc9e2c3SDag-Erling Smørgrav.Sh COMPATIBILITY 190*3fc9e2c3SDag-Erling Smørgrav.Nm 191*3fc9e2c3SDag-Erling Smørgravaims to be reasonably compatible with 192*3fc9e2c3SDag-Erling Smørgrav.Sq host 193*3fc9e2c3SDag-Erling Smørgravutility from BIND9 distribution, both in supported options and 194*3fc9e2c3SDag-Erling Smørgravin produced output. Here is a list of known notable differences: 195*3fc9e2c3SDag-Erling Smørgrav.Bl -bullet 196*3fc9e2c3SDag-Erling Smørgrav.It 197*3fc9e2c3SDag-Erling SmørgravDebugging options 198*3fc9e2c3SDag-Erling Smørgrav.Pq Fl D No and Fl m 199*3fc9e2c3SDag-Erling Smørgravare not supported. 200*3fc9e2c3SDag-Erling Smørgrav.It 201*3fc9e2c3SDag-Erling SmørgravQuery class 202*3fc9e2c3SDag-Erling Smørgrav.Cm CLASS0 203*3fc9e2c3SDag-Erling Smørgravand type 204*3fc9e2c3SDag-Erling Smørgrav.Cm TYPE0 205*3fc9e2c3SDag-Erling Smørgravare not supported. 206*3fc9e2c3SDag-Erling Smørgrav.It 207*3fc9e2c3SDag-Erling SmørgravBackslashes in domain names are treated especially. 208*3fc9e2c3SDag-Erling Smørgrav.It 209*3fc9e2c3SDag-Erling SmørgravThe maximum of 255 retries (option 210*3fc9e2c3SDag-Erling Smørgrav.Fl R ) 211*3fc9e2c3SDag-Erling Smørgravare supported. 212*3fc9e2c3SDag-Erling Smørgrav.It 213*3fc9e2c3SDag-Erling SmørgravSome resource records are formatted differently. For example, 214*3fc9e2c3SDag-Erling Smørgrav.Cm RRSIG 215*3fc9e2c3SDag-Erling Smørgravand 216*3fc9e2c3SDag-Erling Smørgrav.Cm DNSKEY 217*3fc9e2c3SDag-Erling Smørgravrecords are displayed without spaces in them. 218*3fc9e2c3SDag-Erling Smørgrav.It 219*3fc9e2c3SDag-Erling SmørgravWhen parsing 220*3fc9e2c3SDag-Erling Smørgrav.Pa /etc/resolv.conf 221*3fc9e2c3SDag-Erling Smørgravcommands 222*3fc9e2c3SDag-Erling Smørgrav.Ic sortlist 223*3fc9e2c3SDag-Erling Smørgravand 224*3fc9e2c3SDag-Erling Smørgrav.Ic options 225*3fc9e2c3SDag-Erling Smørgravare ignored. When multiple 226*3fc9e2c3SDag-Erling Smørgrav.Ic search 227*3fc9e2c3SDag-Erling Smørgravand/or 228*3fc9e2c3SDag-Erling Smørgrav.Ic domain 229*3fc9e2c3SDag-Erling Smørgravcommands are present, 230*3fc9e2c3SDag-Erling Smørgrav.Nm 231*3fc9e2c3SDag-Erling Smørgravfirst uses the last 232*3fc9e2c3SDag-Erling Smørgrav.Ic domain 233*3fc9e2c3SDag-Erling Smørgravcommand, and then all of 234*3fc9e2c3SDag-Erling Smørgrav.Ic search 235*3fc9e2c3SDag-Erling Smørgravcommands, while 236*3fc9e2c3SDag-Erling Smørgrav.Sq host 237*3fc9e2c3SDag-Erling Smørgravfrom BIND9 uses whatever command was specified last. 238*3fc9e2c3SDag-Erling Smørgrav.It 239*3fc9e2c3SDag-Erling Smørgrav.Sq Pseudosection TSIG 240*3fc9e2c3SDag-Erling Smørgravis missing from verbose packet output. 241*3fc9e2c3SDag-Erling Smørgrav.El 242*3fc9e2c3SDag-Erling Smørgrav.Sh AUTHORS 243*3fc9e2c3SDag-Erling Smørgrav.An Vitaly Magerya Aq magv@tx97.net 244