nslookup

whois

The following sections briefly describe these tools and provide examples of their use.

dig

The Domain Information Groper is a command-line utility that queries DNS nameservers. By default, dig uses the nameservers listed in /etc/resolv.conf and performs an NS (nameserver) query. Reverse lookups are accomplished with the -x argument with a default A (Address) query.

Here is an example of a forward lookup with dig:

$ dig www.pearson.com

; <<>> DiG 9.5.0a6 <<>> www.pearson.com

;; global options: printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5889

;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3

;; QUESTION SECTION:

;www.pearson.com.               IN A

;; ANSWER SECTION:

www.pearson.com.          86400 IN A  195.69.212.200

;; AUTHORITY SECTION:

pearson.com.              46430 IN NS ns2.pearson.com.

pearson.com.              46430 IN NS oldtxdns2.pearsontc.com.

pearson.com.              46430 IN NS ns.pearson.com.

;; ADDITIONAL SECTION:

ns.pearson.com.          162044 IN A  195.69.213.15

ns2.pearson.com.          78028 IN A  195.69.215.15

oldtxdns2.pearsontc.com. 139762 IN A  192.251.135.15

;; Query time: 50 msec

;; SERVER: 192.168.0.1#53(192.168.0.1)

;; WHEN: Sun Oct 28 20:02:53 2007

;; MSG SIZE rcvd: 166

And here is a reverse lookup with dig:

$ dig 195.69.212.200

; <<>> DiG 9.5.0a6 <<>> 195.69.212.200

;; global options: printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 53249

;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:

;195.69.212.200.                IN A

;; AUTHORITY SECTION:

.                         10800 IN SOA A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2007102800 1800 900 604800 86400

;; Query time: 47 msec

;; SERVER: 192.168.0.1#53(192.168.0.1)

;; WHEN: Sun Oct 28 20:03:49 2007

;; MSG SIZE rcvd: 107

host

A command-line utility, host performs forward and reverse lookups by querying DNS nameservers, similar to dig.

Here's an example of a forward lookup with host:

$ host www.pearson.com

www.pearson.com has address 195.69.212.200

Here's a reverse lookup with host:

$ host 195.69.212.200

200.212.69.195.in-addr.arpa domain name

pointer www.environment.pearson.com.

200.212.69.195.in-addr.arpa domain name

pointer booktime.pearson.com.

200.212.69.195.in-addr.arpa domain name

pointer environment.pearson.com.

nslookup

A command-line utility, nslookup can be used in an interactive or noninteractive manner to query DNS nameservers. Note that nslookup is outdated; try using dig instead.

Here's an example of a forward lookup using nslookup:

$ nslookup www.pearson.com

Server:  192.168.0.1

Address: 192.168.0.1#53

Non-authoritative answer:

Name: www.pearson.com Address: 195.69.212.200

Here's a reverse lookup using nslookup:

nslookup 195.69.212.200

Server:  192.168.2.1

Address: 192.168.2.1#53

Non-authoritative answer:

200.212.69.195.in-addr.arpa name = environment.pearson.com.

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату