Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have configured a virtual machine on Ubuntu with the help of below article,

https://help.ubuntu.com/9.04/serverguide/C/libvirt.html

I managed to finish all the parts except the major portion getting the virtual host to talk to the real network, which I guess should be done only via bridge interface.

Via virtual machine manager when I try to choose any interface it gives me interface not bridged

When I try to bridge the interceface eth0 as below

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

I cannot communicate with this interface to the network, host server loses all the communication to network. But when I remote bridge interface from /etc/network/interfaces and configure eth0 as below it works fine.

The primary network interface

  • auto eth0
  • iface eth0 inet static
  • address 192.168.0.223
  • netmask 255.255.255.0
  • network 192.168.0.0
  • broadcast 192.168.0.255
  • dns-nameservers 62.215.6.51
  • gateway 192.168.0.1

How can I set up the bridge interface correctly and what would my /etc/netwrok/interfaces file look like?

share|improve this question

migrated from stackoverflow.com May 30 '10 at 12:28

This question came from our site for professional and enthusiast programmers.

1 Answer 1

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
address 192.168.0.223
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
share|improve this answer
    
thanks for your reply, i commented all the config eth0 and copy paste the above config in /etc/netwrok/interfaces i restart the netwroking services. i can ping the server with 192.168.0.223 ip address but i can not use SSH to login to server do i need to do some more changes so that ethernet starts working on bridge mode? –  MITHIYA MOIZ May 31 '10 at 8:44
    
You can ping 192.168.0.223 because it is the address of the bridge interface, not your server's IP address. You first need to create/configure your virtual machine to use bridged networking. You then need to log in to your virtual machine using virt-viewer (or virtual machine manager) and configure the network (static or dhcp, if you have a dhcp server ready). Then you need to install the openssh-server package to ssh to your server. The ubuntu kvm documentation, help.ubuntu.com/community/KVM, is a good place to start. –  birukw May 31 '10 at 13:49
    
With that said, you don't really need to use bridged networking unless you want your VM to be visible from other machines on the network. The default, NAT, is sufficient if all you want is to work on the VM. I feel that Oracle's VirtualBox is more convenient, if you are virtualizing for personal experimentation. –  birukw May 31 '10 at 13:54

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.