Homework 3: 22C:178 & 055:134

Computer Communications Fall 1998

Assignment 3

[due 16 September]

This assignment turns away from programming and Unix system calls to consider networking commands available in most Unix environments. (On some systems these commands have been restricted or disabled by the system administrator; in these cases you may use a CS department account for the assignment.)

A number of commands are quite useful for monitoring network performance and learning about the Internet. This assignment asks you 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 by a command line 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.

The Homework Questions

1.
For the first question, you will need to use ping. Find out where ping is located on your system (perhaps the command whereis ping will tell you this) and read the manual page for ping on your system. You should be able to try commands such as
ping localhost
ping localhost -c 2
ping www.lycos.com
Then download this file and name it reping in your directory. You will likely have to edit it and adjust it so that it works with your system. Enter the command chmod +x reping to make it an executable script. Feel free to modify the script to learn how things work (or are not working). The first homework question is: can you explain the output from reping?
2.
The second question is a simple use of the traceroute command. How many gateways (routers) are there between your system and www.yahoo.com?
3.
For the third question, you may need to read the output of man netstat for your system. How many gateways and interfaces are on your host and subnetwork, according to the routing table? (If convenient, show the output from the command you used to find the answer.)
4.
The fourth question is an exercise is using nslookup. What are the authoritative nameservers for the purdue.edu domain?
5.
The fifth question is another exercise using nslookup. How many of the different kinds of records (SOA, NS, CNAME, A, MX, etc) are there in the cis.ksu.edu domain?

Turning in your answers:

Prepare an email answering the above questions. Mail the homework to herman@cs.uiowa.edu and specify in the subject line, the course number, the assignment number and the last four digits of your student ID number (we are hoping that four digits will be unique). So, for example if your student number is 123456789, then the subject line of your email should be:

178 homework 3, student 6789
If you do not have such a subject line, I will bounce your letter back to you and ask for a resubmission of the homework.