Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Ubuntu 12.04 LTS machine running KVM/libvirt. It has two physical ethernet interfaces. I have dedicated eth0 as the primary interface and configured bridging on eth1 for my VMs. The KVM host /etc/network/interfaces looks like this:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 10.0.5.5
    netmask 255.255.255.0
    gateway 10.0.5.254
    dns-nameservers 10.0.5.1

# The secondary network interface
auto br0
iface br0 inet static
    address 10.0.5.6
    netmask 255.255.255.0
    gateway 10.0.5.254
    bridge_ports eth1
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

My KVM guests have IP addresses on the 10.0.5.0/24 network. Everything is working as expected.

My question is: if I want to change the network address to a different network altogether, do I simply change it from within the guest OS and then plug my eth1 interface in on the other network...or does the bridging interface need to be reconfigured on the host? If so, how? I am trying to understand the role of the IP assignment on the br0 virtual interface.

share|improve this question

1 Answer 1

The IP assignment on the br0 interface is so the host system can talk on that interface. Since you're using the separate network card for the host, you can safely turn off the IP address. How to accomplish that with Ubuntu /etc/network/interfaces, I dunno, but I've done it on Centos.

share|improve this answer
    
When you say "turn off the IP address" - can you elaborate as to what you mean? I cant down the interface of course, but I tried to remove the address, net mask, and gateway for eth1 in /etc/network/interfaces and the result is that the KVM guests can no longer get out - despite having no changes to their network configurations. –  dean Feb 15 at 1:10
1  
I guess I can use iface eth1 inet manual –  dean Feb 15 at 1:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.