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

I have a Ubuntu 10.04 server installed on a Dell 1950 with two gigabit ports. I have also installed KVM and bridge-utils.

I have setup a win 2008 VM and it has a NATed network current working. However I want to access the VM server directly from the outside world. For this I want to change it to use bridged networking as recommend.

here is the /etc/network/interfaces file:

auto eth1
iface eth1 inet static
        address 10.0.1.37
        netmask 255.255.255.0
        gateway 10.0.1.1


#auto br0 (commented as system was not booting)
iface br0 inet static
        address 10.0.1.44
        network 10.0.1.0
        netmask 255.255.255.0
        broadcast 10.0.1.255
        gateway 10.0.1.1
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

When I do ifconfig, br0 is not showing up. If I do:

sudo ifconfig br0 up

I get: br0: ERROR while getting interface flags: No such device

If I do:

> sudo ifup br0 

The whole system hangs or the network goes out ( I am doing this remotely over SSH).

What an I missing? How do I diagnose the issue?

Thanks!

share|improve this question

1 Answer 1

up vote 1 down vote accepted

remove IP config from eth1, all ip configuration should be on the bridge

share|improve this answer
    
Thanks. I want both the host and guest to have public IP access on the same sub-net (assume the 10.x.x.x are the public IPs). I am doing this remotely, so want to prevent any mistakes. Can you kindly post a sample interfaces file that I can achieve this or point me to an article/how to. –  taazaa Feb 12 '11 at 18:31
    
sorry, I usually do this on RHEL systems. But in general, you leave ethX without IP configuration, and set the IP on the bridge instead - this makes the host accessible through that IP. The you plug the VMs into the bridge, and give them their own IPs. In order to be able to make this work, you can build a script in cron, which will reset the network back to normal every 15 minutes, so if you lock yourself out, it'll give you the system back, unless you've made everything work and cancel the cronjob –  dyasny Feb 12 '11 at 19:28
    
thanks dyasny. I will try this shortly. –  taazaa Feb 13 '11 at 16:09
    
Worked as expected! Thanks for the cron job tip that saved me a some time. –  taazaa Feb 17 '11 at 20:17

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.