qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
	Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	Gui jianfeng <guijianfeng@cn.fujitsu.com>,
	Jason Wang <jasowang@redhat.com>,
	"eddie.dong" <eddie.dong@intel.com>,
	qemu devel <qemu-devel@nongnu.org>,
	Yang Hongyang <hongyang.yang@easystack.cn>
Subject: Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror
Date: Mon, 1 Feb 2016 09:11:57 +0000	[thread overview]
Message-ID: <20160201091156.GB2486@work-vm> (raw)
In-Reply-To: <56AF0E35.8000905@cn.fujitsu.com>

* Li Zhijian (lizhijian@cn.fujitsu.com) wrote:
> 
> 
> On 02/01/2016 10:57 AM, Jason Wang wrote:
> >
> >
> >On 01/29/2016 09:38 AM, Li Zhijian wrote:
> >>
> >>
> >>On 01/28/2016 01:44 PM, Jason Wang wrote:
> >>>
> >>>
> >>>On 01/27/2016 10:40 AM, Zhang Chen wrote:
> >>>>From: ZhangChen <zhangchen.fnst@cn.fujitsu.com>
> >>>>
> >>>>Traffic-mirror is a netfilter plugin.
> >>>>It gives qemu the ability to copy and mirror guest's
> >>>>net packet. we output packet to chardev.
> >>>>
> >>>>usage:
> >>>>
> >>>>-netdev tap,id=hn0
> >>>>-chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait
> >>>>-traffic-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outdev=mirror0
> >>>>
> >>>>Signed-off-by: ZhangChen <zhangchen.fnst@cn.fujitsu.com>
> >>>>Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> >>>>Reviewed-by: Yang Hongyang <hongyang.yang@easystack.cn>
> >>>
> >>>Thanks for the patch. Several questions:
> >>>
> >>>- I'm curious about how the patch was tested? Simple setup e.g:
> >>>
> >>>-netdev tap,id=hn0 -device virtio-net-pci,netdev=hn0 -chardev
> >>>socket,id=c0,host=localhost,port=4444,server,nowait -object
> >>>traffic-mirror,netdev=hn0,outdev=c0,id=f0 -netdev
> >>>socket,id=s0,connect=127.0.0.1:4444 -device e1000,netdev=s0
> >>>
> 
> a strange thing is about "host=localhost", connection is refused at SUSE 11.3 but
> connection is connected successfully at Ubuntu 15.10 if i launch qemu with the
> command line above.
> I try to launch qemu at three physical machines installed with SUSE 11.3, they all
> connect failed. But when I specified "host=127.0.0.1", the connection is OK.
> 
> I have comfirmed that:
> - "localhost have pointed to 127.0.0.1 if I "ping localhost" at SUSE
> - "telnet localhost 4444" works at SUSE

My guess is that it's IPv6 related; check the /etc/hosts so see if there's
a ::1 entry for localhost; I've seen some weird behaviour on rhel in the
same way but in other uses.

Dave

> 
> >>>does not works for me.
> >>Hi, Jason
> >>
> >>I just test the mirror using the command line above, it don't work too.
> >>I am looking to it, and find that seems because the -net socket
> >>problem that
> >>I have ever post a patch  try to fix(refer to ↓)
> >>[Qemu-devel] [PATCH] report a error message if -net socket can not
> >>connect to server
> >>https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg00758.html
> >
> >Will have a look at this.
> >
> >>
> >>after applying this patch, the qemu monitor tell me following message:
> >>(qemu) qemu-system-x86_64: net socket is not connected Connection refused
> >
> >Maybe two issues. Have you tired to start the mirror on one VM and then
> >using socket backend to connect it from another VM?
> 
> Yes, if i connect the mirror on VM1 using socket backend from another VM2, the connection
> is established successfully. But on VM2 guest, I can't dump any packet using 'tcpdump'
> That's because in current version code, mirror is not compatible with socket backend and
> we will fix it in next version.
> 
> 
> Best regards.
> Li Zhijian
> 
> >
> >>
> >>
> >>Thanks
> >>Li Zhijian
> >>
> >>
> >>
> >
> >
> >
> >.
> >
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2016-02-01  9:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  2:40 [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror Zhang Chen
2016-01-27  9:23 ` Hailiang Zhang
2016-01-28  5:44 ` Jason Wang
2016-01-28  7:44   ` Zhang Chen
2016-01-28  8:37     ` Jason Wang
2016-01-28  9:52       ` Zhang Chen
2016-01-28 10:06         ` Jason Wang
2016-01-29  1:38   ` Li Zhijian
2016-02-01  2:57     ` Jason Wang
2016-02-01  7:50       ` Li Zhijian
2016-02-01  9:11         ` Dr. David Alan Gilbert [this message]
2016-02-01  9:42           ` Li Zhijian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160201091156.GB2486@work-vm \
    --to=dgilbert@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=hongyang.yang@easystack.cn \
    --cc=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhang.zhanghailiang@huawei.com \
    --cc=zhangchen.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).