On Thu, Apr 07, 2011 at 11:42:28AM +0700, mee thun wrote: > Good Morning.. > > I am new member in this mailing list. I need help to change the query type > in the nslookup command. > The default nslookup using A, but I use ipv6 so the query type must use > AAAA. I don't know how to change the default nslookup from A to AAAA > permanently?
As noted, 'nslookup' is part of the BIND package as well as available elsewhere. In some of those venues, nothing else is available to do the trick. When BIND is installed, 'host' and 'dig' are available. While 'nslookup' often works fine when DNS is working correctly, 'dig' is the tool of choice for when it's not working or unknown status. % dig aaaa a.root-servers.net or, easier to read: % dig +noall +answer aaaa a.root-servers.net % host -t aaaa a.root-servers.net Or, to partially answer the actual question: % nslookup -type=aaaa a.root-servers.net or $ nslookup > set type=aaaa > a.root-servers.net > exit or even better, for several popular versions of the shell, $ alias nslookup="`which nslookup` -type=aaaa" $ nslookup a.root-servers.net $ nslookup puck.nether.net That 'alias' command can be put in a .login or .profile or similar file, but must not be put [in that form] in a .bashrc or .kshrc or similar file where it will be run more than once. Now, if you are lucky enough to be on a Linux or BSD or Unix or Mac system, run $ man nslookup $ man host $ man dig $ man alias for more information. -- /*********************************************************************\ ** ** Joe Yao j...@tux.org - Joseph S. D. Yao ** \*********************************************************************/ _______________________________________________ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users