FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    F10: Creating A Static IP Bridge to VM

    I've been working with F10's virtualization suite with KVM, QEMU, and Xenner. All my VMs run, but as NAT clients. I am having problems configuring a bridge network interface to allow a client to have a publicly available, static IP address. Primarily, once the network is bridged, the physical interface fails to respond on the physical network.

    If I build a vnetX, and attach it to ethX, host and VM can talk, but the VM can not get to the outside network, and the outside network can not get to the VM. If I leave the VM on the NAT, it gets out, but no one gets in. I've seen a few kluge hacks that use iptables to redirect into the NAT'ed VM, but as public, static, clients have worked with earlier versions, I was hoping for a more standard solution.

    Anyone else working with virtualizing servers? Suggests on bridging?

  2. #2
    Join Date
    Sep 2004
    Posts
    2,006
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    works fine with virtualbox or vmware.

    kvm and xen are not exactly user-friendly.....

  3. #3
    Join Date
    Oct 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're correct all counts. I've worked extensively with VMware's stuff, but am heavily invested in RedHat. With Citrix controlling Xen, there will most likely be some changes with RedHat's model. If Fedora is blazing this path, we may find RedHat right behind it.

    I did find a link about qemu networking that states:
    "QEMU will act as a firewall between guest OS and the host computer, so that no network communication is possible from any host program to the guest OS."
    "There is actually no proper network connection between the guest and the world outside the Virtual Machine."
    Maybe host based routing is the future. In a weird kind of way, its similar to the ESX... If it works.

  4. #4
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See if this one helps at all. It's a page I did on bridged networking with VirtualBox and should be valid for KVM and Qemu as well
    http://home.nyc.rr.com/computertaijutsu/vboxbridge.html

    There's also an article of mine on KVM on the CentOS wiki, which covers bridged networking, I think.


    http://wiki.centos.org/HowTos/KVM

  5. #5
    Join Date
    Oct 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    *** Resolved ***

    Good work, scottro. That was just the resource I needed.

    By default F10 creates a virbr0 which is configured to DHCP to guests and NAT to the physical network. This allows outbound, but firewalls inbound. The trick is to slave a physical NIC to a bridge that will enable routing.

    Adding the following script to /etc/sysconfig/network-scripts/ as ifcfg-nvet1 does just that:

    #!/bin/sh

    IF="eth1"
    NET="192.168.0"
    HOST="100"
    BR="virbr1"

    brctl addbr $BR
    ifconfig $IF 0.0.0.0
    brctl addif $BR $IF
    ifconfig $BR $NET.$HOST netmask 255.255.255.0 up
    route add -net $NET.0 netmask 255.255.255.0 $BR
    route add default gw $NET.1 $BR

    exit 0

    By using this directory and name for the file, it enables the bridge at boot time. This would allow VMs on the host to use addresses on the specified subnet. Since the interface is slaved to the bridge, an ifconfig shows no IP for eth1, but instead for virbr1.

    The assumption is that this card is the system's primary interface.

  6. #6
    stevea Guest
    Good webpage scottro, but the OP should try virt-manager (needs the libvrt service).
    This does the bridge setup by default.

    Redhat is releasing oVirt soon - another virt manager approach.

  7. #7
    scottro's Avatar
    scottro is offline Retired Community Manager -- Banned from Texas by popular demand.
    Join Date
    Sep 2007
    Location
    NYC
    Posts
    8,120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to both of you. Dougbunger, I'm going to add a link to your post to my page in the next day or so,when I have time. @stevea, I'll have to add a mention of virt-manager as well. I haven't played with it.

  8. #8
    Join Date
    Oct 2008
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The virt-manager included in F10-beta does not support inbound bridging, only NAT bridging. Needless to say that was a surprise. As long as the virbr is operational, it will recognize it. It doesn't seem to be a bug, as the only options in the wizard are "Isolated" and "Forwarding".

    I'll look into oVirt. Thanks for the input.

Similar Threads

  1. Replies: 2
    Last Post: 21st February 2009, 06:24 AM
  2. network bridge setting up bridge-utils
    By brw02005 in forum Servers & Networking
    Replies: 0
    Last Post: 28th March 2007, 11:08 PM
  3. Help with bridge
    By bankerdude in forum Servers & Networking
    Replies: 1
    Last Post: 16th June 2005, 02:52 PM
  4. FC2 Overriding static if in favor of dhcp system set for static
    By pkraus109 in forum Servers & Networking
    Replies: 2
    Last Post: 21st September 2004, 05:13 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
  •