I have a bunch of virtual machines (Ubuntu Server 14.04) hosted on a single real server (Ubuntu Server 14.04 with KVM). The number of virtual machines grow, and I'll soon have more than 254 of them.
To test,
I changed in
/etc/network/interfaces
of the real server the netmask from255.255.255.0
to255.255.254.0
. The IP address of the real server is192.168.1.30
.I did the similar operation with
virsh net-edit default
, which changed the netmask ofvirbr0
to255.255.254.0
.I changed the netmask of the switch to
255.255.254.0
as well.I changed the configuration of the test virtual machine like this:
auto eth0 iface eth0 inet static address 192.168.2.35 netmask 255.255.254.0 network 192.168.1.0 broadcast 192.168.2.255 gateway 192.168.1.1 dns-nameservers 192.168.1.13 dns-search example.com
This is the current state:
I can't ping
192.168.2.35
from the real server: it is just stuck at "PING 192.168.2.35 (192.168.2.35) 56(84) bytes of data." When stopped (Ctrl+C), it complains: "143 packets transmitted, 0 received, 100% packet loss, time 142134ms".The virtual machine
192.168.2.35
can't ping anything (neither the switch, nor the real server, nor google.com), throwing "connect: Network is unreachable" error for the first two, or "ping: unknown host google.com" for the last one.The virtual machine can ping itself.
What's wrong with my configuration?