Automate mininet to run batch commands

If you prefer to use mininet console instead python API, maybe you will need automate the process to run batch commands.
With source command you can load a file with all commands to execute inside mininet, like this:

source init.cli

This is the content of init.cli:

py "Configuring network"
h1 ifconfig h1-eth0
h2 ifconfig h2-eth0
py "Current network:"
py "Adding switches to the controller"
sh ovs-vsctl set-controller s1 tcp:
sh ovs-vsctl set-controller s2 tcp:

Enjoy it!


Popular posts from this blog

Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04

from: can't read /var/mail/ in Python scripts

SNMP + Telegraf + InfluxDB