Capture and Replay Network Traffic

Example of capturing and replaying captured syslog traffic.

Capture:
tcpdump -v -s 0 -w syslog.dump -nn udp dst port 514
Rewrite:
tcprewrite --fixcsum \
           --enet-dmac=00:11:22:33:44:55 \
           --dstipmap=0.0.0.0/0:1.2.3.4/32 \
           --infile=syslog.dump \
           --outfile=syslog.redump
Replay:
tcpreplay -i eth0 --topspeed syslog.redump
tcpreplay -i eth0 --mbps=5.0 syslog.redump

1 comment:

  1. Very nice! Thank you very much!

    ReplyDelete