Walk Through Example - Generation of Realistic Packets with ipktgenΒΆ
In this example, we will use ipktgen
to simulate the generation of realistic
traffic in a computer network based on a sample traffic model and user-sessions file by
following the outlined steps below.
Install using Installing ipktgen
Go to the directory:
cd ipktgen/test/test1
In the test directory, there are files that will be used as input into the traffic
generation process, including app_model.json
and net_xtic.json
. You can
open the files to see the format.
Open the
net_xtic.json
file and replace all occurences of the IP address10.0.0.115
with the IP address of an interface on your device.In a terminal window, run the command below to start all listeners (server ports) to be used in traffic generation process:
sudo ipktgen -v -s -a ./app_model.json -u ./net_xtic.json -o ./test1_out -m Type4
or:
sudo ./test_server
On a different terminal window, run the command below to start the realistic traffic generation process:
sudo ipktgen -v -c -a ./app_model.json -u ./net_xtic.json -o ./test1_out -m Type4
or:
./test_client
This will generate packets based on app_model.json
, and net_xtic.json
.
The traffic generation process terminates on the client side once
all traffic baased on the supplied input files have been generated.
Attention
Each process should be terminated at anytime with ctrl+c
. Please ensure that
the client processes are terminated before the server processes.