https://github.com/shadow/tgen
A powerful traffic generator that can model complex behaviors using Markov models and an action-dependency graph.
https://github.com/shadow/tgen
Last synced: 12 months ago
JSON representation
A powerful traffic generator that can model complex behaviors using Markov models and an action-dependency graph.
- Host: GitHub
- URL: https://github.com/shadow/tgen
- Owner: shadow
- License: other
- Created: 2019-02-12T18:40:19.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-12-31T00:04:05.000Z (over 2 years ago)
- Last Synced: 2025-03-12T02:48:47.472Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 1.07 MB
- Stars: 37
- Watchers: 5
- Forks: 24
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## 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](https://github.com/shadow/shadow),
and to monitor Tor performance in [OnionPerf](https://gitweb.torproject.org/onionperf.git).
## 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/](resource) directory for example config files.
## More documentation
See [tools/README.md](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](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](doc/TGen-Options.md) for a description of all options
supported by TGen.
See [doc/TGen-Markov-Models.md](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.