Project

General

Profile

Dynamic Uml Mesh Modeler » History » Version 1

Version 1/29 - Next » - Current version
Martin Willi, 26.07.2007 11:34


= Dynamic Uml Mesh Modeler =
''Dumm'' is a framework to set up a virtual network using user mode linux guests.
It cleverly glues together some nice technologies to build networks dynamically.
To change the network topology, hosts are not required to reboot, changes apply
instantly and configuration can be done on the host (no network connection
required to change anything).

Status
''Dumm'' is currently in [source:trunk/src/dumm heavy development] and incomplete. A prototype is running
and a proof of concept has shown that it works.
Along with the ''dumm'' library, a console client is developed to interactively set
up and reconfigure UML networks. A test framework for strongSwan is planned around
it, and a neat GTK GUI to click together your UML network would be just lovely (someone?). Terminology * Host * The machine you are working on, has virtual guests in it. Mostly
runs on bare hardware (unless you do really fancy stuff). * Guest * Virtual UML machine running on the host. Why UML?
UML is a senior in vitualization technologies, and there is a lot of new
hyped stuff about virtualization around. However, UML is lightweight, easy to
set up and allows dynamic reconfiguration (e.g. add/remove innterfaces at
runtime), allows access to the hosts filesystem through hostfs and has some
other neat features.
Performance is not critical for our needs, and maybe we get hardware
virtualization support soon in UML.
It is free and fits perfectly. Requirements * Host: * Kernel: * A recent 2.6 kernel * [http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/ SKAS3 patch] highly recommended * [http://fuse.sourceforge.net/ FUSE] enabled * support for TAP devices * Userland: * [source:trunk/src/libstrongswan libstrongswan] * [http://tiswww.case.edu/php/chet/readline/rltop.html libreadline] * libbridge from [http://linux-net.osdl.org/index.php/Bridge bridge-utils] * [http://podgorny.cz/moin/UnionFsFuse unionfs-fuse] * Guest: * Kernel: * hostfs * consoles? * Userland: * ip (from iproute2)/netlink proxy? Architecture

=== Working set ===
Dumm needs a directory to store all its files, guest configurations and other
stuff. Inside that working directory, you'll find:

{{{
workingdir/
host/
alice/
bob/
mount/
alice/
bob/
run/
alice/
bob/
master/
linux
}}}
''linux'' is the default UML guest kernel. You may symlink it here, but you may
define other (and different) kernels when creating guests.
''master'' is the read-only master filesystem which contains a common set of
files for all guests. Guests use this directory as copy-on-write root
filesystem.
''host'' contains the individual host files. It is a unionfs overlay over the
''master'' directory. The unionfs is mounted into the guests ''mount'' directory.
Changes on the guest will go into it's ''host'' directory.
''run'' contains runtime information for each guest, such as consoles, PIDs and
logfiles.
So if you want to edit a guests files, do it in it's ''mount'' directory. Changes
will be written to ''host'', but this is transparently to you.

=== Networking ===
Network connectivity is realized through tap devices. When creating a ''eth0''
network device on ''alice'', a ''alice-eth0'' tap device appears on the host. These
are directly connected, when ''alice'' sends traffic to ''eth0'', it appears on the
host at ''alice-eth0''. You can see that as a small network segment (or just a
cable), where these interfaces are attached directly.
To build larger network segments, linux bridging on the host comes into play.
Segments are created by creating a bridge (as with brctl), and then attaching
our tap devices to that bridge. Routing can be done on a UML guest, or even on
the host.
This setup has some advantages over the ''uml_switch'' solution. Bridging works
more reliable in the kernel, and as we see every network interface on the host,
we can sniff at every interface to get some clue what the guests are doing.

Howto

=== Host setup ===

=== Guest setup ===

=== Sample session ===