testingnetwork-programmingpcaptcpreplay

Set time interval between loops in tcpreplay


I need to replay packets at good speeds, but also I need to take a break about 20 seconds before the next round

tcpreplay -i eth1 --pktlen -p3200 -l10 Sample.pcap

Solution

  • simple little shell script:

    #!/bin/bash
    i=0
    while [ $i -lt 10 ]; do
        tcpreplay -i eth1 --pktlen -p 3200 Sample.pcap
        i=$(($i + 1))
        sleep 20
    done