LinuxCommandLibrary

tcpreplay

TLDR

Replay pcap

$ tcpreplay -i [eth0] [capture.pcap]
copy
Replay at speed
$ tcpreplay -i [eth0] -M [100] [capture.pcap]
copy
Loop replay
$ tcpreplay -i [eth0] --loop [10] [capture.pcap]
copy
Replay at topspeed
$ tcpreplay -i [eth0] --topspeed [capture.pcap]
copy
Multiplier speed
$ tcpreplay -i [eth0] -x [2.0] [capture.pcap]
copy

SYNOPSIS

tcpreplay [-i interface] [-M mbps] [--loop n] [options] pcap

DESCRIPTION

tcpreplay replays network traffic. It sends pcap files.
Traffic generation. Testing and debugging.
Rate control. Specify bandwidth.
Loop support. Continuous playback.
Network testing. Stress and security.

PARAMETERS

-i IFACE

Output interface.
-M MBPS
Rate in Mbps.
-x MULT
Speed multiplier.
--loop N
Loop count.
--topspeed
Maximum speed.
-K
Preload into memory.

CAVEATS

Root required. Raw socket access. May disrupt networks.

HISTORY

tcpreplay was created for replaying captured network traffic for testing network devices and applications.

SEE ALSO

Copied to clipboard