I have a bridged network setup and working, following the guides
https://help.ubuntu.com/community/KVM/Installation
and
https://help.ubuntu.com/community/KVM/Networking
My setup is similar to this question: KVM Bridged Network Not Working, but I can successfully ssh into the guest machine using its ip.
When I create a second device, following the same process as before (the one in the accepted answer to this question), it also works successfully: I can ping to-and-from it, and I can ssh into it. The problem is that the two guest machines doesn't work at the same time. If the one has networking, the other one doens't, and vica versa.
All of the computers on my network are receiving IPs from the DHCP server, and it successfully assigns IPs to my guests if they are not switched on at the same time.
Should I be creating the guests in a different way if I want them to be bridged at the same time?
Details about my setup:
ifconfig
br0 Link encap:Ethernet HWaddr 00:23:ae:8b:0e:6d
inet addr:192.168.14.111 Bcast:192.168.14.255 Mask:255.255.255.0
inet6 addr: fe80::223:aeff:fe8b:e6d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2203 errors:0 dropped:0 overruns:0 frame:0
TX packets:678 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:200635 (200.6 KB) TX bytes:231362 (231.3 KB)
eth0 Link encap:Ethernet HWaddr 00:0a:cd:1c:71:fd
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)
eth1 Link encap:Ethernet HWaddr 00:23:ae:8b:0e:6d
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2191 errors:0 dropped:0 overruns:0 frame:0
TX packets:792 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:234455 (234.4 KB) TX bytes:248498 (248.4 KB)
Interrupt:17
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:65536 Metric:1
RX packets:963 errors:0 dropped:0 overruns:0 frame:0
TX packets:963 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:295031 (295.0 KB) TX bytes:295031 (295.0 KB)
virbr0 Link encap:Ethernet HWaddr 52:54:00:4f:df:90
inet addr:192.168.100.1 Bcast:192.168.100.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)
vnet0 Link encap:Ethernet HWaddr fe:54:00:6a:11:7f
inet6 addr: fe80::fc54:ff:fe6a:117f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:941 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:2516 (2.5 KB) TX bytes:91292 (91.2 KB)
vnet1 Link encap:Ethernet HWaddr fe:54:00:bc:8c:ed
inet6 addr: fe80::fc54:ff:febc:8ced/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:919 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:7988 (7.9 KB) TX bytes:85304 (85.3 KB)
cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth1
iface eth1 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth1
bridge_stp off
bridge_fd 0
bridge_maxwait 0
# post-up ip link set br0 address 00:23:ae:8b:0e:6d
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.0023ae8b0e6d no eth1
vnet0
vnet1
virbr0 8000.5254004fdf90 yes virbr0-nic
ip route
default via 192.168.14.1 dev br0
169.254.0.0/16 dev br0 scope link metric 1000
192.168.14.0/24 dev br0 proto kernel scope link src 192.168.14.111
192.168.100.0/24 dev virbr0 proto kernel scope link src 192.168.100.1
I am using eth1
, eth0
is a second network card that is unused.
The ifconfig
of the first virtual machine is:
eth0 Link encap:Ethernet HWaddr 52:54:00:bc:8c:ed
inet addr:192.168.14.150 Bcast:192.168.14.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:febc:8ced/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26341 errors:0 dropped:9 overruns:0 frame:0
TX packets:13142 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35241526 (35.2 MB) TX bytes:905257 (905.2 KB)
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:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1184 (1.1 KB) TX bytes:1184 (1.1 KB)
The ifconfig
of the second virtual machine is:
eth0 Link encap:Ethernet HWaddr 52:54:00:17:cc:ef
inet addr:192.168.14.148 Bcast:192.168.14.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe17:ccef/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29695 errors:0 dropped:11 overruns:0 frame:0
TX packets:13566 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35556206 (35.5 MB) TX bytes:944517 (944.5 KB)
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:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1184 (1.1 KB) TX bytes:1184 (1.1 KB)
The machines work fine when they are only running one at a time, but they can't both be pinged at the same time. The connection seems to jump between them, favouring whichever is busy doing stuff on the network.
ifconfig
outputs for the two guest VMs.ifconfig
of the two VMS.