Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
dnsget(1)		    General Commands Manual		     dnsget(1)

       dnsget -	DNS lookup utility

       dnsget [-v|-q] [-c class] [-t type] [-o opt,opt,...]  name...

       dnsget  is  a  simple  command-line  to perform DNS lookups, similar to
       host(1) and dig(1).  It is useable for both interactive/debugging  sce-
       narious	and  in	scripts.  The program is implemented using udns(3) li-

       By default, dnsget produces a human-readable output, similar to CNAME A MX 10
       which is	just sufficient	to see how a given name	resolves.  Output for-
       mat is controllable with	-v and -q options -- the former	increases ver-
       bosity level up to printing the whole DNS contents of all packets  sent
       and  received,  which is	suitable for debugging DNS problems, while the
       latter reduces the level, making	output more quiet, up to  bare	result
       with no error messages, which is	good for scripts.

       The following options are recognized by dnsget:

       -v     produce more detailed output.  More -v's means more details will
	      be produced.  With single	-v,dnsget will print contents  of  all
	      received	DNS packets (in	a readable format), while with -vv, it
	      will output all outgoing DNS packets too.

       -q     the opposite for -v -- produce less detailed output.  With  sin-
	      gle  -q,dnsget  will only	show (decoded) data from final DNS re-
	      source records (RR), while -qq also suppresses error messages.

       -t type
	      request record(s)	of the given type type.	  By  default,	dnsget
	      will  ask	 for IPv4 address (A) record, or for PTR record	if the
	      argument in question is an IPv4  or  IPv6	 address.   Recognized
	      types  include  A,  AAAA,	 MX, TXT, CNAME, PTR, NS, SOA, ANY and

       -c class
	      request DNS record(s) of the given class class.  By default dns-
	      get uses IN class.  Valid	classes	include	IN, CH,	HS, ANY.

       -a     (compatibility option).  Equivalent to setting query type	to ANY
	      and increasing verbosity level (-v).

       -C     (planned)

       -x     (planned)

       -o opt,opt,...
	      (may be specified	several	times).	 Set resolver  options	(in  a
	      form  option:value) as if	they were set in $RES_OPTIONS environ-
	      ment variable, or	set query flags:

		     Set initial query timeout to sec.

		     (re)try every query num times before failing.

		     set DNS UDP buffer	size to	bytes bytes.  Valid values are
		     from  512 to 65535.  If bytes is greather than 512, EDNS0
		     (RFC 2671)	extensions will	be used.

		     Use given UDP port	number num instead of the default port
		     53	(domain).

	      aa     set AA (auth only)	query bit.

	      nord   do	 not  set RD (recursion	desired) query bit (set	by de-

	      dnssec or	do
		     set DNSSEC	OK (DO)	query flag  (dnsget  does  not	verify
		     DNSSEC  signatures,  only	displays  them;	this is	set in
		     EDNS RR).

	      cd     set CD (checking disabled)	query bit.

       -n nameserver
	      Use the given nameserver(s) (may be specified  more  than	 once)
	      instead of the default.  Using this option has the same same ef-
	      fect as $NSCACHEIP or $NAMESERVERS environment  variables,  with
	      the  only	difference that	only IPv4 addresses are	recognized for
	      now, and it is possible to specify names (which will be resolved
	      using default settings) instead of IP addresses.

       -h     print short help and exit.

       When  all  names	 where	resovled successefully,	dnsget exits with zero
       exit status.  If	at least one name was not found, dnsget	will exit with
       return  code  100.  If some other error occured during name resolution,
       it will exit with code 99.  In case of usage or	initialization	error,
       dnsget will return 1.

       host(1) dig(1) resolv.conf(5) udns(3).

User Utilities			   Jan 2014			     dnsget(1)


Want to link to this manual page? Use this URL:

home | help