Topologies for developing holo routing with munet
Munet expects holod and holo-cli to be available so making a symlink to your build objects is recommended.
ln -s ~/.cargo/bin/holod /usr/sbin/holod
ln -s ~/.cargo/bin/holo-cli /usr/sbin/holo-cli
Download the topologies repository:
git clone https://github.com/holo-routing/holo-munet-topologies/
cd holo-munet-topologiesActivate the virtual environment and install munet:
python3 -m venv venv
source venv/bin/activate
pip install munetWe are going to run the ospf topology, whose topo file is contained in ospf/holo-ospf-topo-2-1/munet.yaml. Remember to run this with your virtual environment activated.
Run with:
tmux
sudo -E munet -c ospf/holo-ospf-topo-2-1/munet.yamlYou should be inside munet's CLI. Open a holo-cli for a given router with
munet> holo-cli rt1
To access the router's Terminal(not the holo terminal), we use:
munet> term rt1
logs for each one of your routers can be examined with
cat /tmp/munet/rt1/var.log/holod.log
additionaly you can create a symlink in your dev envionment for quick access.
ln -s /tmp/munet/rt1/var.log/holod.log ~/dev/env/holo/logs/rt1.log
holo conformance tests can be generated automatically from topologies defined here in munet. Setup specify the path to your local holo codebase in setup/env.txt (create it if it doesn't exist):
SNAPSHOT_DIR=/my/holo/directory
Each topology defines a protocol_name and topology_name, which determine the name of the corresponding conformance test directory in your holo repo.
To generate the tests, start the desired topology. It takes about one minute for convergence, after which the holo directory is automatically updated with the generated conformance test.