public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Ben Beuchler <insyte@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: Configuring the bridge interface: why assign an IP?
Date: Mon, 14 Mar 2011 17:35:47 +0000	[thread overview]
Message-ID: <20110314173547.GF23458@redhat.com> (raw)
In-Reply-To: <AANLkTimVY2qhaH7nTA+PFCFOj_6WwJVqhVf=ZgNCMwer@mail.gmail.com>

On Mon, Mar 14, 2011 at 11:24:40AM -0600, Ben Beuchler wrote:
> Most of the examples for setting up the bridge interface on a VM host
> suggest assigning the IP address to the bridge.  Assigning the IP to
> the bridge leaves you open to the MAC address of the bridge changing
> as you add/remove guests from the host, resulting in a brief (~20
> second) loss of connectivity to the host. (I am aware that I can
> manually set the MAC of the bridge to avoid unexpected changes. That's
> my current workaround.)

You don't need to manually set a MAC on the bridge - indeed you can't
set an arbitrary MAC on it - it must have a MAC that matches one of
the interfaces enslaved. The key is that the MAC of the enslaved ethernet
device should be numerically smaller than that of any guest TAP devices.
The kernel gives TAP devices a completely random MAC by default, so you
need to make a little change to that. Two options

 - Take the random host TAP device MAC and simply set the first byte to 0xFE
 - Take the guest NIC MAC, set first byte to 0xFE and give that to
   the host TAP device.

Recent releases of libvirt, follow the second approach and it has worked
out well, eliminating any connectivity loss with guest startup/shutdown

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

      reply	other threads:[~2011-03-14 17:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14 17:24 Configuring the bridge interface: why assign an IP? Ben Beuchler
2011-03-14 17:35 ` Daniel P. Berrange [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110314173547.GF23458@redhat.com \
    --to=berrange@redhat.com \
    --cc=insyte@gmail.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox