Homework Assignments: 22C:178 & 055:134

Computer Communications Spring 1998

Assignment 3

[29 January]

A number of commands are quite useful for monitoring network performance and learning about the Internet. This assignment starts to experiment with four basic commands.

is a tool for monitoring current conditions on your host and statistics for the network interfaces on your host. Different Unix systems have different implementations of netstat, so you will have to see man netstat output for a description of the command syntax. A copy of the Linux man pages for netstat is located here.
is a tool to test network connectivity. Use the ping command to see if a specified Internet host is reachable from your machine. A copy of the Linux man pages for ping is located here. Warning: the ping command can get into a loop if you do not specify a count with the -n option, or it can wait for a long period if the specified host is not connected to the Internet. Use control-c to force ping to exit in these cases.

Note: the syntax and man pages for ping unfortunately differ depending on the Unix implementation. For instance on HP machines, the -n option specifies how many times the specified host will be tested; under Linux this is specified with the -c option.

is a powerful utility for resolving names, looking for IP addresses and names wherever they can be resolved, whether by /etc/hosts, DNS, or even NIS. But the primary terminology for nslookup is the DNS database of records. The nslookup utility can be executed either as a command or as an interactive program. If you use it as an interactive program, you will need to type exit to quit, just as you would for a Unix shell. To see a copy of the Linux man pages for nslookup, click here.
is an interesting tool, since you learn about current routing tables and conditions in the Internet. Follow this link to see a copy of the Linux manpage for traceroute.

Your task for this assignment is to try a number of different commands, examine the output, and attempt to explain the output. To start, try these commands:

ping localhost -n 3
nslookup localhost
traceroute localhost
nslookup www.yahoo.com
nslookup www.yahoo.com (again after an hour; did you get the same result?)
ping www.yahoo.com -n 3
traceroute www.yahoo.com
Now that you've tried a few basic versions of the commands and examined the man pages, try answering these questions.
How many gateways and interfaces are on your host and subnetwork? (Perhaps the netstat command can be used to answer this.)
What happens if you ping non-existent addresses?
What happens if you ping just the hostname of some host on your subnetwork?
Two numbers are reserved in the final octet of the dotted decimal notation, that is, there are two numbers never used for host IP addresses in the final digit z of an IP address of the form w.x.y.z. What are these numbers? What happens if you ping one of these numbers on your local subnet?
The man page for nslookup mentions something about listing all the hosts in a particular domain. Use nslookup interactively to determine the names of all the hosts on your subnetwork.

Ted Herman