Jump to content

Computer Networks/Nslookup/Recurse

From Wikiversity

Nslookup is a command-line tool used to query a Domain Name System (DNS) server to obtain an IP address mapping or other DNS records. These activities will show you how to use the nslookup command to simulate recursive queries.

Preparation

[edit | edit source]

To prepare for this activity:

  1. Start your operating system.
  2. Log in if necessary.

Activity 1 - Perform a Recursive Query

[edit | edit source]

To perform a recursive query:

  1. Open a command prompt.
  2. Type nslookup en.wikiversity.org and press Enter.
  3. Observe the results. Notice the IP address listed for this host name. Note that this is a recursive query. The following activity will simulate the queries necessary to return this address information.

Activity 2 - Simulate a Recursive Query

[edit | edit source]

To simulate a recursive query:

  1. Type nslookup -norecurse -type=ns org. a.root-servers.net and press Enter. The -norecurse option forces nslookup to issue a non-recursive or iterative query. This is the type of query that DNS servers typically issue to other DNS servers.
  2. Observe the results. Notice the name servers listed for the org. domain. Select the first org. name server IP address returned.
  3. Type nslookup -norecurse -type=ns wikiversity.org. <org. name server>, where <org. name server> is the first org. name server IP address listed above. Then press Enter.
  4. Observe the results. Notice the name servers listed for the wikiversity.org. domain. Select the first wikiversity.org. name server IP address returned.
  5. Type nslookup -norecurse en.wikiversity.org. <wikiversity.org. name server>, where <wikiversity.org. name server> is the first wikiversity.org. name server IP address listed above. Then press Enter.
  6. Observe the results. Notice the IP address should match the IP address for en.wikiversity.org returned in Activity 1 above.
  7. Close the command prompt to complete this activity.

Readings

[edit | edit source]

References

[edit | edit source]