[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xen domU + vlan

Wojciech Ziniewicz wrote:
i can't get XEN domU + vlan to work.
Here's what i have [*] in my sample virtual machine .
On running v. machine i add vlan with : vconfig add eth0 123 , correct
device is created. I give it an adress and there seems to be no
contact with the rest of the vlan (e.g. router gateway).
I saw many tutorials with bridging interfaces etc. but i would like to
do it the simplest way.
Logically thinking it should be just available by adding eth0.123 to
the bridge created by xend bridge script that connects all the v.
machines together [**]  but it's not.
When i add the vlan device to the vlan created by xend, my machines
are no longer available from the LAN. The error message is attached
below  [***]

Not sure if this is what you're referring to, but I do this. eth0 is a trunk port on the switch, and the untagged vlan is used for dom0 connectivity. Tagged vlans are assigned to bridge groups.

In /etc/network/interfaces:

# dom0 untagged vlan
allow-hotplug eth0
iface eth0 inet static

# vlan 3
auto br_group_a
iface brgroupa inet manual
	bridge_fd 0
	bridge_maxwait 0
	bridge_helo 0
	bridge_stp on
	bridge_ports eth0.3

# vlan 4
auto br_group_b
iface brgroupb inet manual
	bridge_fd 0
	bridge_maxwait 0
	bridge_helo 0
	bridge_stp on
	bridge_ports eth0.4

Debian will create the vlans from the above if you have the vlan package installed (since it adds the hooks to do that automagically in /etc/network/if-pre-up.d/vlan). Then, when I want a guest to be on one of those vlans, I define the vif like this:

vif = ['mac=00:00:00:00:00:00, bridge=br_group_a, vifname=vif_server1']

I like to use static MAC addresses, so edit to your taste. If you're talking about bringing the whole trunk across to a guest, I don't actually do that so you're on your own there. ;)

Seth Mattinen		sethm@rollernet.us
Roller Network LLC

Reply to: