The Marionnet network simulator is easy to install but there are some specific system configurations that must be changed so that all the features of Marionnet work well.
This post will describe the installation procedure for the Marionnet open-source network simulator on Debian Linux 6.0.
The Marionnet project offers an easy-to-use install script. Download the marionnet_from_scratch script and run it using the following commands:
$ wget http://www.marionnet.org/downloads/marionnet_from_scratch/marionnet_from_scratch $ chmod +x marionnet_from_scratch $ sudo ./marionnet_from_scratch
The marionnet_from_scratch script will ask for some responses to configuration questions. Enter “Y” at all the prompts. You may be asked to enter your root password at one point. The script will install all the required prerequisite packages; download, compile, and install the Marionnet software; and download and install the filesystems and kernels for the Linux virtual machines used by the Marionnet network simulator.
Note: The marionnet_from_scratch script will download over a gigabyte of data, most of which is filesystems and compiled kernels for the virtual machines.
After the script completes, logout and login to ensure all changes are applied.
The Marionnet Daemon
The Marionnet daemon is a server that requires root privileges and provides some system-level services for Marionnet.
The Marionnet daemon supports networking between the virtual machines created by Marionnet and the host operating system which allows the virtual machines to run programs with a graphical user interface (GUI), such as Wireshark, and display the GUI on an X server window on the host system, making user interactions with these programs possible.
The Marionnet daemon also allows Marionnet virtual machines to connect to the host’s Ethernet card and communicate with computers or other equipment on an external network.
There are two ways to ensure the Marionnet daemon will be running before you start the Marionnet GUI program:
- Start the daemon manually when you want to use Marionnet, or
- Configure your host system to launch the daemon when the host system is started.
Option #1: Manually start the Marionnet daemon
You may choose to manually start the Marionnet daemon each time you want to run Marionnet.
To manually start the daemon, enter the following command either as super-user or as the root user. In this case, we will use the
sudo command to run
marionnet-daemon.byte with super-user privileges.
$ sudo marionnet-daemon.byte
Option #2: Configure system to run the Marionnet daemon on startup
The Marionnet wiki provides post-installation setup instructions that describe this procedure. Here are the steps I followed on this Debian Linux 6.0 system:
To launch the Marionnet daemon from your startup scripts, add these lines to your /etc/rc.local file (you need to do this as a super-user or as root):
$ sudo vi /etc/rc.local
Then, add these lines in the file:
chmod a+rw /dev/net/tun /usr/local/sbin/marionnet-daemon.byte &> /dev/null &
Save the file. You will need to reboot the host system before the daemon will run (or start it manually if you want to run it now). But you can wait until you complete the configuration changes listed below before restarting.
Ensure X is configured correctly
We need to ensure that X is working correctly so we can use Wireshark in later experiments.
First, check that the X server is listening to TCP or not. Marionnet uses TCP to communicate between virtual machine X clients and the host X server. Listening to TCP is disabled by default for security reasons. In my experience, the Marionnet install script did not make all the necessary changes to the configuration files.
Search for the X process and see if it is running with the no listen tcp option. The easiest way to do this is to look for the string, no listen, in the output of the ps command:
$ ps -ef | grep nolisten root 1287 1273 1 10:39 tty7 00:00:03 /usr/bin/Xorg :0 -audit 0 -novtswitch -auth /var/run/gdm3/auth-for-Debian-gdm-k5vPvh/database -nolisten tcp vt7 blinklet 2157 2097 0 10:45 pts/0 00:00:00 grep nolisten
If you see the X process running with the option: -nolisten tcp, as in the example above, then you need to fix the gdm3 configuration and/or the X server configuration.
The display manager configuation scripts may need to be changed to allow X to use TCP. depending on which Linux distribution you use, you may have a different display manager and different configuration files. In this case, we are using Debian Linux 6.0, which uses the gdm3 display manager.
Edit the file /etc/gdm3/daemon.conf (as superuser)
$ sudo vi /etc/gdm3/daemon.conf
In the file, enter the following text below the [security] line:
Save the file. You will need to restart the display manager so the changes will take effect (see the restart procedure later in this post) but, first, also check the X Server configuration file, /etc/X11/xinit/xserverrc (see below).
The marionnet_from_scratch script should update the /etc/X11/xinit/xserverrc during the installation process. However, you should check the file to ensure the change was made and, if not, change the file as described below.
List the file contents. If you see the text, nolisten tcp in the file, edit the file /etc/X11/xinit/xserverrc and remove the nolisten tcp text from the line, exec /usr/bin/X -nolisten tcp “$@”.
$ sudo vi /etc/X11/xinit/xserverrc
The new file should look like:
#!/bin/sh exec /usr/bin/X "$@"
Restart the display manager
Now, you need to restart gdm3 so that it will run allow X to connect to TCP but a simple restart of your system will not work. You need to do the following.
First, log out of your account using the Gnome menu command:
Menu → Logout
F1 to switch to the text console.
Return key to get a login prompt.
Log back in using your userid and password.
Then, enter the command:
$ sudo /etc/init.d/gdm3 restart
The system will ask you to log in again and the desktop should start up. If not, press
F7 to connect to the desktop sesion.
Now, the gdm3 configuration is changed and the change will persist after restarting your machine.
If you run the ps command again, you should see no processes running with the -nolisten tcp option.
$ ps -ef | grep nolisten
Start Marionnet by running the command:
A splash screen showing some information about the Marionnet software will appear. Click on the splash screen to make it go away and then you will see the Marionnet GUI.
I will write about using Marionnet in a future post. If you want to try Marionnet right now, please see the paper, Marionnet: a virtual network laboratory and simulation tool, which was presented by the Marionnet development team at the SimulationWorks 2008 conference. This paper summarizes the Marionnet user interface and operation. Unfortunately, there is no other Marionnet user documentation.
To quit Marionnet, use the Marionnet menu command:
Project → Close
We installed the Marionnet network simulator on Debian Linux 6.0 using the install script provided by the Marionnet project team. We changed some configurations for the Gnome display manager, gdm3 and the X server so that all the features of Marionnet will work correctly.
We will explore the features and operation of the Marionnet open-source network simulator in a future post.