Next problem with XEN. When trying to create a bridge and then attaching the bridge to the eth0 interface, the machine loses its connection to the Internet and to the router.
$ ping 220.127.116.11 PING 18.104.22.168 (22.214.171.124) 56(84) bytes of data. 64 bytes from 126.96.36.199: icmp_req=1 ttl=47 time=51.1 ms ^C --- 188.8.131.52 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 51.164/51.164/51.164/0.000 ms $ brctl addbr xenbr0 $ brctl addif xenbr0 eth0 $ ping 184.108.40.206 root@l00> ping 220.127.116.11 PING 18.104.22.168 (22.214.171.124) 56(84) bytes of data. From 192.168.0.12 icmp_seq=1 Destination Host Unreachable [...] ^C --- 126.96.36.199 ping statistics --- 9 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7999ms $ ip n # Shows the ARP tables  root@l00> ip n 192.168.0.1 dev eth0 FAILED
Oops. It seems that if I attach the bridge to the eth0 we have some problems. Let's see if I delete the connection to with eth0:
$ brctl delif xenbr0 eth0 $ ping 188.8.131.52 PING 184.108.40.206 (220.127.116.11) 56(84) bytes of data. 64 bytes from 18.104.22.168: icmp_req=1 ttl=47 time=51.1 ms ^C --- 22.214.171.124 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 51.164/51.164/51.164/0.000 ms $ ip n #shows the ARP table of the host 192.168.0.1 dev eth0 lladdr XX:XX:XX:XX:XX:XX REACHABLE
Jumm... it is working again both ping and correct entries to the ARP table. What is going on?
I've googled a little bit and ended up in theNetwoking page of the XEN wiki:
Note! The IP configuration of the bridge device should replace the IP configuration of the underlying interface, i.e. remove the IP settings from eth0 and move them to the bridge interface. eth0 will function purely as the physical uplink from the bridge so it can't have any IP (L3) settings on it!
Oook! Everything makes sense right now. To fix the problem we can do:
$ dhclient -r eth0 $ dhclient -r xenbr0 $ dhclient xenbr0
The -r parameter is "release the IP that I already have". This will release the IP of both interfaces and then we will ask via DHCP for an IP for the xenbr0 device.
And after that we are able to ping again! =D Yey! What if we want to have the same configuration on the startup? Well, this is the configuration I have in my /etc/network/interfaces
$ egrep -v "^#" /etc/network/interfaces auto lo iface lo inet loopback auto xenbr0 allow-hotplug xenbr0 iface xenbr0 inet static bridge_ports eth0 address 192.168.0.12 broadcast 192.168.0.255 netmask 255.255.255.0 gateway 192.168.0.1 bridge_stp off bridge_waitport 0 bridge_fd 0
After configuring this file, reboot the machine and check that xenbr0 as an IP while eth0 doesn't have any IP.
And this is all for today! Thanks folks!