From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKh2z-0004mR-IH for qemu-devel@nongnu.org; Thu, 12 May 2011 21:20:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKh2y-0002Of-Im for qemu-devel@nongnu.org; Thu, 12 May 2011 21:20:05 -0400 Received: from mail-iy0-f173.google.com ([209.85.210.173]:48579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKh2y-0002Nt-FX for qemu-devel@nongnu.org; Thu, 12 May 2011 21:20:04 -0400 Received: by iym10 with SMTP id 10so1999488iym.4 for ; Thu, 12 May 2011 18:20:02 -0700 (PDT) MIME-Version: 1.0 Sender: vincent@palatin.fr In-Reply-To: <4DCC8523.2000501@landley.net> References: <4DCB486F.70509@landley.net> <4DCC8523.2000501@landley.net> From: Vincent Palatin Date: Thu, 12 May 2011 21:19:42 -0400 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] -net interface association behavior change in current -git. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Rob Landley Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org >> First of all, as you have 2 totally separated subnets in your setup, I >> think your command-line should use "vlan=3D" parameter to isolate them, >> else you will end up with some random routing/broadcasting (and random >> tends to change over time). > > Does the kernel need some sort of vlan support compiled into it for this > to work, or can the kernel not care? You don't need anything in your kernel, this is for Qemu network layer configuration. >> I'm not using setup with multiple NICs but I would have written somethin= g like : >> qemu -net nic,vlan=3D1,blah -net user,vlan=3D1 -net nic,vlan=3D2,blah -n= et >> tun,vlan=3D2,blah >> >> In addition to this, which type of NIC are you using ? > > The actual command line is various permutations of: > > ~/qemu/qemu/x86_64-softmmu/qemu-system-x86_64 -m 512 -kernel > ~/linux/linux/arch/x86/boot/bzImage -no-reboot -hda squeeze.ext3 -append > "root=3D/dev/hda rw" -net nic,model=3De1000,macaddr=3D52:54:00:11:11:11 -= net > user -redir tcp:9876::22 -net nic,model=3De1000,macaddr=3D52:54:00:22:22:= 22 > -net tap,ifname=3Dkvm0,script=3Dno,downscript=3Dno > > With the parameters reordered to try to beat some controllable behavior > out of it. =A0(It had a deterministic behavior before the above commit, > going back at least 2 years. =A0The behavior was changed by the commit.) > >> In my understanding, the Linux kernel might assign interface number >> depending on the order the interfaces are appearing. > > It's going in PCI bus order. =A0And the _interfaces_ are still happily in > PCI bus order both before and after this commit. =A0What's changing is th= e > association between interface and -net user or -net tap. > > The first one, with macaddr 11:11:11, is always eth0. =A0But before the > patch, eth0 is -net user, and after the patch eth0 is -net tap. So, did you try the vlan parameter which is supposed to associate each interface with the proper thing (IMO the command line order should not have anything to do with it) ? --=20 Vincent