CPSC 441: Computer Networks

Professor Carey Williamson

Winter 2022

Assignment 3: Router Buffering (40 marks)

Due: Friday, March 18, 2022 (4:00pm)

Learning Objectives

The purpose of this assignment is to learn about routers, buffer management, wireless networks, and video streaming traffic.

Background

The FIFA World Cup 2022 in Qatar will bring the world together to appreciate "the beautiful game", also known as soccer, football, or "footy" depending on your ancestry. This classic tournament, held every four years, highlights the impact of sport on our culture, and brings many great moments of ecstasy and despair.

The Internet has also played a role in popularizing the tourney, and maximizing its global reach. While the stadium seating for in-person viewing is limited and expensive, the magic of Internet video streaming makes the game available for millions of people around the world. They can watch the games on their personal devices, either live or on-demand, and do so whether at home, at work, at play, or on the go.

In this assignment, you will explore the dynamics of Internet video streaming traffic, and its impacts on network performance. The hypothetical scenario is your part-time job at SkinFlint Networks as their system/network administrator. It is the day of the World Cup final, and your boss knows that many of the employees who actually came to work today will spend most of their time watching the game, doing so using their wireless laptops. Your boss is worried about the impacts of the video streaming traffic on the Quality of Service (QoS) for work-related Internet traffic (or perhaps the impact of work-related traffic on the QoS for the big game!). For this reason, your boss has generously offered use of the boardroom for watching the game, so that only one video stream is needed.

To be honest, your boss is quite the miser, and has made minimal investment in the Internet infrastructure at the company. Specifically, there is a 100 Mbps (Megabits per second) external link for incoming Internet traffic, but only a 5 Mbps Wireless LAN (WLAN) internally for distributing Internet traffic to the employees. The capacity (C) of the WLAN is certainly going to be the performance bottleneck. Furthermore, the Access Point (AP) on the WLAN has only B=100 buffers available to store incoming IP packets that are waiting for transmission over the WLAN.

You are definitely worried about the QoS on your network during the game. Fortunately, you were prescient enough to collect a Wireshark packet trace of the semi-final game last week, when you were watching at home. You will use this trace of IP packet timestamps and sizes (in bytes) to learn about video streaming traffic, and what it might do to your company's network. You also have a Zoom trace from a recent work-related Zoom meeting that you can use for further experiments.

Your Task

Your task is to write a program in C or C++ that can estimate the QoS for incoming video streaming traffic on your network. The two QoS metrics of interest are the average queueing delay for packets in the AP buffer, and the packet loss percentage at the wireless AP. There is a simple tradeoff between these two metrics. That is, with a tiny buffer, there will be minimal queueing delay, but there might be really high packet loss. Conversely, with a huge buffer, there will be minimal packet loss, but the packet queueing delays might be really large. Your goal is to find the "sweet spot" for the buffer size that provides a good tradeoff between loss and delay.

Technical Requirements

In essence, this assignment is a discrete-event network simulation problem, but you should be able to model the system dynamics approximately using even simpler approaches, such as a time-driven simulation, a fluid flow model, or some differential equations. Think of a loop that models the arrival and/or departure of each packet, and using this loop to track the current occupancy of the AP buffer. Packets arrive at certain times, based on the trace file, and depart at certain times, based on the packet's size and the wireless link transmission rate. You may assume that the default AP buffer size can hold B=100 packets (one per buffer, regardless of the packet size), and that the queue is managed in a First-In-First-Out fashion. Please ignore all other WiFi details, such as MAC-layer ACKs and retransmissions. You may also assume that only one video stream is required, since all employees can watch on the big screen in the boardroom.

Specifically, you will use your program to answer a number of "what if" questions about the network QoS, such as these:

  1. For the 5 Mbps WLAN, what would the QoS be if the AP buffer size was B packets? (Vary B over some reasonable range of values, such as from 0 to 1000 in steps of 100. Show a graph (or table) of these results, and suggest a suitable value of B that provides a good tradeoff between delay and loss.) Do this separately for both the Zoom trace and the soccer trace, to see which one is more challenging for your network to handle. Show the results for both, and comment on this in your writeup.
  2. If the AP buffer size was fixed at B=100 packets, what would the QoS be for each of these two individual video streams if the WLAN capacity was increased to 6 Mbps instead of 5 Mbps?
  3. If the AP buffer size was fixed at B=100 packets, what would the QoS be for each of these two individual video streams if the WLAN capacity was increased to 8 Mbps instead of 5 Mbps?
  4. If the AP buffer size was fixed at B=100 packets, what would the QoS be for each of these two individual video streams if the WLAN capacity was increased to 10 Mbps instead of 5 Mbps?

Your program should report a statistical summary that shows the number of incoming packets, the number of delivered packets, the number of lost packets, the packet loss percentage, and the average queueing delay for (delivered) packets. Use a tabular format for reporting these results (for B=100 packets), with one row for each of the four network configurations indicated above (i.e., 5 Mbps, 6 Mbps, 8 Mbps, and 10 Mbps). From these results, you should be able to determine whether it is better to buy buffers (B) or bandwidth (C).

Grading Rubric

When you are finished, submit your solution in electronic form to your TA, via D2L. Grading will be based on the design, implementation, and functionality of a properly documented program (20 marks total), your graph of the results from your buffer size experiments (8 marks), your table of QoS results for B=100 (2 marks for each configuration, for a total of 8 marks), and a brief (maximum one page) written summary (4 marks) of your observations and recommendations. You do not need to upload the trace files, since the TAs already have these. (There is NO DEMO required for this assignment.)

Bonus (optional)

Suppose that another employee is watching this movie at the same time that others are watching the soccer match. How bad would the network QoS be? How could you improve it? Up to 4 marks are available for your results, thoughts, and observations on this issue.

Tips