Create a test network using network namespaces and tc-netem
analysis | ||
benchmarks | ||
scenarios | ||
topo | ||
.gitignore | ||
.gitmodules | ||
LICENSE | ||
mknet | ||
net.py | ||
README.md | ||
setup.py | ||
shell.nix |
mknet
mknet is a tool to simulate various network topologies locally thanks to network namespaces and traffic control (tc).
Prepare your environment
Get the repository and its submodules:
git clone https://git.deuxfleurs.fr/Deuxfleurs/mknet.git
cd mknet
git submodule update --init
Compile benchmark tools:
( cd benchmarks/warp && go build )
( cd benchmarks/s3concurrent && go build )
( cd benchmarks/s3lat && go build )
Switch to root as it is required by our tool, and setup your python environment.
sudo -i
pip3 install --user .
( cd scenarios && pip3 install --user -r requirements.txt )
Sometimes, it is required to add manually your local python lib folder to the environment:
export PYTHONPATH=$PYTHONPATH:$HOME/.local/lib/python3.10/site-packages/
You can check that everything has been installed by running in a python REPL:
import garage_admin_sdk
Run a test
(Not yet implemented)
./mknet scenario ./topo/single-dc.yml ./scenarios/garage-s3lat
Manual usage
./mknet create ./topo/with-vdsl.yml
./mknet run-all ./scenarios/garage-manual
./mknet run dc1:dc1s1 /tmp/mknet-bin/garage* -c /tmp/mknet-store/garage/dc1/dc1s1/garage.toml status
./mknet run-all ./scenarios/clean
./mknet destroy