Walk Through Example - Simulating Generation of Realistic Packets with trafficmodelcheckerΒΆ
In this example, we will use trafficmodelchecker
to simulate the generation of realistic
traffic in a computer network based on a sample traffic model and user-sessions file by
taking the outlined steps below.
Follow the steps in Installing trafficmodelchecker to download
trafficmodelchecker
source file and install.After installing, go to the
trafficmodelchecker
root then change directory to the test/test1 directory:cd test/test1
In the test directory, there are files that will be used as input into the traffic generation process, including the app_model.json and the net_xtic.json files. You can open the files to see the formats. Run the command below to start the simulated traffic generation process.:
trafficmodelchecker -v -a ./app_model.json -u ./net_xtic.json -o ./out
This will generate a csv file (checkmodel_pdus.csv) in the out directory with a list of protocol data units generated for every node in the simulated traffic generation process. Please take a look at the file to examine the output.
Alternatively: the example above can be executed from the ./test1 directory with the commands:
./test1
Or with:
python3 test1.py
Or within a python3 shell environment
from trafficmodelchecker.trafficmodelchecker import Trafficmodelchecker
modelchecker = Trafficmodelchecker('app_model.json', 'net_xtic.json', './out')
modelchecker.generate()