How correctly use netmap pkt-gen "sweep n addresses" option ?

Olivier Cochard-Labbé olivier at cochard.me
Mon Jun 24 09:12:59 UTC 2013


Hi,

I'm using netmap pkt-gen as a packet generator/receiver and it's
working great for generating one-flow (one src/dst IP address).
But I would like generate packets with multiples source&destination IP
addresses.
pkt-gen support "range" IP and MAC address:
  -d dst-ip               end with %n to sweep n addresses
  -s src-ip               end with %n to sweep n addresses
  -D dst-mac           end with %n to sweep n addresses
  -S src-mac           end with %n to sweep n addresses

I've did a try with command like this:
pkt-gen -i igb2 -d 2.3.1.1-2.250.250.250 -f tx -l 42 -D
00:1b:21:d3:8f:3e -s 1.2.1.1-1.250.250.250
It seems accepted and the output of pkt-gen is:
...
extract_ip_range [136] extract IP range from 1.2.1.1-1.250.250.250
extract_ip_range [171] range is 1.2.1.1 0 to 1.250.250.250 0
extract_ip_range [136] extract IP range from 2.3.1.1-2.250.250.250
extract_ip_range [171] range is 2.3.1.1 0 to 2.250.250.250 0
...

But all packet generated only use the first IP (src 1.2.1.1 and dst
2.3.1.1 from my example): There is no use of IP range given in
parameters.
How to correctly use this pkt-gen feature (I'm using  9.1-STABLE r252056) ?

Thanks,

Olivier


More information about the freebsd-net mailing list