Laboratory 2 - Basic UNIX and Network Utilities
Due - Tuesday, November 25, 2003
In part 1 of this lab you will be finding out more about UNIX. Following are a couple of URLs that you might find helpful. However, you should also spend some time web surfing on your own.
http://www.washington.edu/computing/unix/startdoc/
http://wks.uts.ohio-state.edu/unix_course/intro-137.html
http://www.math.utah.edu/lab/unix/unix-commands.html
One helpful hint as you do this assignment is to remember that you can find a great deal of information by consulting the man pages for the UNIX commands and network tools. These pages will tell you how to run the command/tool, and may also give you some insight into what the command/tool is for and how it works. If you want to access a man page you simply type man and the command. For example: man ping.
In part 2 of this lab, you will be using a number of tools to discover what is actually happening in the network. You will be asked to find out more about how to run the tools, understand how each of the tools works, and analyze the information we can gather from using the tools.
This assignment should be done on one of the Linux machines in the lab -- Clapp 202. All of the machines are dual boot. If you want to work on a machine that is currently in windows, reboot into the linux partition. Also, the machine cmpscii.mtholyoke.edu should remain in Linux so that you can log in remotely. You can telnet in from anywhere. If you want to do the assignment elsewhere, you should contact me first.
This assignment is to be done individually and should be turned in by the start of class on the due date. Late assignments will not be accepted (that is -- you will get a 0 if you do not turn the assigment in on time). No extensions will be granted without explicit prior approval from me.
Part 1
Question 1 - 5 points
Suppose you type the URL of the class web page in your browser and you get a page that says "403 Forbidden". What command would I need to use to remedy the situation so that you could load the page from anywhere?
Question 2 - 5 points
Suppose I wanted to create a "symbolic link" such that when I am in my home directory /users/fac/srollins I can type cd public_html and subsequently be in the directory /world/srollins. What command would I type?
Question 3 - 5 points
Suppose I am logged into MHC from home and I have pine running. Now, suppose my connection is lost but the pine process continues to run. What is the series of commands I would need to use to find and kill the process?
Question 4 - 10 points
Suppose I have run a simulation experiment and I have a file named myOutput that looks like the following:
waittime 30
servicetime 45
waittime 44
servicetime 105
waittime 77
waittime 99
servicetime 432
In order to manipulate the data, I want to have two files, the first should contain the waittime output and should look like:
30
44
77
99
And the second should contain the servicetime output and should look like:
45
105
432
So, I want to separate the waittime and servicetime results AND I want to get rid of everything but the actual data. How would I do that?
Question 5 - 10 points
Suppose I ask you to run the command traceroute. You log in to cmpscii and type traceroute, but you get the following output:
[srollins@cmpscii srollins]$ traceroute
bash: traceroute: command not found
Describe two ways I can get the traceroute program to run?
Part 2
Question 1 - 30 points
ping
Hint: You can use control-c to quit ping, or you can consult the man pages for more information on how to get ping to terminate in a more elegant fashion.
- a. Run the command:
ping umass.edu
This command will give you information about the connectivity between the computer you are using and the computer "umass.edu". What information can you gather from the output? Include at least three pieces of relevant information.
- b. Now run the command:
ping bigsky.cs.ucsb.edu
What is different about the output? Why?
- c. Find three additional computers (that are not in the umass.edu or ucsb.edu domains). Computer 1 should have an average response time of less than 10ms. Computer 2 should have an average response time greater than 10ms and less than 100ms. Computer 3 should have an average response time of greater than 100ms. For your answer, include the computers you chose and a print out of the output you got when pinging them.
- d. Suppose I were to ping the computer that you chose as computer 2 and the output showed an average response time of 500ms. What could be happening? Hint: There are a few correct answers to this question. Try thinking about how ping actually works.
- e. When I try pinging cnn.com, I get the following output:
mhc.mtholyoke.edu 49% ping cnn.com
PING cnn.com (64.236.24.28): 56 data bytes
----cnn.com PING Statistics----
24 packets transmitted, 0 packets received, 100% packet loss
Why do you suppose that is? See the hint for part d.
Question 2 - 20 points
traceroute
- a. Run the command:
traceroute bigsky.cs.ucsb.edu
This command will give you information about the entire path a packet may take when traveling from MHC to UC Santa Barbara. How many hops is it from MHC to UCSB? Based on the output, what can you say about how MHC is connected to the Internet?
- b. Now do a traceroute to www.cix.hr. Which hop experiences the most delay? Why?
- c. Go to www.traceroute.org in a browser. This website lists organizations that will allow you to perform a traceroute from their systems. Choose a location and do a traceroute from that location (using the website) and then use an MHC computer to do a traceroute back to the location. Are the traces the same (but in reverse order)? Will they always be the same? Why or why not?
Question 3 - 15 points
host
- a. Consult the man pages to find out more about running host. What is the IP address of snowbird.cs.ucsb.edu?
- b. Find the IP address of the mail exchanger for aol.com (you should surf the web to find out more about what the mail exchanger actually is). List the series of commands you used. Try that series of commands again. Did you get the same output? Do you think you will always get the same output? Why or why not?
Sami Rollins