This document outlines the simplifications and shortcuts taken in the mininet-sim implementation compared to actual real-world production protocols. This is intended to serve as reference material for interviews and deep technical deep-dives.
While our Go-Back-N (GBN) implementation ensures reliable, in-order packet delivery, real-world TCP differs in several crucial areas:
-
mininet-simGBN: Sequence numbers are integer packet counts (0, 1, 2, ...) wrapping around at$2N$ . The sliding window advances on packet boundaries. - Real TCP: Sequence numbers correspond to bytes, not packets. Every byte in the data stream is numbered. The window size represents the number of bytes allowed in-flight (controlled by the receiver's window advertisement and congestion window).
-
mininet-simGBN: If packet$i$ is lost, the receiver discards all subsequent packets ($i+1, i+2, ...$ ), forcing the sender to retransmit the entire window starting from$i$ on timeout or fast-retransmit. - Real TCP: Uses Selective Acknowledgement (SACK). The receiver buffers out-of-order segments and reports exactly which blocks are missing. This avoids retransmitting correctly received out-of-order packets.
mininet-simGBN: No congestion control is implemented. The sender transmits at maximum window capacity without checking network congestion or bottleneck buffer capacity.- Real TCP: Uses sophisticated algorithms (e.g., Tahoe, Reno, BBR, Cubic) utilizing Slow Start, Congestion Avoidance, AIMD (Additive Increase / Multiplicative Decrease), and fast recovery to adjust the sending rate dynamically to match available bandwidth.
mininet-simGBN: Relies on a simplified singleFINflag to close the stream. There is no active connection handshake (SYN / SYN-ACK / ACK) or structured TIME-WAIT state machine.- Real TCP: Relies on a rigorous three-way handshake for initialization and a four-way handshake for graceful termination.
Our Distance Vector routing protocol mimics the core computation of Bellman-Ford, but differs from standard Routing Information Protocol (RIP/RIPv2):
mininet-simDV: Runs on top of our in-process virtual link layer. Packets are dispatched via memory buffer queues usingasynciotasks.- Real RIP: Operates as an application-layer daemon sending updates encapsulated inside UDP datagrams on port 520.
mininet-simDV: Infinity is represented byfloat('inf'). This allows networks of arbitrary cost/hop sizes to converge.- Real RIP: Defines infinity as 16 hops. This caps the maximum diameter of a RIP network to 15 hops, limiting count-to-infinity loop resolution rounds to 16 cycles but making it unusable for large networks.
mininet-simDV: Fully periodic (every 2.0 seconds).- Real RIP: Employs triggered updates (immediate broadcast when a route change is detected) to dramatically speed up convergence and limit count-to-infinity duration, alongside periodic 30-second sweeps.