Hey,
You just a python code and run it with mininet
sudo mn --mac --controller remote,ip=localhost --switch=ovs --custom ~/topology.py --topo mytopo
The code looks like
from mininet.topo import Topo
class MyTopo( Topo ):
def __init__( self ):
# Initialize topology
Topo.__init__( self )
# Add hosts
h1 = self.addHost('h1')
h2 = self.addHost('h2')
# Add switches
s1 = self.addSwitch('s1')
s2 = self.addSwitch('s2')
# Add links
self.addLink(h1,s1)
self.addLink(h2,s2)
self.addLink(s1,s2)
topos = { 'mytopo': ( lambda: MyTopo() )}