marionnet.org — a virtual network laboratory

The project

Marionnet is a virtual network laboratory: it lets you define, wire up, start and administer a computer network without any hardware. A single GNU/Linux computer, the host, is enough to run an Ethernet network made of machines, routers, switches, hubs and straight or crossover cables. Other components can, if you wish, connect this virtual network to the host’s real network.

What it is for

Marionnet was written to teach networking in lab sessions. It has been used for this since 2007, first at Université Paris 13, then at other universities in France and abroad. Students wire up their network with the mouse, then administer each machine from the command line, as they would on real hardware. The same tool can also be used to set up a test network, for instance to try a configuration or a service before deploying it.

A project is saved in a file, together with the state of each machine’s disks. You can therefore pick up a session later where you left off, or take a machine back to an earlier state.

How it works

Machines and routers are emulated: each one runs its own Linux kernel, which itself runs as an ordinary process of the host thanks to User Mode Linux, and boots a GNU/Linux system with its commands and its services. Hubs, switches and cables, on the other hand, are simulated by the VDE tools (Virtual Distributed Ethernet). These are small programs on the host, and they can also introduce defects on a link: frames that are lost, duplicated or delayed.

The distinction matters for teaching. Software that simulates the systems themselves, such as Cisco’s Packet Tracer or Boson’s NetSim, imitates their behaviour. On Marionnet, students administer a real system.

Marionnet coordinates all of this and provides the graphical interface. The network diagram is laid out automatically by Graphviz, so you never have to place a device yourself.

Marionnet is written in OCaml, the functional language born at Inria, which inspired Microsoft’s F#. Its authors owe it a great deal: without a language of such a high level of abstraction, the two of them would not have dared to attempt a concurrent architecture of this scale, nor built it so quickly and so robustly. Their 2007 paper says so in its very title: How to Implement a Virtual Network Laboratory in Six Months and Be Happy.

Marionnet is free software, distributed under the GNU GPL.

Drawing by Silviu Bârsanu: three students handle puppet penguins above the word marionnet
Drawing by Silviu Bârsanu (1965-2021)