安裝使用Floodlight
1.安裝floodlight

2.生成拓撲并連接配接控制器floodlight,利用控制器floodlight檢視圖形拓撲
生成拓撲代碼:
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
host1 = self.addHost( 'h1' )
host2 = self.addHost( 'h2' )
host3 = self.addHost( 'h3' )
switch1 = self.addSwitch( 's1' )
switch2 = self.addSwitch( 's2' )
switch3 = self.addSwitch( 's3' )
switch4 = self.addSwitch( 's4' )
# Add links
self.addLink( host1, switch2 )
self.addLink( host2, switch3 )
self.addLink( host3, switch4 )
self.addLink( switch1, switch2 )
self.addLink( switch1, switch3 )
self.addLink( switch1, switch4 )
topos = { 'mytopo': ( lambda: MyTopo() ) }