mm-link(1) UNIX shell connected to an emulated link with a user-specified packet-delivery schedule.


mm-link uplink downlink [-- command...]


mm-link is a network emulation tool that emulates links using packet delivery trace files (uplink for the uplink direction and downlink for the downlink direction) provided on the command line. mm-link uses clone(2) to fork a new shell in a distinct network namespace. uplink_trace_file emulates the link from mm-link to the Internet and downlink_trace_file emulates the link from the Internet to mm-link.

mm-link can emulate both time-varying links, such as cellular links, and links with fixed link speeds. When a packet arrives at the link (from either the Internent or from mm-link), it is directly placed into one of two packet queues depending on its intended direction: the uplink queue or the downlink queue. mm-link releases packets from each queue based on the corresponding input packet-delivery trace.

Each line in the trace represents a packet delivery opportunity: the time at which an MTU-sized packet can be delivered in the emulation. Accounting is done at the byte-level, and each delivery opportunity represents the ability to deliver 1500 bytes. Thus, a single line in the trace file can delivery several smaller packets whose sizes sum to 1500 bytes. Delivery opportunities are wasted if bytes are unavailable at the instant of an opportunity. When mm-link reaches the end of an input trace file, it wraps around to the beginning of the trace file. mm-link can be nested within delayshell (1) to flexibly create links with a user-supplied one-way delay and a user-supplied link rate.

To exit mm-link, simply type "exit" or CTRL-D inside mm-link.


To emulate a 12 Mbit/s link (in each direction), make a 12 Mbit/s
tracefile, "12Mbps_trace". This file can be of arbitrary length
and must follow the pattern below:
The link above delivers an MTU-sized packet (1500 bytes or 12000 bits) every
Run mm-link with:
$ mm-link 12Mbps_trace 12Mbps_trace
All programs run from within mm-link are sent according 
to the packet delivery times specified in 12Mbps_trace.
[...] (copyright notice omitted)


Mahimahi was written by Ravi Netravali, Anirudh Sivaraman, Greg D. Hill, Deepak Narayanan, and Keith Winstein.


Please report bugs to [email protected].