Home

pktgen

Pktgen is a packet generator used to produce synthetic network traffic for benchmarking and testing. It can generate deterministic or random patterns, measure throughput and latency, and help validate network devices, drivers, and configurations. It is commonly used to test NICs, switches, virtual networks, and transport stacks.

In Linux, pktgen is a kernel module in the net/pktgen subsystem. It exposes a set of virtual

DPDK pktgen refers to a user-space traffic generator provided by the DPDK project. This implementation uses

Typical use cases include measuring throughput and latency, stress testing under bursty traffic, and validating queueing

transmit
ports
configured
via
the
procfs
interface
under
/proc/net/pktgen.
Users
configure
packet
size,
rate,
burst,
and
header
templates
(Ethernet,
IPv4/IPv6,
TCP/UDP).
Ports
can
be
coordinated
across
CPUs
to
generate
multi-threaded
traffic.
It
runs
with
elevated
privileges
and
is
used
in
labs
and
continuous
integration
environments.
DPDK
drivers
to
generate
traffic
at
high
rates,
bypassing
the
kernel
network
stack.
It
supports
many
ports,
flexible
packet
formats,
and
advanced
traffic
patterns,
and
is
used
for
high-speed
NIC
benchmarking
on
systems
with
large
pages.
and
scheduling
behavior.
Limitations
differ
by
implementation:
the
kernel(pktgen)
variant
incurs
kernel
overhead
and
may
be
limited
at
extreme
rates,
while
the
DPDK
version
requires
specialized
environments
(such
as
hugepages)
to
achieve
hardware
line
rates.