public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* User mode network cause other network doesn't work any more
@ 2011-09-02 13:59 Liang Guo
  2011-09-02 14:42 ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Liang Guo @ 2011-09-02 13:59 UTC (permalink / raw)
  To: kvm

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

I can ping from/to host OS in guest OS, but when I try to ssh to host OS in
guest OS, I get 'connection reset' error.

Is this a bug or a expected behaviour ?

I have test qemu 0.14, kvm 0.14 and kvm 0.15, my host os is deban sid,
guest OS is Oracle Enterprise Linux or Debian sid.

Thanks and Regards,
-- 
Liang Guo
http://bluestone.cublog.cn

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: User mode network cause other network doesn't work any more
  2011-09-02 13:59 User mode network cause other network doesn't work any more Liang Guo
@ 2011-09-02 14:42 ` Jan Kiszka
  2011-09-02 15:41   ` Liang Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2011-09-02 14:42 UTC (permalink / raw)
  To: Liang Guo; +Cc: kvm

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).

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

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: User mode network cause other network doesn't work any more
  2011-09-02 14:42 ` Jan Kiszka
@ 2011-09-02 15:41   ` Liang Guo
  2011-09-02 15:42     ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Liang Guo @ 2011-09-02 15:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: kvm

On Fri, Sep 2, 2011 at 10:42 PM, Jan Kiszka <jan.kiszka@siemens.com> 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

Thanks,
-- 
Liang Guo
http://bluestone.cublog.cn

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: User mode network cause other network doesn't work any more
  2011-09-02 15:41   ` Liang Guo
@ 2011-09-02 15:42     ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2011-09-02 15:42 UTC (permalink / raw)
  To: Liang Guo; +Cc: kvm@vger.kernel.org

On 2011-09-02 17:41, Liang Guo wrote:
> On Fri, Sep 2, 2011 at 10:42 PM, Jan Kiszka <jan.kiszka@siemens.com> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-02 15:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-02 13:59 User mode network cause other network doesn't work any more Liang Guo
2011-09-02 14:42 ` Jan Kiszka
2011-09-02 15:41   ` Liang Guo
2011-09-02 15:42     ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox