One queue. If packets arrive randomly at rate lambda (Poisson) and a link serves them with random exponential service times at rate mu (packets per second), the mean time a packet spends waiting plus being served is T = 1/(mu - lambda) (the M/M/1 queue). It explodes as the utilisation rho = lambda/mu approaches 1: at 50 % load the delay is twice the empty-link service time, at 90 % ten times, at 99 % a hundred times. Check 1 measures this directly.
A network of queues. Following Kleinrock's independence approximation (exact when every router draws a fresh exponential service time for each packet and traffic is Poisson, as here), each link behaves as an independent M/M/1 queue fed by the sum of the flows that use it (Jackson network). The delay of a route is the sum over its links of 1/(mu_l - lambda_l) + propagation_l, and the network mean is the traffic-weighted average. Check 2 compares this sum with the simulated mean.
Routing choices. Static rules (fewest hops, lowest propagation delay) ignore load, so one route can saturate while another idles. An adaptive router measures link load (a moving average of the arrival rate) every update interval and picks the route with the lowest estimated delay. If every router moves all traffic to the currently best route at the same moment, the load moves with it, the old route becomes the best again, and the traffic oscillates: route flapping, which the flap counter shows. Splitting traffic in proportion to 1/delay^2 and smoothing the weights with factor alpha damps the oscillation.
The optimum. Minimising the average delay sum_l lambda_l T_l(lambda_l) over how each flow splits among its candidate routes is a convex problem. Its optimality condition is that every route carrying traffic has the same marginal delay d(lambda T)/d lambda = mu/(mu - lambda)^2 + propagation (Gallager, Kleinrock). The lab finds the weights with a few hundred exponentiated-gradient steps and then simulates them, so the measured delay of the optimum can be compared with the theory.
Finite buffers. With a buffer of K packets an arriving packet is dropped when the queue is full, the queue becomes M/M/1/K and the delay is bounded but loss appears. With the default 200 packets the loss is negligible below overload, and the M/M/1 formula applies. Lower the buffer to see the trade-off between loss and delay.
Honest simplifications. Poisson arrivals and exponential service are idealisations (real traffic is bursty, packets have different sizes, and TCP reacts to loss); only a few candidate routes per flow are considered; the congestion estimate is global and instantaneous (no routing-protocol messaging delay, no link-state flooding, no failures); routers are lossless apart from buffer overflow; every link direction has its own queue. The numbers teach the shape of the curves, not the performance of a real network.