Nmap Development mailing list archives
Re: nping: bitrate bug
From: David Fifield <david () bamsoftware com>
Date: Wed, 10 Oct 2012 20:09:14 -0700
On Mon, Oct 08, 2012 at 04:05:41PM +0600, Мамаев Антон Владимирович wrote:
Good day. I use nping for generate traffic with given rate. I need send 12mbit/s traffic ipv6: nping -6 XXXX:XXXX::2 -e eth3.3352 --tcp -p 5032 -HN --data-len 1358 --rate 1104 -c 662739 Send 662739 packet with payload 1358 byte and rate 1104 pps: 1358 byte * 8 bit * 1104 pps ~ 12mbit/s However, i see rate much more 12 mbit/s: avm@avm:~# nping -6 XXXX:XXXX::2 -e eth3.3352 --tcp -p 5032 -HN --data-len 1358 --rate 1104 -c 662739 Starting Nping 0.6.01 ( http://nmap.org/nping ) at 2012-10-08 15:43 YEKT ^C Max rtt: N/A | Min rtt: N/A | Avg rtt: N/A Raw packets sent: 107805 (148.555MB) | Rcvd: 0 (0B) | Lost: 107805 (100.00%) Tx time: 2.43267s | Tx bytes/s: 61066690.84 | Tx pkts/s: 44315.45 Rx time: 2.43267s | Rx bytes/s: 0.00 | Rx pkts/s: 0.00 Nping done: 1 IP address pinged in 2.43 seconds I see bitrate ~ 488 mbit/s!
Thank you for making this report. I think the problem is that the --rate really only controls the inter-packet delay, and the dealy only has millisecond precision. This code in ArgParser.cc evaluates to a delay of 0: /* Compute delay from rate: delay= 1000ms/rate*/ aux32 = 1000 / aux32; o.setDelay(aux32); I don't think there is an easy fix for this. Nmap has similar --min-rate and --max-rate options that use a more sophisticated scheduler that would obey a rate such as 1104. Nping could use something like it. Luis: I have some old notes from the Nmap implementation at http://www.bamsoftware.com/wiki/Nmap/FixedRate (section "Some sample stable rate-fixing code"). David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- nping: bitrate bug Мамаев Антон Владимирович (Oct 09)
- Re: nping: bitrate bug David Fifield (Oct 10)
- Re: nping: bitrate bug Luis MartinGarcia. (Oct 11)
- Re: nping: bitrate bug David Fifield (Oct 10)