Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wanted to set up a bridge connection for my VMs (I am using KVM). I modified my etc/network/interfaces file and its contents are:

auto lo
iface lo inet loopback
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

After modifying the etc/network/interfaces file I wanted to make them active so I run the following command:

sudo /etc/init.d/networking restart

but I got the following output:

Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces

so I tried restarting network by the following command:

sudo service networking stop && sudo service networking start

I get the following output:

stop: unknown instance:

If I do :

sudo service networking start 

I get :

networking stop/waiting

and my net has stopped working after that. I am using Ubuntu 12.04 and have a wired DHCP connection.

Please try to resolve this issue so that I can successfully configure bridge for my VMs and get back my net connection.

share|improve this question
    
I've found two posts that would help you. If you have not tried these then you can give them a try: How to setup bridged networking in KVM - Tutorial and KVM/Networking –  Saurav Kumar Sep 14 '13 at 19:01

2 Answers 2

As you found you are getting a warning doing it the way you mentioned. If your physically at your computer do this:

sudo ifdown -a
sudo ifup -a

For SSH session one should read:

http://codeghar.wordpress.com/2011/07/18/debian-running-etcinit-dnetworking-restart-is-deprecated-because-it-may-not-enable-again-some-interfaces/

Anyhow for SSH you might do this:

sudo nohup sh -c "ifdown eth0 -a && ifup eth0 -a"

another suggestion about bridging is mentioned here: http://codeghar.wordpress.com/2011/07/18/debian-running-etcinit-dnetworking-restart-is-deprecated-because-it-may-not-enable-again-some-interfaces/#comment-2108

share|improve this answer

I did sudo /etc/init.d/networking restart and my net started working.

Also, the command:

brctl show

shows my bridge is created.

My problem is solved!

share|improve this answer
    
you should accept your own answer –  Pete Aug 8 at 0:57

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.