0

i setup a Ubuntu server 16.04 and installed KVM/QEMU on it. I set static ip 192.168.1.10 for host machine and i want to have a static ip set on the virtual quest machine aswell (192.168.1.20), i know i need to setup a bridged network device, but all the guides i found use DHCP for host machine and static/dhcp for host.

i tried setting it up like this on host machine:

auto lo 
iface lo inet loopback 
# The primary network interface 
auto eno1
iface eth0 inet static
 address 192.168.1.10
 netmask 255.255.255.0
 network 192.168.1.0
 broadcast 192.168.1.1
 gateway 192.168.1.255
 dns-nameservers 8.8.8.8 8.8.4.4

auto br0 
iface br0 inet static 
 address 192.168.1.20
 network 192.168.1.0 
 netmask 255.255.255.0
 broadcast 192.168.1.255 
 gateway 192.168.1.1 
 dns-nameservers 8.8.8.8 8.8.4.4 
 bridge_ports eno1
 bridge_fd 9 
 bridge_hello 0
 bridge_maxage 0 
 bridge_stp off

And on guest machine:

 auto br0 
 iface br0 inet static 
 address 192.168.1.20
 network 192.168.1.0 
 netmask 255.255.255.0
 broadcast 192.168.1.255 
 gateway 192.168.1.1 
 dns-nameservers 8.8.8.8 8.8.4.4 

But this setup does not work. infact i lost all connectivity to both machines with this. What could be the problem?

Connection worked fine on host machine, till i added the bridge adapter.

1 Answer 1

0

Answer is, iface eno1 is set to manual, and br0 is to be setup like eno1 would be normally and that is assigned to the host machine, then set guest normally as eno1.

# The primary network interface
auto eno1
iface eno1 inet manual

auto br0
iface br0 inet static
 address 192.168.1.10
 network 192.168.1.0
 netmask 255.255.255.0
 broadcast 192.168.1.255
 gateway 192.168.1.1
 dns-nameservers 8.8.8.8 8.8.4.4
 bridge_ports eno1
 bridge_stp off
 bridge_fd 0
 bridge_maxwait 0

then on guest normally on default NIC:

# The primary network interface
auto ens3
iface ens3 inet static
 address 192.168.1.20
 network 192.168.1.0
 netmask 255.255.255.0
 gateway 192.168.1.1
 broadcast 192.167.1.255
 dns-nameservers 8.8.8.8 8.8.4.4

What i didn't realize at the start my self is that the br0 becomes the "new" eno1 interface on host and the IP set there would become the IP for the host

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .