From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: KVM doesn't send an arp announce after live migrating a domain Date: Wed, 25 Aug 2010 13:59:02 +0300 Message-ID: <20100825105902.GK10499@redhat.com> References: <4C74CBB0.7080203@kangaroot.net> <4C74D641.6020907@msgid.tls.msk.ru> <20100825084312.GH10499@redhat.com> <4C74F5B3.7040900@msgid.tls.msk.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Nils Cant , kvm@vger.kernel.org To: Michael Tokarev Return-path: Received: from mx1.redhat.com ([209.132.183.28]:17412 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751181Ab0HYK7L (ORCPT ); Wed, 25 Aug 2010 06:59:11 -0400 Content-Disposition: inline In-Reply-To: <4C74F5B3.7040900@msgid.tls.msk.ru> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Aug 25, 2010 at 02:51:31PM +0400, Michael Tokarev wrote: > Gleb Natapov wrote: > > On Wed, Aug 25, 2010 at 12:37:21PM +0400, Michael Tokarev wrote: > [] > >> Jokes aside, the thing is that kvm does not know what is > >> an ARP and what is an IP address. It emulates a hardware > >> network card, which never sends any ARP out by its own, > >> it is the operating system IP stack who's doing that. > >> That network card as emulated by kvm does not know what > >> IP addresses are assigned to it inside the guest (there > >> may be many, or may be none at all), so it just can not > >> send the ARPs. > >> > > True. Although qemu sends gratuitous ARP the IP field there is > > incorrect. It is done to update layer 2 topology, not layer 3. > > Actually, the more I think about that, the more it looks > like a job for "external" (for the guest) piece. > > For example, we may teach libvirt or kvm about IP addresses > the guest is using, so that kvm will send these ARPs automatically > after migration has completed. > > It shouldn't be difficult to implement. Something like: > > -net nic,model=virtio,arp=1.2.3.4:5.6.7.8,mac=foo:bar > Back to static IP age? > or, even, > > -net tap,arp=...,... > > for the command-line interface, and/or a 'sendarp' monitor > command that expects a network device and a list of ip > addresses. > > Kvm is the most natural place to do that, I think, and it's > easy to implement there too (it has the tun device which can > inject packets on behalf of the guest) Yes, the configuration > will be duplicated somehow, but that's not a big problem, and > it will make things much more reliable. > KVM is certainly not the most natural place to do that. Even gratuitous ARP we have today will not work if guest changes mac address. KVM couldn't care less about host network protocols. Management may implement guest daemon that will take appropriate action to restore networking after migration on demand (send gratuitous pigeon if IP over pigeons are used by guest). -- Gleb.