CPSC 441: Computer Communications

Professor Carey Williamson

Winter 2013

Assignment 3: Router Buffer Management (24 marks)

Due: Tuesday, March 26, 2013 (11:59pm)

The purpose of this assignment is to learn about the basic operation of routers and to understand some of the design tradeoffs for routers in packet-switched networks. Along the way, you will also gain familiarity with simple computer simulations, by conducting a multi-factor simulation experiment to evaluate different buffer management strategies for a simple packet-switching router.

Imagine that you have just started a summer job as a network administrator for a local Calgary company. One of your first tasks it to upgrade the backbone router in the company's rather large corporate network. Two vendors (A and B) have been short-listed as potential suppliers of the router that you need. Their prices are comparable, but the designs of their routers are different. You need to decide which design (A or B) is better for your network.

From your discussion with the vendors, you have learned that there are two different ways to organize the output buffering in a shared-memory packet-switching router. In complete partitioning, there are b buffers physically dedicated (e.g., as a hardware FIFO buffer) to each of the N output ports, for a total of B = N b buffers. In complete sharing, there is a central pool of B buffers that can be dynamically shared amongst all the output ports under software control. Examples of these two approaches are illustrated in a PowerPoint diagram, specifically for N = 4 and b = 5. Note that the total number of buffers B in the two designs is the same.

For this assignment, you are to simulate these two buffer management strategies to decide which approach (partitioned or shared) is better for a fast packet-switching router architecture.

The key factors in your experiment are:

You will use these factors in a set of simulation experiments to understand the packet loss performance of the router, and to evaluate the buffer management strategies. For simplicity, we will assume that all packets are the same size.

In particular, you should simulate a shared-memory packet-switching router with N inputs and N outputs. The router switch fabric is internally non-blocking, and operates synchronously, in a slotted fashion. That is, in one time step, the router does all of the following actions, in the order described.

The foregoing loop operates repeatedly for successive time slots, until the end of the simulation.

You will use your simulation to study the relationship between the probability p of packet loss (due to buffer overflow) and the number of buffers b per output port, as a function of offered load L. In the complete sharing approach, this implies an aggregate shared pool of B = N b buffers. Make sure that you can vary the number of buffers b from 1 to 20 per output port. Plan to run your simulation long enough (e.g., 100,000 time slots) to obtain statistically meaningful simulation results. However, you do not need to worry about startup effects, run length, multiple replications, batch means, or confidence intervals.

Test your simulation for four values of N, namely 2, 4, 8, and 16. Assume that the input traffic to the router is Bernoulli, with an average utilization of L on each input port, with L ranging from 0.5 to 1.0, in steps of 0.1. Bernoulli arrivals on a given input port means that the probability of a packet arriving in a given slot is always L. When L = 0.5, this is like a coin flip: 'Heads' means there is a packet; 'Tails' means there is no packet. For larger values of L, it is like flipping a biased coin (i.e., 'Heads' is more likely than 'Tails'). All time slots are independent (i.e., new coin flips). Assume also that packet arrivals on each input port are independent from other input ports. Finally, assume that an arriving packet is equally likely to choose any of the N possible output ports (uniformly at random, independently).

The specific steps required to complete the assignment are:

When you are finished, please email your solution in electronic form to your TA. Your submission should include the source code for your router simulation, and the requested set of results from your simulation experiments. The proposed grading scheme for the assignment is as indicated above. (Up to 4 bonus marks are available if you also conduct simulation experiments to evaluate the performance of these two router buffer management strategies under a scenario with non-uniform traffic destinations.)

TIPS: If you have never written a simulation program before, you might want to take a look at this simple poker.c simulation example, which was discussed in your March 13 tutorial sessions. It is a time-driven simulation, operating in discrete-time rounds, much like you need for this assignment. For a more elaborate discrete-event simulation, operating in continuous-time, check out this barber.c simulation example. This one is probably more complicated than you will need, but instructive nonetheless.