



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Goal: Understanding the network by watching how TCP adapts.
This project is separate from the prior assignments, does not use the multicast code, and does not require that you write in C. You will turn in two artifacts: code that performs the analysis described in this handout—producing the graphs required, and a four-page written description of what you find. Expectations for, and formatting of, the write up are discussed below. You will analyze a web transaction using a trace of network packets captured by a packet sniffer. You will observe the sniffed packets to look for TCP retransmissions, congestion control behavior, flow control behavior, and estimate round trip time. Since running a packet sniffer requires Administrator or root privileges, I will run the packet sniffer on a server in the department. It will trace only the transactions accessing the web server currently running there. The sniffer will generate files (one per day) with the headers from each of these packets. You will then download some of these files and apply the analysis code you write to the file. I can’t promise that the machine will always be operational; email if it isn’t. Additional background on packet sniffing can be found in the Sniffer FAQ [3] and the tcpdump home page [1]. You may also find the pcap(3) and tcpdump(8) man pages helpful. There are interfaces to “pcap”-formatted capture files for ruby, perl, python, java, and of course, C. These interfaces will allow you to extract one packet at a time for processing. There are tools that help with the analysis of pcap files. The most basic is “tcpdump -nr filename | less”, which will print some of the packet information as text. You could parse this text output if you don’t want to use the pcap interfaces—I discourage this because you’ll certainly learn less. The more advanced is “ethereal” or “wireshark”, which is the GUI I’ve used to decode packets in class. You might be able to “browse” the trace easily from this tool, and its analysis features are quite good, but they don’t match precisely what I want you to do.
The first phase of the project consists of generating data to analyze later. The goal is to download from the web server from as many different places as possible in order to generate diverse network traces. Your task in Phase One is to find some reasonably interesting web client and follow the link from the course web page to download a picture of a Western Scrub-jay. This will generate a trace of network packets sent between scriptroute and that machine. The url to download is http://scriptroute.cs.umd.edu:8417/Jay.jpg. All you have to do is download the picture completely, once, and then make note of the following client attributes:
You can get the first two attributes even on machines you know nothing about by visiting a script like http:// www.uaf.edu/cgi-bin/printenv.pl. Copy down REMOTE HOST, REMOTE ADDR and HTTP USER AGENT. Please try to have Phase One complete before Friday the 24th. It should only take a few minutes to download the file and collect this information. You can do this while you’re bored at your parents’ house over thanksgiving.
Phase two is the initial analysis of these traces. You will analyze both the trace you generated and one other trace, chosen as randomly as you can. The intent is that you can calibrate your analysis skills on the trace you already know something about, then apply these skills to a trace you don’t know anything about. If all goes well, the trace you generated and the trace you chose will be noticeably different. Download and compile template-four.tar.gz. This procedure builds ./sequencer. Download one or two of the traces. They have the form [date].tcpd, eg. Nov18.tcpd. Run:
wget http://www.cs.umd.edu/class/fall06/cmsc417/four-template.tar.gz tar xvfz four-template.tar.gz cd 417-pa4-0. wget http://scriptroute.cs.umd.edu/417/traces/Nov18.tcpd wget http://scriptroute.cs.umd.edu/417/traces/Nov19.tcpd ./configure make ./sequencer -r Nov18.tcpd -f "ip host 10.1.2.3" -o Nov18-
Substitute the date and IP address as appropriate. The filter (-f) passes only packets that are to or from 10.1.2. to the sequencer program. This means that even if several different connections are in the same trace, you’ll look at only the connections to a particular IP address, and ideally there is only one such connection. The double quotes are important; they pass the three word phrase as a single argument to the program. The output basename option (-o) specifies the prefix to use for each of the output files. After execution, Nov18-123.seq and Nov18-123.ack will be created in the current directory. To find a list of destinations in a trace,
tcpdump -nr Nov18.tcpd | awk ’{print $3}’ | sort -u | less
Figure 1: Phase One: Download the Western Scrub-jay from an interesting web client.
Figure 3: Phase Three: Enhance the sequencer program to generate graphs you will insert into a report.
Use your judgement in how much text you need to explain the graphs and answer the questions listed above. Make sure you answer all (appropriate) questions, but please do not list them in your write up.
Grading for this assignment will be based on:
The project is due Wednesday, December 6. I expect the report to be turned in, in hard copy, at the end of class. If you find that you desperately need the extra evening, I will accept electronic submission of PostScript (attach a Word document only if you think your PostScript didn’t work) documents until midnight by email. I will be very unhappy if it takes me time to print out your document or find that it loads some evil Word virus. Try to at least have a plan for how to simply measure each performance attribute before Monday the 4th. That will give you some time to ask for clarification.
You may be able to do the entire project under windows, although you’ll likely need winpcap [2]. If dealing with pcap in this way is a headache, you may instead process the pcap dumps into text output using tcpdump (eg. tcpdump -nr Nov18.tcpd ip host 10.1.2.3 > file), then parse the text file using whatever tools you find useful. I have not tried to make this project work under windows, so there are no guarantees it will work. In particular, the getopt functions may represent a minor headache. If I were a windows addict and wanted to do most of the programming under windows, I would use the unix sequencer program to generate an intermediate representation of the network trace, consisting of a list of (time, se- quence number, data or ack, data length or advertised window size) tuples. I would then transfer this digested form to a windows machine, and write a windows program to fscanf() each line and process it. There may even be appropriate tools to go directly to a graph widget.
Hidden web proxies may affect the downloads.
[1] TCPDUMP public repository. http://www.tcpdump.org/. [2] winpcap. http://netgroup-serv.polito.it/winpcap/. [3] R. Graham. Sniffing (network wiretap, sniffer) FAQ. http://www.robertgraham.com/pubs/sniffing-faq. html. [4] J. Plank. Jgraph. http://www.cs.utk.edu/˜plank/plank/jgraph/jgraph.html.