Install
git clone https:
//github.com/Pktgen/Pktgen-DPDK.git
cd Pktgen-DPDK/dpdk
export RTE_SDK=/root/Pktgen-DPDK/dpdk
export RTE_TARGET=x86_64-pktgen-linuxapp-gcc
make install T=x86_64-pktgen-linuxapp-gcc
apt-get install libpcap-dev
cd examples/pktgen
make
Execution
./app/build/pktgen -c 7 -n 4 -- -p 3 -m "1.0, 2.1" -T black
Destination MAC change
Format: set mac <Port #> <Destination MAC addr>
Pktgen> set mac 0 42:34:9e:c4:48:23
Change IPs
src.ip min 0 192.168.0.1
src.ip max 0 192.168.0.255
dst.ip min 0 192.168.1.1
dst.ip max 0 192.168.1.255
range 0 enable
start 0
send packet size 변경
Pktgen> set 0 size 128
Pcap 파일 재생
-s <Port #>:<Pcap file path>
./app/build/pktgen -c 0x5 -n 4 -- -p 1 -m "2.0" -T black -s 0:/root/hbot.pcap