I have just set up a mininet topology. And now I want to connect one port on the switch in Mininet to an external port through an interface in Ubuntu. The Ubuntu server has two ports:
ens33
connected to a real networkens38
connected to VMnet2
My Python script:
from mininet.net import Mininet
from mininet.node import Controller
from mininet.cli import CLI
from mininet.link import Intf
from mininet.log import setLogLevel, info
from mininet.topo import Topo
class MyTopo( Topo ):
"Simple topology example."
def __init__( self ):
"Create custom topo."
# Initialize topology
Topo.__init__( self )
# Add hosts and switches
'*** Add switches\n'
s1 = self.addSwitch('s1')
Intf('ens38', node=s1)
s2 = self.addSwitch('s2')
'*** Add hosts\n'
h2 = self.addHost('h2')
# Add links
'*** Add links\n'
self.addLink(h2, s2)
topos = { 'mytopo': ( lambda: MyTopo() ) }
But when I run it with the following command line:
mn --custom qtho-topo.py --topo mytopo \
--controller=remote,ip=192.168.1.128,port=6633 \
--switch ovsk,protocols=OpenFlow13
There are errors:
Caught exception. Cleaning up...
AttributeError: 'str' object has no attribute 'addIntf'
Does anyone have any experience with this?