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.

netstat
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.
ping
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.

nslookup
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.
traceroute
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:

1.
ping localhost -n 3
2.
nslookup localhost
3.
traceroute localhost
4.
nslookup www.yahoo.com
5.
nslookup www.yahoo.com (again after an hour; did you get the same result?)
6.
nslookup 204.71.200.75
7.
ping www.yahoo.com -n 3
8.
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.
1.
How many gateways and interfaces are on your host and subnetwork? (Perhaps the netstat command can be used to answer this.)
2.
What happens if you ping non-existent addresses?
3.
What happens if you ping just the hostname of some host on your subnetwork?
4.
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?
5.
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
2/2/1998