These examples are intended for two purposes:
- Get started using ComNetsEmu's Python API.
- Get started with core/essential tools/libraries/frameworks used in the application folder.
These examples show how to use Docker containers as Mininet's hosts and spawn terminals (currently only Xterm is supported) for them.
This example demonstrate how to use ComNetsEmu's API to deploy Docker container inside Dockerhost instance. Docker-in-Docker(dind) is used by ComNetsEmu as an lightweight emulation for nested-Virtualization. The Dockerhost with internal Docker containers deployed is used to mimic an actual physical host that runs Docker containers.
This example shows how to run FlowVisor inside Docker container.
Demystify technologies used in Mininet for lightweight network emulation. Run two bash scripts inside the folder with root privilege:
- run.sh: Build a topology with three hosts connected to a single switch and run basic ping, iperf and Openflow tests.
- clean.sh: Cleanup all network resources and processes created by run.sh.
This examples shows the basic setup of a firewall with nftables. It first creates a table and chain to filter on the netfilter input hook and then adds a rule to filter the traffic of IP address '10.0.0.2'. In the end the table is listed.
This example shows how to create TUN interface inside Docker host and attach XDP program to veth interface.
This example demonstrates how to setup a Wireguard network tunnel between two hosts. First the required keys are generated and then the Wireguard interfaces are created and configured.