8

I have an Ubuntu server with and a VM using KVM. The plan is that the server and the VM have a static IP address. I tried to change /etc/network/interfaces combining some of the examples available to this

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.50
netmask 255.255.255.0
gateway 192.168.0.1

auto br0
iface br0 inet static
address 192.168.0.51
network 192.168.0.0
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

If I restart the networking eth0 has no IP address but the br0 has one. This is part of the solution but not what I need as I am not able to reach the host anymore. The VM is already configured to use br0 and this part is "sort of working"...

Any help is really appreciated.

Thanks!

1 Answer 1

6

Your ip should be on the br0, eth0 won't have an ip. Something like this :

# 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 eth0
iface eth0 inet manual

auto br0
iface br0 inet static
    address xxx.xxx.xxx.xxx
    netmask xxx.xxx.xxx.xxx
    gateway xxx.xxx.xxx.xxx
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0
0

You must log in to answer this question.

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