Last update: 11/1/2017


Exercise #2 - The objective of this exercise includes the following:

 

First step is to learn further details related to network config and admin on a Linux Ubuntu system.

 

Second, we will do the following activities to obtain a tcpdump trace of a web browsing session.

Please perform the following three steps. We will perform an experiment- browse a web site, collect network trace data and analyze the results. I use a specific example - web browsing www.usatoday.com. The results vary GREATLY depending on the website.

Step 1. Setup tcpdump. On your VM, open a terminal. Cd to a tmp directory and perform the following:

 

Step 2. Start a browser in your VM. Browse the web site for about 2 minutes. Pick a site that you are interested in and browse as you normally might browse the site.

Step 3. After 2-3 minutes, issue a CNT-C to terminate tcpdump. This trace contains data flowing from the Internet to your VM (referred to as downstream data) as well as data flowing from your VM to the Internet (upstream data). It's a bit easier to work with a tracefile containing only DS traffic. Issue : sudo tcpdump -r webTrace1.dmp -w webTrace1DS.dmp 'dst 10.0.2.15'

It might be convenient to be able to analyze the trace file without issueing a sudo, so issue the following chown command:


jjm@jjm-VirtualBox:~/courses/cpsc360/ex2$ ls -lt *.dmp
-rw-r--r-- 1 root root 40079872 Oct 23 12:47 webTrace1DS.dmp
-rw-r--r-- 1 root root 46284278 Oct 11 12:26 webTrace1.dmp
-rw-r--r-- 1 jjm jjm 1316 Oct 4 13:21 ex2-1.dmp
sudo chown jjm:jjm *.dmp
jjm@jjm-VirtualBox:~/courses/cpsc360/ex2$ ls -lt *.dmp
-rw-r--r-- 1 jjm jjm 40079872 Oct 23 12:47 webTrace1DS.dmp
-rw-r--r-- 1 jjm jjm 46284278 Oct 11 12:26 webTrace1.dmp
-rw-r--r-- 1 jjm jjm 1316 Oct 4 13:21 ex2-1.dmp
jjm@jjm-VirtualBox:~/courses/cpsc360/ex2$

 

Third step is to use tools such as capinfo, tcptrace and timeslice to analyze the tcpdump traces.

Tcptrace a widely used tool for analyzing tcpdump traces. You likely need to install it: sudo apt-get install tcptrace

We want to find the following results (refer to the script goEX2.sh, invoke 'goEX2.sh webTrace1.dmp' )

Running the script, shows:

Aggregate DS Bandwidth ...
1131 Kbps
Number of TCP cxs ....
1946
And number of different IP destination hosts ...
468, the IP used by the most connections (190) is 69.172.216.111