Dynamic Uml Mesh Modeler » History » Version 1
Martin Willi, 26.07.2007 11:34
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 | * [http://podgorny.cz/moin/UnionFsFuse unionfs-fuse] |
44 | 1 | Martin Willi | * Guest: |
45 | 1 | Martin Willi | * Kernel: |
46 | 1 | Martin Willi | * hostfs |
47 | 1 | Martin Willi | * consoles? |
48 | 1 | Martin Willi | * Userland: |
49 | 1 | Martin Willi | * ip (from iproute2)/netlink proxy? |
50 | 1 | Martin Willi | |
51 | 1 | Martin Willi | == Architecture == |
52 | 1 | Martin Willi | |
53 | 1 | Martin Willi | === Working set === |
54 | 1 | Martin Willi | Dumm needs a directory to store all its files, guest configurations and other |
55 | 1 | Martin Willi | stuff. Inside that working directory, you'll find: |
56 | 1 | Martin Willi | |
57 | 1 | Martin Willi | {{{ |
58 | 1 | Martin Willi | workingdir/ |
59 | 1 | Martin Willi | host/ |
60 | 1 | Martin Willi | alice/ |
61 | 1 | Martin Willi | bob/ |
62 | 1 | Martin Willi | mount/ |
63 | 1 | Martin Willi | alice/ |
64 | 1 | Martin Willi | bob/ |
65 | 1 | Martin Willi | run/ |
66 | 1 | Martin Willi | alice/ |
67 | 1 | Martin Willi | bob/ |
68 | 1 | Martin Willi | master/ |
69 | 1 | Martin Willi | linux |
70 | 1 | Martin Willi | }}} |
71 | 1 | Martin Willi | ''linux'' is the default UML guest kernel. You may symlink it here, but you may |
72 | 1 | Martin Willi | define other (and different) kernels when creating guests. |
73 | 1 | Martin Willi | ''master'' is the read-only master filesystem which contains a common set of |
74 | 1 | Martin Willi | files for all guests. Guests use this directory as copy-on-write root |
75 | 1 | Martin Willi | filesystem. |
76 | 1 | Martin Willi | ''host'' contains the individual host files. It is a unionfs overlay over the |
77 | 1 | Martin Willi | ''master'' directory. The unionfs is mounted into the guests ''mount'' directory. |
78 | 1 | Martin Willi | Changes on the guest will go into it's ''host'' directory. |
79 | 1 | Martin Willi | ''run'' contains runtime information for each guest, such as consoles, PIDs and |
80 | 1 | Martin Willi | logfiles. |
81 | 1 | Martin Willi | So if you want to edit a guests files, do it in it's ''mount'' directory. Changes |
82 | 1 | Martin Willi | will be written to ''host'', but this is transparently to you. |
83 | 1 | Martin Willi | |
84 | 1 | Martin Willi | === Networking === |
85 | 1 | Martin Willi | Network connectivity is realized through tap devices. When creating a ''eth0'' |
86 | 1 | Martin Willi | network device on ''alice'', a ''alice-eth0'' tap device appears on the host. These |
87 | 1 | Martin Willi | are directly connected, when ''alice'' sends traffic to ''eth0'', it appears on the |
88 | 1 | Martin Willi | host at ''alice-eth0''. You can see that as a small network segment (or just a |
89 | 1 | Martin Willi | cable), where these interfaces are attached directly. |
90 | 1 | Martin Willi | To build larger network segments, linux bridging on the host comes into play. |
91 | 1 | Martin Willi | Segments are created by creating a bridge (as with brctl), and then attaching |
92 | 1 | Martin Willi | our tap devices to that bridge. Routing can be done on a UML guest, or even on |
93 | 1 | Martin Willi | the host. |
94 | 1 | Martin Willi | This setup has some advantages over the ''uml_switch'' solution. Bridging works |
95 | 1 | Martin Willi | more reliable in the kernel, and as we see every network interface on the host, |
96 | 1 | Martin Willi | we can sniff at every interface to get some clue what the guests are doing. |
97 | 1 | Martin Willi | |
98 | 1 | Martin Willi | == Howto == |
99 | 1 | Martin Willi | |
100 | 1 | Martin Willi | === Host setup === |
101 | 1 | Martin Willi | |
102 | 1 | Martin Willi | === Guest setup === |
103 | 1 | Martin Willi | |
104 | 1 | Martin Willi | === Sample session === |