Penguin
Blame: XenNetworking
EditPageHistoryDiffInfoLikePages
Annotated edit history of XenNetworking version 4, including all changes. View license author blame.
Rev Author # Line
4 AristotlePagaltzis 1 [Xen] has a set of scripts which manage the networking between the priviledged and unpriviledged domains. It defaults into bridged mode, but can be set up in a routed mode as well, or with any sort of topology you like.
1 DanielLawson 2
4 AristotlePagaltzis 3 See the pages at <b>FIXME</b> for a run down on the differences and what is possible.
1 DanielLawson 4
4 AristotlePagaltzis 5 As of [Xen] 3.0.2 (possibly earlier?), [Xen] will manage renaming your physical [Ethernet] interface to <tt>peth0</tt> (from <tt>eth0</tt>), and will bring up a dummy <tt>eth0</tt> interface with the original [IP] address and join this to the <tt>xenbr0</tt> bridge device. This makes it effectively transparent to the [OS] running in the priviledged domain.
1 DanielLawson 6
4 AristotlePagaltzis 7 !! Xen and [Debian]'s interfaces file
1 DanielLawson 8
4 AristotlePagaltzis 9 As of [Xen] 3.0.2, the [Xen]-provided network scripts mean you don't need to do anything special. If you find yourself running an earlier version of [Xen], I use a set of interfaces stanzas like these to manage my networking:
1 DanielLawson 10
11 <verbatim>
12 # The physical device xen will take over. Note that I'm not setting an IP address on this device as
13 # doing so will interfere with the bridging that occurs later
14 auto eth0
15 iface eth0 inet manual
16
17 # The xen bridge device. Note that in xen 2.x this should be xen-br0, in xen 3.x is should be xenbr0
18 auto xenbr0
19 iface xenbr0 inet static
20 bridge-ports eth0
21 address 192.168.1.253
22 netmask 255.255.255.0
23 gateway 192.168.1.254
24 </verbatim>
25
4 AristotlePagaltzis 26 This will cause debian to bring up <tt>eth0</tt> without an [IP] address, then bring up a bridge device <tt>xenbr0</tt> and add <tt>eth0</tt> to the bridge, and then set up the [IP] address specified.
1 DanielLawson 27
4 AristotlePagaltzis 28 Note again: the above is ''NOT'' needed it you are running [Xen] 3.0.2 or more recent!
1 DanielLawson 29
4 AristotlePagaltzis 30 !! [Xen] and [VLAN]s
1 DanielLawson 31
4 AristotlePagaltzis 32 As of this writing, it seems there is no nice integration with [Xen] and [VLAN]s. To work around this I use a modification of the above ([Debian]-specific) interfaces file to provide multiple bridges to [Xen], on different [VLAN]s:
1 DanielLawson 33
34 <verbatim>
35 # Physical device accepting vlan-tagged frames
36 auto eth0
37 iface eth0 inet manual
38
39 # Vlan device
40 auto eth0.1234
41 iface eth0.1234 inet manual
42
43 # Vlan device
44 auto eth0.2000
45 iface eth0.2000 inet manual
46
47
48 # first bridge, for vlan 1234
49 auto xenbr0
50 iface xenbr0 inet static
51 bridge-ports eth0.1234
52 address 192.168.1.1
53 netmask 255.255.255.0
54 gateway 192.168.1.254
55
56 # second bridge, for vlan 2000
57 auto xenbr1
58 iface xenbr1 inet static
59 bridge-ports eth0.2000
60 address 192.168.2.1
61 netmask 255.255.255.0
62 </verbatim>
63
4 AristotlePagaltzis 64 This will bring up two bridges with the specified [IP] addresses. When you create a [Xen] domU, you can specifiy which [VLAN] (or bridge) it belongs to with the <tt>vif</tt> parameters in its config file:
1 DanielLawson 65
66 <verbatim>
67 # one network interface in the first bridge (vlan 1234)
68 vif = [ 'bridge=xenbr0']
69 # two network interfaces, one in each (vlan 1234, vlan 2000)
70 # vif = [ 'bridge=xenbr0', 'bridge=xenbr1']
71 </verbatim>
72
4 AristotlePagaltzis 73 Notes:
1 DanielLawson 74
4 AristotlePagaltzis 75 * You may have to disable the <tt>network-script</tt> parameter in the [Xen] config file in <tt>/etc/xen</tt>, or else it will try to manage <tt>xenbr0</tt> on its own.
76 * This may change with newer versions of [Xen] – make sure to check out what [Xen] supports before assuming you have to do it this way!
3 DanielLawson 77
4 AristotlePagaltzis 78 !! [Xen] and bonded interfaces
3 DanielLawson 79
4 AristotlePagaltzis 80 I assume this works on the same theory as the example for [VLAN] interfaces. (Again, this may change with newer versions of [Xen] – make sure to check out what [Xen] supports before assuming you have to do it this way!)
3 DanielLawson 81
4 AristotlePagaltzis 82 !! See also
3 DanielLawson 83
4 AristotlePagaltzis 84 * LinuxVlanNotes
3 DanielLawson 85
86 ----
2 DanielLawson 87 Part of CategoryXen, CategoryNetworking

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 4 times)