It is currently Fri Aug 23, 2019 3:41 pm


All times are UTC




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Sun Jun 23, 2013 7:36 am 
Offline

Joined: Sun Jun 23, 2013 7:28 am
Posts: 3
Whenever i want to capture live traffic with wireshark betwen JUNOS-JUNOS .
A message appears "End of file on pipe magic during open"
But in the case of IOS-JUNOS all is ok .

using traditional mode .this message appears
such file or directory
.............cap
NOTE: This feature is only available for local hypervisors.




Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Sun Jun 23, 2013 11:04 am 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
The same issue. For some reason captured file is not created when capturing between 2 Qemu instances.

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Mon Jun 24, 2013 12:45 pm 
Offline

Joined: Sun Jun 23, 2013 7:28 am
Posts: 3
Where is the gns3's code to capture ? I use gns3 in Debian y launch it from source code .


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Thu Jun 27, 2013 8:25 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi,

I think the reason is that all recent Qemu versions use the new -netdev syntax that isn't compatible with the dump option (the one allowing us to capture network traffic).

The dump option is supported by the -net syntax which is considered obsolete since QEMU 0.12, although it continues to work.
http://wiki.qemu.org/Documentation/Networking

Qemuwrapper will detect if Qemu supports the -netdev syntax and will use it, otherwise it falls back to the old -net syntax, therefore the dump option cannot be used with all recent versions of Qemu (not the one shipped in our all-in-one and DMG version of GNS3). You can force to use the old -net syntax by editing qemuwrapper.py and change line #31 to the following:

Code:
#qemuprotocol: 0=old, 1=experimental
qemuprotocol = 0


Also, there were some talks to support dump with the -netdev syntax but do not know about the outcome -> http://lists.nongnu.org/archive/html/qe ... 00498.html

Cheers,

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Thu Jun 27, 2013 8:33 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Apparently something exist to capture using the -netdev syntax but not quite stable at the time they wrote this:

http://lists.gnu.org/archive/html/qemu- ... 01958.html

Guess it will need some tests to check if it works with the latest Qemu release.

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Fri Jun 28, 2013 7:19 pm 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
Quote:
You can force to use the old -net syntax by editing qemuwrapper.py and change line #31 to the following:

#qemuprotocol: 0=old, 1=experimental
qemuprotocol = 0


Are you sure that changing that line force qemu to old syntax?


[email protected] qemuwrapper]# ./qemuwrapper.py
Qemu Emulator Wrapper (version 0.8.4-RC4)
Copyright (c) 2007-2011 Thomas Pani & Jeremy Grossmann

Qemu path (/usr/local/bin/qemu-system-i386) is valid
Qemu-img path (qemu-img) is valid
Qemu TCP control server started (port 10525).
Listening on all network interfaces
Connection from ('127.0.0.1', 59024)
Disconnection from ('127.0.0.1', 59024)
Connection from ('127.0.0.1', 59025)
Shutdown in progress...
Shutdown completed.
Qemu path is now /usr/local/bin/qemu-system-i386
Qemu-img path is now /usr/local/bin/qemu-img
Working directory is now /home/brezular/GNS3-work/test-capture-linux/working
!! QEMU1.console = 3001
!! QEMU1.image = /home/brezular/Downloads/GNS3-files/PC/Microcore/Stable/Host/3.8.2/linux-microcore-3.8.2.img
!! QEMU1.ram = 64
!! QEMU1.options = -nographic
!! QEMU1.kvm = True
!! Microcore.console = 3002
!! Microcore.image = /home/brezular/Downloads/GNS3-files/PC/Microcore/Stable/Host/3.8.2/linux-microcore-3.8.2.img
!! Microcore.ram = 64
!! Microcore.options = -nographic
!! Microcore.kvm = True
!! Microcore.console = 3001
Connection from ('127.0.0.1', 59036)
Disconnection from ('127.0.0.1', 59036)
!! QEMU2.console = 3003
!! QEMU2.image = /home/brezular/Downloads/GNS3-files/PC/Microcore/Stable/Host/3.8.2/linux-microcore-3.8.2.img
!! QEMU2.ram = 64
!! QEMU2.options = -nographic
!! QEMU2.kvm = True
!! Microcore_2.console = 3004
!! Microcore_2.image = /home/brezular/Downloads/GNS3-files/PC/Microcore/Stable/Host/3.8.2/linux-microcore-3.8.2.img
!! Microcore_2.ram = 64
!! Microcore_2.options = -nographic
!! Microcore_2.kvm = True
!! Microcore_2.console = 3003
Formatting '/home/brezular/GNS3-work/test-capture-linux/working/Microcore/FLASH', fmt=qcow2 size=104857600 backing_file='/home/brezular/Downloads/GNS3-files/PC/Microcore/Stable/Host/3.8.2/linux-microcore-3.8.2.img' encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Formatting '/home/brezular/GNS3-work/test-capture-linux/working/Microcore/SWAP', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Falling back to the new qemu syntax
Starting Qemu: /usr/local/bin/qemu-system-i386 -name Microcore -m 64 /home/brezular/GNS3-work/test-capture-linux/working/Microcore/FLASH -hdb /home/brezular/GNS3-work/test-capture-linux/working/Microcore/SWAP -enable-kvm -device rtl8139,mac=00:ab:27:ef:c6:00,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:40001,localaddr=127.0.0.1:40000 -device rtl8139,mac=00:00:ab:9a:27:01 -device rtl8139,mac=00:00:ab:7e:85:02 -device rtl8139,mac=00:00:ab:cb:a4:03 -device rtl8139,mac=00:00:ab:69:27:04 -device rtl8139,mac=00:00:ab:c5:9f:05 -serial telnet::3001,server,nowait -nographic
Qemu started with PID 3441
Warning: nic rtl8139.1 has no peer
Warning: nic rtl8139.2 has no peer
Warning: nic rtl8139.3 has no peer
Warning: nic rtl8139.4 has no peer
Warning: nic rtl8139.5 has no peer
3441 (process ID) old priority 0, new priority 19
Formatting '/home/brezular/GNS3-work/test-capture-linux/working/Microcore_2/FLASH', fmt=qcow2 size=104857600 backing_file='/home/brezular/Downloads/GNS3-files/PC/Microcore/Stable/Host/3.8.2/linux-microcore-3.8.2.img' encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Formatting '/home/brezular/GNS3-work/test-capture-linux/working/Microcore_2/SWAP', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off
/usr/local/bin/qemu-img returned with 0
Falling back to the new qemu syntax
Starting Qemu: /usr/local/bin/qemu-system-i386 -name Microcore_2 -m 64 /home/brezular/GNS3-work/test-capture-linux/working/Microcore_2/FLASH -hdb /home/brezular/GNS3-work/test-capture-linux/working/Microcore_2/SWAP -enable-kvm -device rtl8139,mac=00:ab:a2:f3:60:00,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:40000,localaddr=127.0.0.1:40001 -device rtl8139,mac=00:00:ab:65:8c:01 -device rtl8139,mac=00:00:ab:94:e3:02 -device rtl8139,mac=00:00:ab:17:ec:03 -device rtl8139,mac=00:00:ab:e4:cd:04 -device rtl8139,mac=00:00:ab:e9:13:05 -serial telnet::3003,server,nowait -nographic
Qemu started with PID 3459
Warning: nic rtl8139.1 has no peer
Warning: nic rtl8139.2 has no peer
Warning: nic rtl8139.3 has no peer
Warning: nic rtl8139.4 has no peer
Warning: nic rtl8139.5 has no peer
3459 (process ID) old priority 0, new priority 19

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Fri Jun 28, 2013 7:35 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi,

Quote:
Are you sure that changing that line force qemu to old syntax?


Well not anymore... ;) Another way to test would be to add the following in one of your Qemu guest options:

Code:
-netdev dump,id=dump0,file=/tmp/my_capture.pcap


Then create a topology which contains your guest, generate traffic and check that /tmp/my_capture.pcap exists and open it using Wireshark.

You can also do it manually to check that Qemu does start with this syntax.

Code:
/usr/local/bin/qemu-system-i386 -name Microcore -m 64 /home/brezular/GNS3-work/test-capture-linux/working/Microcore/FLASH -hdb /home/brezular/GNS3-work/test-capture-linux/working/Microcore/SWAP -enable-kvm -device rtl8139,mac=00:ab:27:ef:c6:00,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:40001,localaddr=127.0.0.1:40000 -device rtl8139,mac=00:00:ab:9a:27:01 -device rtl8139,mac=00:00:ab:7e:85:02 -device rtl8139,mac=00:00:ab:cb:a4:03 -device rtl8139,mac=00:00:ab:69:27:04 -device rtl8139,mac=00:00:ab:c5:9f:05 -serial telnet::3001,server,nowait -nographic -netdev dump,id=dump0,file=/tmp/my_capture.pcap


Cheers,

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Fri Jun 28, 2013 8:46 pm 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
Hi,

Using parameter,
Quote:
-nographic -netdev dump,id=dump0,file=/home/brezular/my_capture.pcap
I'm getting the message below and VM is not started:

Quote:
qemu-system-i386: -netdev dump,id=dump0,file=/home/brezular/my_capture.pcap: Parameter 'type' expects a netdev backend type

_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Fri Jun 28, 2013 8:53 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Try this instead:

Quote:
-nographic -netdev dump,id=gns3-0,file=/home/brezular/my_capture.pcap

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: GNS3 JUNOS-JUNOS capture traffic problems
PostPosted: Fri Jun 28, 2013 9:20 pm 
Offline

Joined: Mon Nov 10, 2008 10:31 am
Posts: 555
Location: Slovakia
Try this instead:

Quote:
-nographic -netdev dump,id=gns3-0,file=/home/brezular/my_capture.pcap

...
Quote:
qemu-system-i386: -netdev dump,id=gns3-0,file=/home/brezular/my_capture.pcap: Duplicate ID 'gns3-0' for netdev



_________________
Brezular

All my tutorials can be found here:
http://brezular.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO