Last update: 11/1/2017
Exercise #5 - The objective of this exercise includes the following:
- Learn about Internet Video
- Continue to develop expertise with Linux and network monitoring tools.
- You are to do this on your own or in a group (4 max please). Type or write down your answers to the questions and turn in at the required time. Please make sure to write down the names of all team members. As with all exercises, this will not be graded. However, I'm interested to see what you all come up with!!
- As a heads up, you might find that youtube uses UDP rather than TCP.
- First step is to learn about Internet Video - read section 2.6 in the Kurose text.
- Second, you are to collect a packet trace using tcpdump of a youtube video session (4 minutes or so).
- Third, on your VM you will need to install the following tools. Issue sudo apt-get install each of the following
- sudo apt-get update #I usually do this before installing anything new....just updates stuff on your system
- sudo apt-get install libpcap-dev
- sudo apt-get install wireshark-common
- sudo apt-get install tcptrace
- wget https://people.cs.clemson.edu/~jmarty/courses/Fall-2017/CPSC360/code/timeslice.tar.gz
- And then 'gzip -d timeslice.tar.gz';tar -xf timeslice.tar; make clean; make;
- Issue timeslice to see the help page
- Optionally, install
- Fourth, download this script to your VM in the same location where you placed your tcpdump file : https://people.cs.clemson.edu/~jmarty/courses/Fall-2017/CPSC360/exercises/EX2/goEX2.sh
- The easiest way to get this to your VM, from a shell on your VM, 'wget https://people.cs.clemson.edu/~jmarty/courses/Fall-2017/CPSC360/exercises/EX2/goEX2.sh'
- You then will likely have to change the permission bits on the goEX2.sh. Issue a 'chmod 755 goEX2.sh'. The following shows how I did all of this:
- wget https://people.cs.clemson.edu/~jmarty/courses/Fall-2017/CPSC360/exercises/EX2/goEX2.sh
--2017-11-01 16:06:43-- https://people.cs.clemson.edu/~jmarty/courses/Fall-2017/CPSC360/exercises/EX2/goEX2.sh
Resolving people.cs.clemson.edu (people.cs.clemson.edu)... 130.127.201.228, 2620:103:a004:e::228
Connecting to people.cs.clemson.edu (people.cs.clemson.edu)|130.127.201.228|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2639 (2.6K) [text/x-sh]
Saving to: ‘goEX2.sh’
- goEX2.sh 100%[===========================================================>] 2.58K --.-KB/s in 0.004s
- 2017-11-01 16:06:43 (626 KB/s) - ‘goEX2.sh’ saved [2639/2639]
- jjm@jjm-VirtualBox:~/tmp$ ls -lt goEX2.sh
-rw-rw-r-- 1 jjm jjm 2639 Oct 24 21:50 goEX2.sh
- jjm@jjm-VirtualBox:~/tmp$ chmod 755 ./goEX2.sh
jjm@jjm-VirtualBox:~/tmp$ ls -lt goEX2.sh
-rwxr-xr-x 1 jjm jjm 2639 Oct 24 21:50 goEX2.sh
- To run goEX2.sh:
./goEX2.sh mytracefile.dmp #the script takes a single parameter- the name of your tcpdump trace file
- Using the tools and techniques from Ex2 (in particular, look at this script, answer the following about your traced session:
- What is the average DS and US bandwidth consumed during the video session?
- How many TCP (or UDP) connections do you see? (Note, use the '-u' parameter on tcptrace to make sure it looks for udp packets along with tcp packets)
- How many servers are involved ?
- Show a sorted list of all sessions, sorted by bandwidth consumed. Just show the top ten flows that consumed the most bandwidth
- Look at EX2.sh, at the lines:
- timeslice -S -i DS.dmp > DS.timesliceFlows
- cat DS.timesliceFlows| awk '{print $2}' | sort | uniq -c > DS.flowcounts
- Timeslice will parse the DS dump file and printout a summary for each tcp session.
- The cat pipeline cat's the file to awk which processes the stream line by line, printing to std out the second field of each line (the dst IP), this stream is piped to sort which sorts based on character strings and outputs the sorted stream to uniq which reduces the stream by removing duplicate lines, the -c prepends the # of duplicates found, and this redirects to the output file. We need to change this last line slightly to put the DS.flowcounts in sorted order based on the first field. Edit EX2.sh and modify that line to the following:
- cat DS.timesliceFlows| awk '{print $2}' | sort | uniq -c | sort -g -r > DS.flowcounts.
- For my trace, DS.flowcounts is 468 lines, which tells me there are 468 connections. The beginning of this file is shown below. This says that 190 cxs involve the destination 69.172.216.111. To learn who owns this address, 'whois 69.172.216.111' shows the organization assigned to this IP address is http://corpo.cogeco.com/cca/en/company-overview/subsidiaries/cogeco-peer-1/. And, as we would expect, they are a ISP/Hosting provider.
-
- 190 69.172.216.111
46 192.82.242.50
43 69.172.216.55
30 23.211.100.195
24 23.211.100.128
24 173.241.242.143
16 23.211.102.195
16 173.241.242.220
15 68.67.178.230
15 63.251.210.233
14 151.101.58.62
13 69.172.216.58
13 64.124.217.61
13 172.217.7.162
13 152.163.66.165
12 69.166.1.14
12 204.2.197.211
12 192.243.250.36
12 143.215.193.206
11 72.21.81.48
11 63.251.88.56
11 50.116.194.23
11 50.116.194.21
11 172.217.7.234
11 152.163.56.2
11 151.101.56.249
10 74.117.199.102
10 54.88.110.240
--More--