Dynamic Uml Mesh Modeler » History » Version 3
Martin Willi, 07.08.2007 09:06
1 | 1 | Martin Willi | = Dynamic Uml Mesh Modeler = |
---|---|---|---|
2 | 1 | Martin Willi | ''Dumm'' is a framework to set up a virtual network using user mode linux guests. |
3 | 1 | Martin Willi | It cleverly glues together some nice technologies to build networks dynamically. |
4 | 1 | Martin Willi | To change the network topology, hosts are not required to reboot, changes apply |
5 | 1 | Martin Willi | instantly and configuration can be done on the host (no network connection |
6 | 1 | Martin Willi | required to change anything). |
7 | 1 | Martin Willi | |
8 | 1 | Martin Willi | == Status == |
9 | 1 | Martin Willi | ''Dumm'' is currently in [source:trunk/src/dumm heavy development] and incomplete. A prototype is running |
10 | 1 | Martin Willi | and a proof of concept has shown that it works. |
11 | 1 | Martin Willi | Along with the ''dumm'' library, a console client is developed to interactively set |
12 | 1 | Martin Willi | up and reconfigure UML networks. A test framework for strongSwan is planned around |
13 | 1 | Martin Willi | it, and a neat GTK GUI to click together your UML network would be just lovely (someone?). |
14 | 1 | Martin Willi | |
15 | 1 | Martin Willi | == Terminology == |
16 | 1 | Martin Willi | * Host |
17 | 1 | Martin Willi | * The machine you are working on, has virtual guests in it. Mostly |
18 | 1 | Martin Willi | runs on bare hardware (unless you do really fancy stuff). |
19 | 1 | Martin Willi | * Guest |
20 | 1 | Martin Willi | * Virtual UML machine running on the host. |
21 | 1 | Martin Willi | |
22 | 1 | Martin Willi | == Why UML? == |
23 | 1 | Martin Willi | UML is a senior in vitualization technologies, and there is a lot of new |
24 | 1 | Martin Willi | hyped stuff about virtualization around. However, UML is lightweight, easy to |
25 | 1 | Martin Willi | set up and allows dynamic reconfiguration (e.g. add/remove innterfaces at |
26 | 1 | Martin Willi | runtime), allows access to the hosts filesystem through hostfs and has some |
27 | 1 | Martin Willi | other neat features. |
28 | 1 | Martin Willi | Performance is not critical for our needs, and maybe we get hardware |
29 | 1 | Martin Willi | virtualization support soon in UML. |
30 | 1 | Martin Willi | It is free and fits perfectly. |
31 | 1 | Martin Willi | |
32 | 1 | Martin Willi | == Requirements == |
33 | 1 | Martin Willi | * Host: |
34 | 1 | Martin Willi | * Kernel: |
35 | 1 | Martin Willi | * A recent 2.6 kernel |
36 | 1 | Martin Willi | * [http://www.user-mode-linux.org/~blaisorblade/patches/skas3-2.6/ SKAS3 patch] highly recommended |
37 | 1 | Martin Willi | * [http://fuse.sourceforge.net/ FUSE] enabled |
38 | 1 | Martin Willi | * support for TAP devices |
39 | 1 | Martin Willi | * Userland: |
40 | 1 | Martin Willi | * [source:trunk/src/libstrongswan libstrongswan] |
41 | 1 | Martin Willi | * [http://tiswww.case.edu/php/chet/readline/rltop.html libreadline] |
42 | 1 | Martin Willi | * libbridge from [http://linux-net.osdl.org/index.php/Bridge bridge-utils] |
43 | 1 | Martin Willi | * Guest: |
44 | 1 | Martin Willi | * Kernel: |
45 | 1 | Martin Willi | * hostfs |
46 | 1 | Martin Willi | * consoles? |
47 | 1 | Martin Willi | * Userland: |
48 | 1 | Martin Willi | * ip (from iproute2)/netlink proxy? |
49 | 1 | Martin Willi | |
50 | 1 | Martin Willi | == Architecture == |
51 | 1 | Martin Willi | |
52 | 1 | Martin Willi | === Working set === |
53 | 1 | Martin Willi | Dumm needs a directory to store all its files, guest configurations and other |
54 | 1 | Martin Willi | stuff. Inside that working directory, you'll find: |
55 | 1 | Martin Willi | |
56 | 1 | Martin Willi | {{{ |
57 | 2 | Martin Willi | workingdir/ - root folder containing a set of hosts and scenarios |
58 | 3 | Martin Willi | guests/ - contains all created guests |
59 | 2 | Martin Willi | alice/ - subdirectory for host "alice" |
60 | 2 | Martin Willi | alice/ - UML created folder (named umid) containing UML runtime files |
61 | 2 | Martin Willi | boot.log - hosts boot console log (con0) |
62 | 2 | Martin Willi | mem - memory configuration file (contains amount of guest memory in MB) |
63 | 2 | Martin Willi | linux - symlinked UML kernel this host uses |
64 | 2 | Martin Willi | master/ - symlinked master root file system for this host |
65 | 2 | Martin Willi | diff/ - copy-on-write overlay to master this host uses |
66 | 2 | Martin Willi | union/ - mounted unified filesystem (master + diff + optional scenario) |
67 | 1 | Martin Willi | bob/ |
68 | 2 | Martin Willi | ... - same stuff as in alice |
69 | 2 | Martin Willi | scenarios/ - contains all scenarios |
70 | 1 | Martin Willi | test1/ - a scenario folder |
71 | 3 | Martin Willi | diff/ - copy-on-write overlays for each guest's union folder |
72 | 3 | Martin Willi | alice/ - COW for alice |
73 | 3 | Martin Willi | bob/ - COW for bob |
74 | 3 | Martin Willi | config - network configuration file |
75 | 1 | Martin Willi | }}} |
76 | 1 | Martin Willi | |
77 | 1 | Martin Willi | === Networking === |
78 | 1 | Martin Willi | Network connectivity is realized through tap devices. When creating a ''eth0'' |
79 | 1 | Martin Willi | network device on ''alice'', a ''alice-eth0'' tap device appears on the host. These |
80 | 1 | Martin Willi | are directly connected, when ''alice'' sends traffic to ''eth0'', it appears on the |
81 | 1 | Martin Willi | host at ''alice-eth0''. You can see that as a small network segment (or just a |
82 | 1 | Martin Willi | cable), where these interfaces are attached directly. |
83 | 1 | Martin Willi | To build larger network segments, linux bridging on the host comes into play. |
84 | 1 | Martin Willi | Segments are created by creating a bridge (as with brctl), and then attaching |
85 | 1 | Martin Willi | our tap devices to that bridge. Routing can be done on a UML guest, or even on |
86 | 1 | Martin Willi | the host. |
87 | 1 | Martin Willi | This setup has some advantages over the ''uml_switch'' solution. Bridging works |
88 | 1 | Martin Willi | more reliable in the kernel, and as we see every network interface on the host, |
89 | 1 | Martin Willi | we can sniff at every interface to get some clue what the guests are doing. |
90 | 1 | Martin Willi | |
91 | 1 | Martin Willi | == Howto == |
92 | 1 | Martin Willi | |
93 | 1 | Martin Willi | === Host setup === |
94 | 1 | Martin Willi | |
95 | 1 | Martin Willi | === Guest setup === |
96 | 1 | Martin Willi | |
97 | 1 | Martin Willi | === Sample session === |