LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] bridge networking and KVM

[ILUG] bridge networking and KVM

Mark McLoughlin markmc at redhat.com
Mon Jul 18 12:58:37 IST 2011


On Mon, 2011-07-18 at 10:59 +0100, Gavin McCullagh wrote:
> Hi,
> 
> I'm looking to set up a KVM with bridge mode networking so that the VM is
> not NATted and is directly available on the local network alongside the
> host OS, eg host OS at 10.1.10.2/24 (on eth0) and VM at 10.1.10.3/24 (on
> its eth0, bridged onto the host eth0), both available from a remote host on
> the same subnet or on another subnet via a router.
> 
> I'm a bit new to bridge setup and the examples I've found all seem to miss
> out key details -- they just tell you arbitrary things to type but without
> explaining the background so I can tailor it.

Dunno whether you've seen e.g.

  http://wiki.libvirt.org/page/Networking
  http://wiki.libvirt.org/page/VirtualNetworking

There's some nice tips in there like to watch out for the fact that
iptables FORWARD chain applies to packets forwarded across the bridge

> I presume if I set br0 on the host OS to 10.1.10.3/24 I will encounter
> routing issues.  I guess I could use eg /31 or /32 netmasks which
> would avoid that.
> 
> Does one set IP addresses on the host OS bridge interface?  Do you use the
> same addresses or different to the VM interface?  What is the usual way of
> doing this?

Assuming eth0 on the host is currently assigned 10.1.10.2/24, what you
want to do is enslave eth0 to br0 and assign 10.1.10.2/24 to the br0
interface.

If you're using DHCP, then the bridge interface will use the MAC of the
enslaved eth0 and it will automatically be assigned 10.1.10.2/24

Cheers,
Mark.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell