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

Luigi Rizzo rizzo at iet.unipi.it
Mon Jun 24 09:58:01 UTC 2013


On Mon, Jun 24, 2013 at 11:12 AM, Olivier Cochard-Labbé
<olivier at cochard.me>wrote:

> 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) ?
>
>
sorry, it was never completely implemented, you need to add some code
to play with it.

cheers
luigi


More information about the freebsd-net mailing list