DNS Lookup   «Prev  Next»
Lesson 3 Finding other record types
Objective Use nslookup to read other Types of Resource Records.

Use nslookup to read other Types of Resource Records

In its simplest form, nslookup extracts the A and PTR records from the DNS database. However, it is sometimes interesting (or useful) to use the nslookup command to read the SOA, HINFO, and other record types as well. To ask nslookup to extract other kinds of records, use the set type command.
  1. Address (A) record: An A record is a type of Resource Record that specifies an IP address-to-host name mapping.
  2. Pointer (PTR) record: A PTR record is a type of Resource Record that specifies a host name-to-IP address mapping.
  3. State of Authority (SOA) record: An SOA record is a type of Resource Record that sets basic parameters for a DNS zone of authority and marks the beginning of a zone. Every zone or subzone must have exactly one SOA record and the zone continues until another SOA record is encountered.
  4. Host information (HINFO) record: An HINFO record is a type of Resource Record that gives the operating system and architecture for the specified host.

Apply, Filter, Sort
  1. The set type command requests nslookup to obtain the full SOA Resource Record
  2. The set type command requests nslookup to obtain the full SOA Resource Record.
  3. The authoritative server for the acmetraining.com organization is ns1.portal.ca.acmetraining.com, and the responsible party is hostmaster.portal.ca.
  4. In this example, nslookup has also extracted NS records.
  5. In this example, nslookup has also extracted A records for the name servers.

Set type Command Output

nslookup Query

Examine the output of this command. This information came in a single nslookup query. In addition to the answer to a particular question, DNS queries contain authority information explaining where the information came from, and additional information which may be helpful. In our example, the authority information is the name server records, and the additional information is their IP addresses. This information saves you from having to do an additional A record query.

View Example: an HINFO query using nslookup

View the example below, this time with an HINFO query.
Note the HINFO record describing the machine raphael.math.uic.edu, together with the authority records and additional information.
System Information Record (HINFO): This record allows definition of the Hardware type and Operating System (OS) in use at a host. For security reasons these records are rarely used on public servers. If a space exists in the field it must be enclosed in quotes.

$ nslookup
Default Server: dns.class.com
Address: 196.241.12.122
> set type=HINFO
> raphael.math.uic.edu
Server: dns.class.com 
Address: 196.241.12.122

raphael.math.uic.edu  CPU = Intel     OS = linux
math.uic.edu  nameserver = newton.math.uic.edu
math.uic.edu  nameserver = dns2.math.uic.edu
math.uic.edu  nameserver = uic-dns1.uic.edu
math.uic.edu  nameserver = uic-dns2.uic.edu
math.uic.edu  nameserver = uic-dns3.uic.edu
newton.math.uic.edu   internet address = 131.193.178.229
uic-dns1.uic.edu      internet address = 128.248.2.50
uic-dns2.uic.edu      internet address = 128.248.7.50
uic-dns3.uic.edu      internet address = 128.248.171.50

Click the on the link below for some additional exploration of nslookup.
Using NSlookup