[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 469
  • Last Modified:


Using NSLOOKUP on Unix how can I find the names and IP addresses of :

1) The name servers at a specific site
2) The top level root servers
3) 2 name servers for a specific country (eg France)
4) 2 names servers for EDU and COM domains (for the US)
5) all of the hosts on a given network

Also are there any good internet guides on how to use NSLOOKUP ?

I would be grateful for all help offered regarding this.

1 Solution
You are stuck....

(If I may say it sounds like a Uni assignment....)

1. This is OK.

type in the name, you will probably be a non-authoritative answer.
(set querytype=ANY)


server 'the_server'

.....job done

2. Read some DNS RFC

3. Read some DNS RFC addendum

4. blah

5. ls <domain> but nobody supports that cos its a security stupidity.!
Taking your tasks in order:

1) "nslookup -query=ns server.com." will return all nameservers for server.com.

2) "nslookup -query=ns ." returns all the nameservers for the top-level domain.

3) "nslookup -query=ns fr." to get nameservers for France. Well it gets more than two, but surely you could just pick two that you like.

4) "nslookup -query=ns com." for the COM domain, EDU ought to be obvious.

5)  If the remote dns allows it, you can list out the names in a domain with nslookup in interactive mode, like:

levie> nslookup
> ls some-dom.com
  <a list of hosts/IP's shows up here>

The man pages for nslookup will tell you quite a bit about its capabilities, and you can find out a lot more about nslookup and DNS in general in "DNS and BIND" (O'Rielly & Associates).
The above answer is probably absolutely correct....  But I'm really lazy.



Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now