From: "Matthew Patton" Subject: guest MAC leaking into world, packets don't return Date: Fri, 17 Aug 2012 18:47:02 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mail2.inforelay.com ([50.56.211.18]:52250 "EHLO mail2.inforelay.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756016Ab2HQW5p (ORCPT ); Fri, 17 Aug 2012 18:57:45 -0400 Received: from omicron.sitelutions.com (omicron.sitelutions.com [67.208.74.181]) by mail2.inforelay.com (Postfix) with ESMTP id 90D23620BE for ; Fri, 17 Aug 2012 22:47:09 +0000 (UTC) Received: from office-asa.iad4.inforelay.net ([69.169.88.196] helo=mpatton-pc.inforelay.net) by omicron.sitelutions.com with esmtp (Exim 4.69) (envelope-from ) id 1T2VJt-00013h-05 for kvm@vger.kernel.org; Fri, 17 Aug 2012 18:47:09 -0400 Sender: kvm-owner@vger.kernel.org List-ID: My quick search thru the archives didn't turn up a match. I didn't see anything obvious in bugzilla.redhat.com either. Hopefully my search-foo was sufficient to not offend. In the interst of keeping this short, I have a longer writeup with various 'virsh' output over at http://www.linux-kvm.com/content/how-configure-kvm-host-network-using-vlan-virtual-machine. Hmmm, unfortunately it seems to have eaten important parts of the post since they looked like HTML tags. sorry about that. My KVM host is v0.9.10 on CentOS. I have 2 interfaces bonded. The switch side is set to TRUNK mode and requires VLAN tags. On the host I have added bond0 as a bound interface to bridge 'shared' and several bond0.NN defined (but NOT slaved to the bridge) to support a variety of VLANs. Works great. The guest's network must naturally use VLAN tags or it won't get past the switch. So I've defined 'eth0.NN' just like I've done on the host via ifcfg-* files. The short and long is 'brctl showmacs' shows the guest's MAC as 52:54:00:c9:8d:d1. It's on port #2, marked local=no and eventually ages out. But there is another MAC on port 2 that is the same except it starts with 'fe'. My understanding is that this latter one is expected and normal. What I can't explain is that when I tcpdump on bond0 or bond0.NN I'm seeing the guest's private MAC being used instead of the mangled 'fe:' one. It is my guess that since the packet is written incorrectly it can't return to the guest thru 'vnet0' because the the tap is looking for 'fe:' Wasn't the host supposed to rewrite the MAC address as they enter/leave vnet0 in a manner similar to NAT? I defined a Qemu Network: bridge-shared 0824e08b-bb0e-452a-e2c9-dcca52af2341 This is the interface section from my guest's XML.
[root@kvm1b ~]# virsh domiflist test Interface Type Source Model MAC ------------------------------------------------------- vnet0 bridge shared virtio 52:54:00:c9:8d:d1 [root@kvm1b networks]# virsh iface-dumpxml shared -- Cloud Services Architect, Senior System Administrator InfoRelay Online Systems (www.inforelay.com)