1

i have an Ubuntu 14.04 LTS server with 3 nic, 3 external ip from 3 different subnet with 3 different gateway.

I have installed libvirt KVM and two Windows 7 64-bit guests.

The eth0 (1.1.1.1 with gateway 1.1.1.254) is the Ubuntu host (and a tun0 OpenVPN).
The br1-eth1 (2.2.2.2 with gateway 2.2.2.254) is the Win7-1 guest and
the br2-eth2 (3.3.3.3 with gateway 3.3.3.254) is the Win7-2 guest.

/etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 1.1.1.1
    netmask 255.255.255.0
    gateway 1.1.1.254
    dns-nameservers 8.8.4.4 8.8.8.8

auto br1
iface br1 inet manual
    bridge_ports eth1
    bridge_fd 0
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

auto br2
iface br2 inet manual
    bridge_ports eth2
    bridge_fd 0
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

win7-1.xml

<interface type='bridge'>
  <mac address='52:54:00:aa:aa:aa'/>
  <source bridge='br1'/>
  <target dev='vnet1'/>
  <model type='virtio'/>
  <alias name='net0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

win7-2.xml

<interface type='bridge'>
  <mac address='52:54:00:ba:ba:ba'/>
  <source bridge='br2'/>
  <target dev='vnet2'/>
  <model type='virtio'/>
  <alias name='net0'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>

I have set the eth1 and eth2 external ip in Windows guests.

The network is ok and working (the config is ok?), but i want to create an internal network between the Ubuntu host and the two Windows guest.
I want to access the Ubuntu host from Windows guests with 192.168.0.1 and the guests from host with 192.168.0.2 (Win7-1) and 192.168.0.3 (Win7-3).

I can manage the guests with virsh command and edit the libvirt xml file only.

Please give me the correct /etc/network/interfaces and host xmls for this internal network config!

Thank you very much!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.