> hi,
>
>
> im looking for a way to automate packet generation for traffic
> shaper testing.
> found a testfile online and modified it a bit, only
> source/destination ip are valid for the interface ...the rest is
> from the sourcefile so there are wrong mac addresses and so on.
> for traffic shaping testing (HFSC) i only need a mix of small / big
> packets that i can capture and graph.
> its udp, its 322bytes long (according to trafgen output).
>
>
> when i run:
> trafgen --cpp --dev wlan0 --conf packets/322bytes -t 10ms -n 10
>
> and:
> tcpdump -i wlan0 port 7777
>
>
> it shows 10 packets, each about 10ms apart from another but it takes
> some seconds before the packets show up in tcpdump...why is that?

Any specific reason you're using tcpdump instead of netsniff-ng? ;-)

> running the same command with "-n 100" i get:
> 31 packets captured
> 100 packets received by filter
> 69 packets dropped by kernel
>
> when aborting tcpdump with ctrl+c.
> why would the linux kernel drop packets? since they are 10ms apart
> and 322bytes long it should manage?
> it not like i send 1000 packets without time between sends or am i
> hitting some limitation?

What does the trafgen config file look like? What kernel version are you
using? What driver for wlan0? What version of
netsniff-ng/trafgen/tcpdump?

Without this information it's gonna be rather difficult to pinpoint the
problem...





of course, still new to this.
came to netsniff through mz, didnt look at the rest of the tools yet.
trafgen 0.5.8
netsniff-ng 0.5.8
tcpdump version 4.3.0
libpcap version 1.3.0

Linux infinity 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u1 x86_64 GNU/Linux

from lsmod output i would guess this is the driver:
iwlwifi

lspci says:
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)




packet:
/* This file need to be run with --cpp for c-preprocessor call.

Command example:
 trafgen --cpp --dev dummy0 --conf udp_example01.trafgen \
  --cpu 2 --verbose \
  --ring-size 500KiB
*/
#define ETH_P_IP 0x0800

{
  /* --- Ethernet Header --- */
  /* NEED ADJUST */
  0x90, 0xe2, 0xba, 0x0a, 0x56, 0xb5, # MAC Destination eth5/ivy
  0x00, 0x1b, 0x21, 0x3c, 0x9e, 0x6c, # MAC Source eth31
  const16(ETH_P_IP),

  /* --- IPv4 Header --- */
  0b01000101, 0, /* IPv4 Version, IHL, TOS */
  const16(46), /* IPv4 Total Len (UDP len + IP hdr 20 bytes)*/
  const16(2), /* IPv4 Ident */
  0b01000000, 0, /* IPv4 Flags, Frag Off */
  64, /* IPv4 TTL */
  17, /* Proto UDP */
  csumip(14, 33), /* IPv4 Checksum (IP header from, to) */

  /* --- UDP Header --- */
  /* NEED ADJUST */
  192, 168, 1, 100, /* Source IP */
  192, 168, 1, 200, /* Dest IP */

  const16(9), /* UDP Source Port e.g. drnd(2)*/
  const16(7777), /* UDP Dest Port */
  const16(26), /* UDP length (UDP hdr 8 bytes + payload size */

  /* UDP checksum can be dyn calc via csumudp(offset IP, offset TCP)
   * which is csumudp(14, 34), but for UDP its allowed to be zero
   */
  const16(0),

  /*** Payload ***/
  fill('B', 280),
}


--
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to