I have Server at hetzner.de, with a /29 subnet for running KVM-VMs. The VMs get network access via a bridge interface. I'm currently using two IPs from the subnet. The VM-host is running Ubuntu 12.04 kernel 3.2.0, as is one of the VMs, the other VM is running CentOS 5.8 kernel 2.6.18.
/etc/network/interfaces on the server:
auto lo iface lo inet loopback auto eth0 iface eth0 inet manual auto br0 iface br0 inet static address A.A.A.102 broadcast A.A.A.127 netmask 255.255.255.224 gateway A.A.A.97 bridge_ports eth0 bridge_stp on bridge_maxwait 10 bridge_fd 15 # routes for B.B.B.200/29 subnet vms up ip route add B.B.B.200 dev br0 scope link up ip route add B.B.B.201 dev br0 scope link # default route to access subnet provided by hetzner up route add -net A.A.A.96 netmask 255.255.255.224 gw A.A.A.97 eth0
/etc/network/interfaces on the Ubuntu VM:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address B.B.B.201 netmask 255.255.255.255 up ip route add A.A.A.102 dev eth0 src B.B.B.201 up ip route add default via A.A.A.102 src B.B.B.201
/etc/sysconfig/network-scripts/ifcfg-eth0 on the CentOS VM:
DEVICE=eth0 BOOTPROTO=none ONBOOT=yes HWADDR=00:50:56:00:24:50 IPADDR=B.B.B.202 NETMASK=255.255.255.255 TYPE=Ethernet
Since I'm no Redhat pro, I didn't know how to set the routes via the Redhat configuration tools, so I did with /etc/rc.local:
#!/bin/sh ip route add A.A.A.102 dev eth0 src B.B.B.202 ip route add default via A.A.A.102 src B.B.B.202
Not the most elegant way, but it works.
This setup was working flawlessly up until a few days ago, when I couldn't access the Ubuntu VM via the internet anymore. ping, ssh, http etc gave timeouts, so I accessed the VM via virt-viewer and tried to ping google.com:
$ ping google.com PING google.com (126.96.36.199) 56(84) bytes of data. 64 bytes from fra02s22-in-f5.1e100.net (188.8.131.52): icmp_req=1 ttl=57 time=7.62 ms From VMHOST.FQDN (A.A.A.102): icmp_seq=2 Redirect Host(New nexthop: static.97.A.A.A.clients.your-server.de (A.A.A.97)) From B.B.B.201 icmp_seq=3 Destination Host Unreachable . . .
A second attempt to ping always answered "Destination Host Unreachable"
I did not change any machine's setup, except for security updates on the Ubuntu machines, CentOS is still working, Ubuntu isn't anymore. Rolling back the update did not help.
Does anyone have a clue what's wrong? Any help appreciated.