<---- template headericclude ----->
Bridging and KVM
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  2. #2
    Join Date
    Aug 2009
    Location
    Waldorf, Maryland
    Posts
    7,343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  3. #3
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bridging and KVM

    Thank you very much but how I do that ?

  4. #4
    Join Date
    Aug 2009
    Location
    Waldorf, Maryland
    Posts
    7,343
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  5. #5
    Join Date
    Jul 2005
    Posts
    1,080
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    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
    ======

  6. #6
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  7. #7
    Join Date
    Jan 2010
    Location
    behind that screen...
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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...

  8. #8
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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...

  9. #9
    Join Date
    Jan 2010
    Location
    behind that screen...
    Posts
    969
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Bridging and KVM

    Quote Originally Posted by geekaume
    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...

  10. #10
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  11. #11
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  12. #12
    stevea Guest

    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
    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.

  13. #13
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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

  14. #14
    Join Date
    Nov 2008
    Location
    Canada
    Posts
    2,729
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

  15. #15
    Join Date
    Aug 2012
    Location
    Grenoble (France)
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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....

Page 1 of 2 12 LastLast

Similar Threads

  1. Bridging ?
    By Knudson in forum Servers & Networking
    Replies: 1
    Last Post: 30th June 2006, 12:34 PM
  2. Bridging two lan cards
    By dmode in forum Using Fedora
    Replies: 0
    Last Post: 20th February 2006, 01:23 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]