Fedora Linux Support Community & Resources Center
  #1  
Old 7th August 2012, 02:18 PM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
windows_xp_2003firefox
Bridging and KVM

Hi all,
I have a PC on Fedora 17 connected by WiFi to my router.
I want to make a bridge on my wlan0 to connect KVM VMs on it.
This is my ifcfg-ESSID :
Code:
NAME=ESSID
TYPE=Wireless
ESSID="ESSID"
NM_CONTROLLED=yes
MODE=Managed
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
UUID=7726dca6-3f25-92d5-c340-9027650ba053
ONBOOT=yes
SECURITYMODE=open
DEFAULTKEY=1
IPADDR0=192.168.0.1
PREFIX0=24
GATEWAY0=192.168.0.254
DNS1=212.27.54.252
BRIDGE=br0
and my ifcfg-br0 :
Code:
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.5
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.254
After that my bridge appears in a ifconfig but it's disabled in the list when I create my VM in virt-manager.
I can enable it using
Code:
brctl addbr br0
but it will not be linked to my wlan0.
Using this command line :
Code:
iw dev wlan0 set 4addr on
I can link my bridge to my wlan with brtcl but I can't access network any more (even from my physical PC !)

How can I get this to work ?

thank you by advance
Reply With Quote
  #2  
Old 7th August 2012, 02:32 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,822
linuxfirefox
Re: Bridging and KVM

Try disabling NetworkManager and enable network.

That is what I had to do on F16 to get things to work. My VMs couldn't even get updates until I did that.
Reply With Quote
  #3  
Old 7th August 2012, 02:36 PM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
linuxsafari
Re: Bridging and KVM

Thank you very much but how I do that ?
Reply With Quote
  #4  
Old 7th August 2012, 03:17 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,822
linuxfirefox
Re: Bridging and KVM

systemctl disable NetworkManager

chkconfig network on

You may also have to verify the contents of the network configuration files in /etc/sysconfig/network-scripts for the interfaces to change the "NM_CONTROLLED" parameter to "no", and check the "ONBOOT" parameter is "yes". The last thing I set
was in /etc/sysctl.conf, I set the "net.ipv4.ip_forward = 1" to turn on forwarding.

Since I already had VMs I'm not sure if the last was necessary as it also gets turned on for other things (NAT masquerading) and possibly by other tools, but setting the /etc/sysctl.conf file was clear, and documentable.
Reply With Quote
  #5  
Old 7th August 2012, 09:50 PM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
linuxfirefox
Re: Bridging and KVM

If it helps, I used this reference to set up a bridge for kvm on a fedora 15 server

http://blog.bodhizazen.net/linux/fed...ed-networking/
__________________
======
Doug G
======
Reply With Quote
  #6  
Old 9th August 2012, 06:19 AM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
windows_7firefox
Re: Bridging and KVM

WHen I stop networkmanager service I don't have network access any more. Even if I start netork service.
How can I do to stop NetworkManager service and get my wifi card connected ?

Thank you by advance
Reply With Quote
  #7  
Old 9th August 2012, 06:31 AM
solo2101 Offline
Registered User
 
Join Date: Jan 2010
Location: behind that screen...
Posts: 791
unknownfirefox
Re: Bridging and KVM

this gave me lots of headaches... then I just decided to install virtualbox... way easier when it comes to bridged connections...
Reply With Quote
  #8  
Old 9th August 2012, 10:30 AM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
windows_xp_2003firefox
Re: Bridging and KVM

but me I want to use KVM and bridges and not some third-part solution...

Maybe I am wrong but I think use something already existent in Kernel is lighter than install over it something that do the same...
Reply With Quote
  #9  
Old 9th August 2012, 06:36 PM
solo2101 Offline
Registered User
 
Join Date: Jan 2010
Location: behind that screen...
Posts: 791
unknownfirefox
Re: Bridging and KVM

Quote:
Originally Posted by geekaume View Post
but me I want to use KVM and bridges and not some third-part solution...

Maybe I am wrong but I think use something already existent in Kernel is lighter than install over it something that do the same...
no... you are totally right ...

I'm just lazy...
Reply With Quote
  #10  
Old 11th August 2012, 12:12 PM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
windows_7firefox
Re: Bridging and KVM

I successed in stopping NetworkManager and starting network service but when I put BRIDGE=br0 in my ifcfg-wlan0 I can't restart network service...
My ifcfg-wlan0 :
Code:
DEVICE=wlan0
ESSID="GuiGui"
MODE=Managed
TYPE=Wireless
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
#NAME="Auto GuiGui"
UUID=2c277415-beb6-49e4-a42e-2adbb4dad8a0
ONBOOT=yes
HWADDR=00:19:E0:11:0F:9E
DEFAULTKEY=1
PEERDNS=yes
PEERROUTES=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=rfc3041
BRIDGE=br0
My ifcfg-br0 :
Code:
DEVICE=br0
TYPE=Bridge
ONBOOT=yes
DELAY=0
BOOTPROTO=static
#BROADCAST=192.168.0.255
IPADDR=192.168.0.5
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.254
MTU=1500
DNS=212.27.54.252
IPV6INIT=no
USERCTL=no
What did I do wrong ?

Thank you by advance
Reply With Quote
  #11  
Old 13th August 2012, 05:48 AM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
windows_7firefox
Re: Bridging and KVM

Help me please. I tried many things but every time I put BRIDGE=br in my ifcfg-wlan0, I lose network access as if I weren't connected
Reply With Quote
  #12  
Old 13th August 2012, 07:34 AM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,798
linuxfirefox
Re: Bridging and KVM

Here is the answer .... bridging does NOT work with most wifis

http://www.linux-kvm.org/page/Networking

---------- Post added at 02:34 AM ---------- Previous post was at 01:53 AM ----------

Quote:
Originally Posted by solo2101 View Post
this gave me lots of headaches... then I just decided to install virtualbox... way easier when it comes to bridged connections...
Fail - you still cant bridge most wifis w/ Virtualbox, and it has kernel problems with some regularity.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #13  
Old 13th August 2012, 09:20 AM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
windows_xp_2003firefox
Re: Bridging and KVM

Ok.

Do I have to change my wifi card ? If yes, could you please give me some wifi card models with which I can make my bridge ?

Thank you all for your responses
Reply With Quote
  #14  
Old 13th August 2012, 03:45 PM
beaker_ Offline
Registered User
 
Join Date: Nov 2008
Location: Canada
Posts: 2,370
netbsdmozilla
Re: Bridging and KVM

Why bridge when it will never be trustworthy?

Is there a reason why you don't route your virbr interface instead? Personally, I'd buy a nic and pull a wire.
Reply With Quote
  #15  
Old 13th August 2012, 10:46 PM
geekaume Offline
Registered User
 
Join Date: Aug 2012
Location: Grenoble (France)
Posts: 9
windows_7firefox
Re: Bridging and KVM

beaker,
I can't understand what you said. What do you mean by "why you don't route your virbr interface instead" ? Is there a way for me to have VMs accessing the network (and Internet) with a Wifi interface ?

I can't have a wire : my router is too far from the PC....
Reply With Quote
Reply

Tags
bridge, bridging, kvm

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bridging ? Knudson Servers & Networking 1 30th June 2006 12:34 PM
Bridging two lan cards dmode Using Fedora 0 20th February 2006 12:23 PM


Current GMT-time: 08:15 (Saturday, 30-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat