Description
Exercise 1.1 Scaling Poisson traffic arrivals
Here, you create sample paths of different lengths, and compare them in scaled plots.

Consider a packet arrival pattern of a flow, where all packets have a constant size of 100 Bytes and where packet arrivals follow a Poisson process. The average traffic rate of the flow is Mbps.
The file poisson1.data contains a traffic trace of the data. The file has three columns:
Column 1: Packet number
Column 2: Timestamp (in microseconds)
Column 3: Packet size (in bytes).

Verify the measured mean bit rate of the flow with the target rate, by calculating the mean and the variance of the times between consecutive arrival events. Compare the values with the theoretically expected values.

Create three graphs that plot the data generated by the trace, viewed at different time scales. Each graph has 100 data points.

Plot 1: Generate a vector with 100 elements. Each element stores the number of bytes from the Poisson trace that arrive in a time period of 1 second.


1^{st} element: # bytes arriving in time period [0, 1 s];



2^{nd} element: # bytes arriving in time period [1, 2 s];



…


Plot 2: Generate a vector with 100 elements. Each element stores the number of bytes from the Poisson trace that arrive in a time period of 100 milliseconds, beginning at a randomly selected start time.


Pick a random starting point, e.g., time 30 s.



1^{st} element: # bytes arriving in time period [30, 30.1 s];



2^{nd} element: # bytes arriving in time period [30.1, 30.2 s];



….


Plot 3: Generate a vector with 100 elements. Each element stores the number of bytes from the Poisson trace that arrive in a time period of 10 milliseconds, beginning at a randomly selected start time.


Pick a random starting point, e.g., time 50.2 s.



1^{st} element: # bytes arriving in time period [50.2, 50.21 s]; o 2^{nd} element: # bytes arriving in time period [50.21, 50.22 s]; o ….


Plot the content of the vectors in three separate graphs, with the time intervals on the xaxis, and the number of bytes on the yaxis. The data points should be depicted as vertical bars (e.g., using the MATLAB function `bar()’ ).

Describe your observations of the graphs.
Exercise 1.2 Traffic with exponentially sized packets
You may skip Exercise 1.2.
Consider a packet arrival pattern of a flow, where packets arrive with an equal spacing of 800 sec (microseconds), and with an exponentially distributed packet size with parameter with average size 1/100 Bytes. The file poisson2.data contains a traffic trace of the data.

Verify the measured mean bit rate of the flow with the target rate, by calculating the mean and the variance of the times between consecutive arrival events. Compare the values with the theoretically expected values.

Provide a discussion where you compare the results with those from Exercise 1.1.
Exercise 1.3 Compound Poisson arrival process
Now consider a packet arrival pattern of a flow, which is a combination of the previously discussed flows. Here, the packet arrival events follow a Poisson process with rate = 1250 packets/sec, and the packet size has an exponential distribution with average size 1/100 Bytes. The file poisson3.data contains a traffic trace of the data.

Verify the measured mean bit rate of the flow with the target rate, by calculating the mean and the variance of the times between consecutive arrival events. Compare the values with the theoretically expected values.

Repeat the tasks in Exercise 1.1 with the above arrival flows.

Provide a discussion where you compare the results, with those of the other exercises.
Lab Report:

Include your answers to the tasks.

Include the plots, a description of the plots, and your observations and discussions.
In this part of the lab, you will explore the properties of a traffic flow that consists of compressed digital video traffic.
Digital video consists of a sequence of video frames that are displayed at a rate of typically 30 frames per seconds. Assuming a frame size of 720 x 480 pixels (a standard format used for digital video) and a depth of 24 bits per pixel, this results in a data rate 240 Mbps per video stream. Using modern compression methods, such as MPEG and H.264, the data rate can be drastically reduced to a few Mbps.
An MPEG encoder (and most other compression algorithms) generates three types of frames: Intracoded (I), Intercoded or predictive (P), and bidirectional (B). I frames are coded as still images not unlike JPEG; P frames encode the differences from the most recent I or P frame; and B are interpolations of the next and previous I or P frames. An MPEG encoder generates these frames in a repeating pattern, called the GroupofPicture (GOP) pattern. With 30 frames per second, the elapsed time between two frames is approximately 33 ms. A typical GOP pattern of IBBPBBPBB, where the dependencies between frames is indicated by arrows, is shown in the following figure:
As indicated in the figure, frame types have different sizes, with I frames being the largest and B frames the smallest. Note that a B frame is constructed from two reference frames of type I or P (e.g., Frame 3 above depends on Frame 1 and Frame 4). Thus, to encode or decode a B frame the transmitter or receiver must have available the next I or P frame. To account for this need, frames are transmitted in a different sequence than they are displayed. In the above example, the display and transmission sequence is as follows:

Display sequence: 1
2
3
4
5
6
7
8
9
10
Transmit sequence: 1
4
2
3
7
5
6
10
8
9
Due to the different sizes of of I, P, and B frames, the data rate of an MPEG encoded video sources changes from frame to frame. For this reason, compressed video such as MPEG, is referred to a Variable Bit Rate (VBR) video.
Exercise 2.1 Download a VBR video trace
Your first task is to download a file that contains a trace of a VBR video source. The file contains the frame sizes obtained from a compression of a picture movie. The size of the file is 2.6 MB.
Content: Silence of the Lambs (~ 30 min)
Source Format: DVD
Frame size and rate: CIF 352×288 @30 fps (frames per second)
Compression Algorithm: H.264/AVC (Full)
Quantizer (compression factor): 10
GoP Pattern: I B B B P B B B P B B B P B B B
Number of Frames: ~54000
Download the trace file from the following URL:
http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/lab1/movietrace.data

Explore the content of the file. The file contains one line for each frame and has multiple columns. The first four columns are relevant for us:
o Column 1: Sequence number of the frame (in transmit sequence)
o Column 2: Display time of the frame
o Column 3: Frame type
o Column 4: Frame size in bytes
o Columns 5 – 7: not used
Exercise 2.2 Determine statistical properties of the video trace

Compute the following properties of the video trace.

Number of frames and total number of bytes;

Size of the smallest frame, size of the largest frame, and mean frame size;

Size of the smallest, largest and mean I, P, and B frame;

Mean bit rate (Computed as the mean frame size divided by the frame duration);

Peak bit rate (Computed as the max. frame size divided by the frame
duration);


Ratio of the peak rate and the average rate. This peaktoaverage rate ratio is often used as an indicator how bursty a traffic flow is. A flow with a peaktoaverage ratio of 10 or higher is highly variable.


Generate a set of graphs that show the properties of the video trace:

Generate a graph that shows the frame size as a function of the frame sequence number. (Use the sequence in which the frames are listed in the file, i.e., the transmit sequence.)

Generate a graph that shows the distribution of I frames, P frames, and B frames. (xaxis is the frame size, yaxis is the relative frequency).
Exercise 2.3 Scaling Video traffic
As before with the Poisson traces, you are asked to generate and compare scaled plots of the video trace.

Create three plots of the video traffic trace viewed at different scales. Each graph has 100 data points.

Plot 1: Generate a vector with 100 elements. Starting with Frame 1, each element stores the amount of data from 500 frames of the video sequence.


1^{st} element: #bytes from the first 500 frames (frames 1, 2, …, 500).



2^{nd} element: #bytes from the frames 501,502, …, 1000.



…


Plot 2: Generate a vector with 100 elements. Starting with a randomly selected frame, each element stores the amount of data from 50 frames of the video sequence.


Pick a random starting point, e.g., frame 3000.



1^{st} element: #bytes from frames 3001, 3002, … 3050.



2^{nd} element: #bytes from frames 3051, 3052, … 3100.



….


Plot 3: Generate a vector with 100 elements. Starting with a randomly selected frame, each element stores the amount of data from 5 frames of the video sequence.


Pick a random starting point, e.g., frame 5010.



1^{st} element: #bytes from frames 5010, 5011, … 5015. o 2^{nd} element: #bytes from frames 5016, 5017, … 5018. o ….


Plot the content of the vectors in three separate graphs, with the frame number on the xaxis, and the number of bytes on the yaxis. The data points should be depicted as vertical bars (e.g., using the MATLAB function bar() ).

Describe your observations of the graphs, and compare them to the scaled versions of the Poisson plots from Part 1.
Lab Report:

Include your answers to the exercises. Include the plots, a description of the plots, and your observations and discussions.
Until the early 1990s, it was common to represent traffic in a packet network by a Poisson process. Measurement studies performed in late 1980s showed that this is not a good assumption. One of the most influential such studies, done by Will Leland and Dan Wilson in 1989, measured the total traffic in an Ethernet network at the Bellcore Morristown Research and Engineering facility. The researchers collected traffic traces that each contains a million packet arrivals seen on an Ethernet network.
These traces, the most extensive measurement study at the time, were studied extensively, and led to the conclusion that aggregate traffic (=traffic from many traffic sources) is not “Poissonlike”. In fact, it was convincingly argued that aggregate packet traffic is “selfsimilar”, meaning, that it looks roughly the same if viewed at different scales. This discovery of the selfsimilarity of Ethernet traffic had important implications on the design of networks and packet switches.
Exercise 3.1 Download an Ethernet traffic trace
Download one of the Bellcore traffic traces. The file contains one line for each captured Ethernet packets, with two columns. The first column is a timestamp (in seconds), the second column is the size of the captured Ethernet packets (in Bytes).
Content: August 1989 trace from Bellcore
Start date: Aug 29, 1989, 11:25am
Data is recorded for about 3142.82 seconds (until 1,000,000 packets had been captured).

The total trace can be downloaded as a compressed file (5 MB) is available from http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/BCpAug89.TL.Z The file can be uncompressed with the Unix command uncompress, yielding a file size of approximately 20 MB.
A smaller version of the file (the first 100,000 lines, corresponding to approximately 250 seconds) can be downloaded in uncompressed ASCII format from http://www.comm.utoronto.ca/~jorg/teaching/ece466/labs/BCpAug89small.TL
Exercise 3.2 Determine statistical properties of the Ethernet trace

You may work with the smaller version of the file (with 100,000 lines). You receive extra credit (5 marks) if you work with the longer version.

Analyze the trace of the Ethernet traffic:

Compute the number of captured packets and total number of bytes; o Compute the mean bit rate of the entire trace;
o Compute the peak bit rate of the trace (defined as the rate that maximizes the ratio “packet size”/”time since last packet”).
o Compute the ratio of the peak rate and the average rate. Compare this value to the peaktoaverage rate ratio from the video trace in Part 2.

Generate a set of graphs that show properties of the Ethernet traffic trace:


Generate a graph that depicts the packet size as a function of time.



Generate a graph that shows the distribution of packet sizes (xaxis shows the packet size, yaxis shows the relative frequency).

Exercise 3.3 Scaled depiction of Ethernet traffic
This repeats the exercise from Exercise 2.2 for Ethernet traffic where you generate and compare scaled plots.

Continue with the 100 second excerpt of Ethernet traffic from the previous exercise.

Create three plots of the Ethernet traffic trace viewed at different scales. Each graph has 100 data points.

Plot 1: Generate a vector with 100 elements, where each element stores the amount of data captured in a 1 s interval.


1^{st} element: #bytes from the first second of traffic, i.e., interval [0, 1 s].



2^{nd} element: #bytes from the interval [1, 2 s].



…


Plot 2: Generate a vector with 100 elements, where each element stores the traffic from 100 ms worth of captured traffic. Select a random starting time.


Pick a random starting point, e.g., t = 20 s.


1^{st} element: #bytes from the interval [20, 20.1 s].


2^{nd} element: #bytes from the interval [20.1, 20.2 s].



…


Plot 3: Generate a vector with 100 elements, where each element stores the traffic from 10 ms worth of captured traffic. Select a random starting time.


Pick a random starting point, e.g., t = 90 s.


1^{st} element: #bytes from the interval [90, 90.01 s].


2^{nd} element: #bytes from the interval [90.01, 90.02 s]. o …


Plot the content of the vectors in three separate graphs, with the packet number on the xaxis, and the number of bytes on the yaxis. The data points should be depicted as vertical bars (e.g., using the MATLAB function bar() ).

Describe your observations of the graphs, and compare them to the plots from the Poisson traffic and the video trace.
Lab Report:

Include your answers to the exercises. Include the plots, a description of the plots, and your observations and discussions.
Part 4. (Optional) Metrics for Characterizing Network Traffic
The comparison of the plots from Poisson, video traffic, and measured Ethernet traffic should have illustrated the vast differences of these sources. There is a whole collection of metrics that help with quickly characterizing the properties of a certain traffic mix on a network. You have already seen the peaktoaverage rate ratio, a widely used metrics to describe the burstiness of VBR video traffic. In this part of the lab, you will compute other metrics for the three traffic types.
Exercise 4.1 Autocorrelation function
The autocorrelation is a mathematical tool to analyze if a function has a repeating or periodic pattern. The autocorrelation function is the covariance of a random process with a timeshifted version of itself, divided by the variance. The definition is as follows:
where, E[ ], Var[ ], and Cov[ ] indicate the expected value, the variance and the
covariance. We also use .

Generate graphs that compare the autocorrelation function of the packet sizes from the Poisson traffic in Part 1 (Exercise 1.4), the frame sizes of the video trace in Part 2, and the sizes of Ethernet packets from Part 3, and provide a comparison of the plots.
Exercise 4.2 Burstiness function
The burstiness function plots the worst case average bit rate over a time interval of a given length. The function gives a more detailed view of the burstiness than the peaktoaverage rate ratio. The function is defined as follows

Generate graphs that show the index of burstiness function of the arrivals from the Poisson traffic in Part 1 (Exercise 1.2), the frame sizes of the video trace in Part 2, and the sizes of Ethernet packets from Part 3, and provide a comparison of the plots.
Exercise 4.3 Index of dispersion
The index of dispersion can also be used as an indication of the burstiness of traffic. The index of dispersion for an arrival function A(t) (which describes the arrivals in the time interval [0,t]) is defined as:

Generate graphs that show the index of dispersion function of the arrivals from the Poisson traffic in Part 1 (Exercise 1.2), the frame sizes of the video trace in Part 2, and the sizes of Ethernet packets from Part 3.
The index of dispersion should be shown for times up to 100 seconds.

Provide a comparison of the plots.

Feedback for Lab 1

Complete this feedback form at the completion of the lab exercises and submit the form when submitting your lab report.

The feedback is anonymous. Do not put your name on this form and keep it separate from your lab report.

For each exercise, please record the following:
Difficulty 
Interest Level 
Time to complete 

(2,1,0,1,2) 
(2,1,0,1,2) 
(minutes) 

2 = too easy 
2 = low interest 

0 = just fine 
0 = just fine 

2 = too hard 
2 = high interest 

Part 1. 
Poisson Traffic 

Part 2. 
Compressed Video Traffic 

Part 3. 
Aggregate traffic on an Ethernet 

network 

Part 4. 
Characterizing Traffic 

Please answer the following questions:

What did you like about this lab?