The pktgen tool is used to generate and transmit packets to a specified port.
pktgen [-p] [-n] [-m] [-s] [-i] [-r] [-t] [-f] [--help] [-h]
|Display the help text.|
|Replay the file |
|Set the port to transmit on.|
|0 = infinite|
If used with
|0 = line rate|
<rate> = <rate> Mbps
<rate>K = <rate> Kbps
<rate>M = <rate> Mbps
<rate>G = <rate> Gbps
Note: Not all adapters support speeds lower than 1Mbps.
|Insert an incrementing sequence number modifier at <offset> with a bit width of 8|16|32|64|
|Fixed packet size|
|Random packet size between [min:max]|
|Increment packet size between [min:max]|
|Decrement packet size between [min:max]|
|Inject a TX timestamp (used when measuring latency in combination with latency)|
|Set the NUMA node to get a TX host buffer from|
|Ignore error that the host buffer is too small for optimal performance and try anyway.|
|UDP, empty, or incrementing payload.|
Empty payload means whatever content the RAM has.
For UDP packet sizes must be at least 64 bytes.
Incrementing payload is a 16-bit incrementing pattern.
Default options are:
./pktgen -p 0 -n 0 -s 1024 -r 0 -t empty
- pktgen uses the TX statistic to check that every packet has been transmitted. In some cases when for example the port used by pktgen is disabled and enabled while transmitting, the TX statistic goes out of sync. This causes pktgen to hang with a message like:
Packets waiting to be sent: 243299
pktgen can then be terminated by pressing CTRL+C once again.