From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: User mode network cause other network doesn't work any more Date: Fri, 02 Sep 2011 17:42:52 +0200 Message-ID: <4E60F97C.5040703@siemens.com> References: <4E60EB68.5020900@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: Liang Guo Return-path: Received: from thoth.sbs.de ([192.35.17.2]:27799 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752924Ab1IBPmz (ORCPT ); Fri, 2 Sep 2011 11:42:55 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 2011-09-02 17:41, Liang Guo wrote: > On Fri, Sep 2, 2011 at 10:42 PM, Jan Kiszka wrote: >> On 2011-09-02 15:59, Liang Guo wrote: >>> Hi, >>> >>> When I run kvm with following option: >>> >>> -net nic -net vde,sock=/var/run/vde2/vde3.ctl >>> >>> the guest OS's network work as expected, I can ping/ssh from/to host OS, >>> but when I run kvm with: >>> >>> -net nic -net user -net nic -net vde,sock=/var/run/vde2/vde3.ctl >> >> That's probably the classic mistake: You create one virtual LAN inside >> QEMU this way. Attached to this LAN are all four peers (two NICs, slirp >> and VDE). > Thank you pointing this out, I thought '-net nic' and '-net user|tap|vd' was > connected with their sequence. > >> >> What you likely want are two backend/frontend pairs: >> -net nic,netdev=net1 -net user,id=net1 \ >> -net nic,netdev=net2 -net vde,sock=/var/run/vde2/vde3.ctl,id=net2 >> >> Jan > I can reach my object with > > -netdev user,id=eth0 -device virtio-net-pci,netdev=eth0 \ > -netdev vde,sock=/var/run/vde2/vde3.ctl,id=eth1 -device > virtio-net-pci,netdev=eth1 > > or > > -net nic,vlan=1 -net user,vlan=1 \ > -net nic,vlan=2 -net vde,sock=/var/run/vde2/vde3.ctl,vlan=2 Err, yeah, I also confused the syntax. :) Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux