16 from mininet.net
import Mininet
17 from mininet.node
import OVSSwitch, Controller, RemoteController
18 from mininet.topo
import LinearTopo
19 from mininet.log
import setLogLevel
20 from mininet.cli
import CLI
27 "Add the OpenFlow13 Protocol" 29 params[
'protocols'] =
'OpenFlow13' 30 OVSSwitch.__init__(self, name, **params)
35 netstat = subprocess.check_output([
'netstat',
'-rn']).split(
'\n')
37 if line.startswith(
'0.0.0.0'):
38 gateway = re.split(
'\s+', line)[1]
41 print "gateway=", gateway
44 c0 = RemoteController(
'c0', ip=gateway, port=6653 )
45 topo = LinearTopo( k=2, n=2 )
46 net = Mininet( controller=c0, topo=topo, switch=KildaSwitch, build=
False )
def __init__(self, name, params)