Skip to content
/ tgen Public

A powerful traffic generator that can model complex behaviors using Markov models and an action-dependency graph.

License

Notifications You must be signed in to change notification settings

shadow/tgen

Repository files navigation

TGen

TGen is a C application that generates traffic flows between other TGen instances. The characteristics of the traffic (e.g., size, timing, number of parallel flows, etc.) can be configured by the user.

TGen can generate complex traffic patterns. Users write relatively simple python3 scripts to generate graphml files that are then used as TGen configuration files that instruct TGen how to generate traffic. TGen also supports the use of Markov models in order to generate TCP flows and packet streams according to common probability distributions.

TGen is used to simulate traffic flows in Shadow, and to monitor Tor performance in OnionPerf.

Setup

Dependencies:

  • CMake
  • GLib 2.0
  • IGraph

Dependencies in Fedora/RedHat:

sudo yum install cmake glib2-devel igraph-devel

Dependencies in Ubuntu/Debian:

sudo apt-get install cmake libglib2.0-dev libigraph-dev

Build with a custom install prefix:

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local
make

Optionally install to the prefix:

make install

Usage

Run TGen with a single argument (the path to a config file). For example, first run a server:

tgen resource/server.tgenrc.graphml > tgen.server.log

and then run a client that connects to the server:

tgen resource/client.tgenrc.graphml > tgen.client.log

See the resource/ directory for example config files.

More documentation

See tools/README.md for setup instructions for the TGenTools toolkit that can be used to parse and plot tgen log output.

See doc/TGen-Overview.md for an overview of how to use a graph to instruct TGen how it should generate traffic, and then see doc/TGen-Options.md for a description of all options supported by TGen.

See doc/TGen-Markov-Models.md for a description of how to create and use Markov models to instruct TGen how to generate streams in a traffic flow and packets in a stream.

About

A powerful traffic generator that can model complex behaviors using Markov models and an action-dependency graph.

Resources

License

Stars

Watchers

Forks

Packages

No packages published