problem with setting up Xen networking
Amedee Van Gasse
amedee-ubuntu at amedee.be
Tue Feb 2 00:37:21 UTC 2010
On 01-02-10 09:39, Werner Schram wrote:
> I personally prefer to manage my bridges manually via
> /etc/network/interfaces, every virtualization platform has its own
> bridge management system, which doesn't always work well with your
> distributions network configuration. I find it strange that your
> bridge is added to the eth0 bridge in your case, as you specificly
> added it to xenbr0 (which wasn't created). I remember seeing the
> eth0-peth0 type of bridge before, but I can't remember how that got
> created. My guess is that it is a misconfiguration in your
> xend-config.sxp.
>
> Anyway, your xen managed bridge configuration is in
> /etc/xen/xend-config.sxp. There should a line like:
> (network-script 'network-bridge bridge=mybridge')
>
> My advice would be to disable that line and configure a bridge in
> /etc/network/interfaces, but if you post that line, maybe we can work
> out what is wrong.
Perhaps I misunderstood you, but I disabled everything in /etc/xen/mx1,
/etc/xen/xend-config.sxp and /etc/networking/interfaces, except for the
lo and eth0 dhcp. I changed nothing inside the DomU.
Now when I start the DomU, I get the following error:
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.
Of course, no networking.
Next step, configure a bridge more or less as described on
https://help.ubuntu.com/8.10/serverguide/C/network-configuration.html
this is now my /etc/network/interfaces:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
auto dummy0
iface dummy0 inet static
address 192.168.2.1
broadcast 192.168.2.255
netmask 255.255.255.0
auto br0
iface br0 inet static
address 192.168.2.10
network 192.168.2.0
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.1
bridge_ports dummy0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
That gives the following ifconfig:
br0 Link encap:Ethernet HWaddr 12:a8:13:88:24:29
inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::10a8:13ff:fe88:2429/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
dummy0 Link encap:Ethernet HWaddr 12:a8:13:88:24:29
inet6 addr: fe80::10a8:13ff:fe88:2429/64 Scope:Link
UP BROADCAST RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:280 (280.0 B)
eth0 Link encap:Ethernet HWaddr 00:30:48:db:31:00
inet addr:10.0.0.12 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::230:48ff:fedb:3100/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:994 errors:0 dropped:0 overruns:0 frame:0
TX packets:481 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:103683 (101.2 KiB) TX bytes:74826 (73.0 KiB)
Interrupt:16 Base address:0x4000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
And the output of brctl show:
bridge name bridge id STP enabled interfaces
br0 8000.12a813882429 no dummy0
Still, when I create the DomU, I get:
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.
(I didn't forget to restart the xend daemon.)
I also noticed this:
dmesg | grep -i eth
[ 0.000000] Kernel command line: root=/dev/hda1 ro
ip=192.168.2.101:1.2.3.4:192.168.2.1:255.255.255.0:mx1:eth0:off
console=hvc0 xencons=tty
[ 0.821870] netfront: Initialising virtual ethernet driver.
Notice the "eth0:off"? Could this be of some importance? Hmmm...
So then I added vif = ['bridge=br0'] to /etc/xen/mx1, destroyed &
re-created and guess what... I can ping both ways now! W00t!
Thank you for nudging me in the right direction. All the rest now is
only a simple matter of setting up iptables on Dom0 for routing. and I'm
done.
--
Amedee
More information about the ubuntu-users
mailing list