We have installed a Xen (4.1) configuration and can't get Dom0 and the DomUs to communicate (ping eachother). The DomUs are able to ping eachother but not Dom0, and Dom0 cannot ping the DomUs. We tried a lot of different things following what we could find on the net, including some solution that had been proposed on this website (see below), but we are stuck...
Here is our configuration: we have two guest domains:
- VM1, with ID 3
- test2, with ID 4
We are trying to link them in a bridge way, like in http://wiki.xen.org/wiki/XenNetworking#Bridging, but we didn't succeed to do that.
Here are the ifconfigs:
From Dom0:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:26:22:45:33:59
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:35 Base address:0xc000
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:460 errors:0 dropped:0 overruns:0 frame:0
TX packets:460 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:35512 (35.5 KB) TX bytes:35512 (35.5 KB)
lxcbr0 Link encap:Ethernet HWaddr 9a:b8:f4:95:9f:36
inet addr:10.0.3.1 Bcast:10.0.3.255 Mask:255.255.255.0
inet6 addr: fe80::98b8:f4ff:fe95:9f36/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:10287 (10.2 KB)
wlan0 Link encap:Ethernet HWaddr 70:1a:04:0d:09:74
inet6 addr: fe80::721a:4ff:fe0d:974/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:66 (66.0 B) TX bytes:0 (0.0 B)
xenbr0 Link encap:Ethernet HWaddr 00:26:22:45:33:59
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 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)
From VM1:
VM1:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:22:99:77
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::216:3eff:fe22:9977/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1478 errors:0 dropped:0 overruns:0 frame:0
TX packets:71 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:286514 (279.7 KiB) TX bytes:5330 (5.2 KiB)
Interrupt:26
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:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1680 (1.6 KiB) TX bytes:1680 (1.6 KiB)
From test2:
test2:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3E:6A:81:FF
inet addr:192.168.1.203 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::216:3eff:fe6a:81ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1278 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:242526 (236.8 KiB) TX bytes:4488 (4.3 KiB)
Interrupt:26
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:6 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:672 (672.0 b) TX bytes:672 (672.0 b)
Here is also our /etc/network/interfaces:
auto lo
iface lo inet loopback
auto xenbr0
iface xenbr0 inet static
bridge_ports eth0
address 192.168.1.1
broadcast 192.168.1.255
netmask 255.255.255.0
gateway 192.168.1.0
auto eth0
iface eth0 inet manual
And here are the result of the command "brctl show", from Dom0:
# brctl show
bridge name bridge id STP enabled interfaces
lxcbr0 8000.feffffffffff no vif3.0
vif4.0
xenbr0 8000.002622453359 no eth0
What we tried so far:
giving an IP address to eth0 of Dom0:
ifconfig eth0 192.168.1.1 netmask 255.255.255.0
we tried to follow this answer Network Bridge in dom0 can not ping domU's but we have no interface eth1, and no interface would work.
Any suggestion, help?
Thanks for the answers, the brctl addif ... does not work.
Here is the configuration file of VM1:
kernel = '/boot/vmlinuz-3.2.0-33-generic'
ramdisk = '/boot/initrd.img-3.2.0-33-generic'
vcpus = '1'
memory = '128'
#
# Disk device(s).
#
root = '/dev/xvda2 ro'
disk = [
'file:/home/xen/domains/VM1/disk.img,xvda2,w',
'file:/home/xen/domains/VM1/swap.img,xvda1,w',
]
#
# Physical volumes
#
#
# Hostname
#
name = 'VM1'
#
# Networking
#
vif = [ 'ip=192.168.1.2,mac=00:16:3E:22:99:77' ]
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'