mininet安装
Mininet: Rapid Prototyping for Software Defined Networks !
下载mininet:
git clone git://github.com/mininet/mininet
安装可以运行util/install.sh或者通过apt-get install mininet
具体安装过程见官方文档
https://github.com/mininet/mininet/blob/master/INSTALL
floodlight安装
git clone git://github.com/floodlight/floodlight.git
cd floodlight/
ant
cd floodlight/
java -jar target/floodlight.jar
打开 http://localhost:8080/ui/index.html 即可看到floodlight的管理界面
floodlight文档
http://www.projectfloodlight.org/documentation/
mininet模拟组网
启动mininet,命令mn,默认创建最简单的网络拓补,即一个控制节点、一台交换机和两台主机
查看全部节点
查看链路信息
查看节点详细信息
连通性测试
自己编辑网络拓补结构
代码如下:
from mininet.topo import Topo
class MyTopo( Topo ):
def __init__( self ):
"Create custom topo."
# Initialize topology
Topo.__init__( self )
# Add hosts and switches
leftHostUs1 = self.addHost( 'h1' )
rightHostUs1 = self.addHost( 'h2' )
leftHostUs2 = self.addHost( 'h3' )
rightHostUs2 = self.addHost( 'h4' )
leftSwitch = self.addSwitch( 's1' )
rightSwitch = self.addSwitch( 's2' )
# Add links
# self.addLink( leftHost, leftSwitch )
# self.addLink( leftSwitch, rightSwitch )
# self.addLink( rightSwitch, rightHost )
self.addLink( leftSwitch, leftHostUs1 )
self.addLink( leftSwitch, rightHostUs1 )
self.addLink( rightSwitch, leftHostUs2 )
self.addLink( rightSwitch, rightHostUs2 )
topos = { 'mytopo': ( lambda: MyTopo() ) }
To start up a mininet with the provided custom topology,以特定控制器启动mininet的命令如下:
mn --controller=remote --ip=<controller_ip> port=<controller_listen_port>
这里启动的是floodlight
参考
mininet floodlight 搭建SDN环境
http://m.blog.csdn.net/blog/sun123bingyong/43564639
SDN 网络系统之 Mininet 与 API 详解
http://www.ibm.com/developerworks/cn/cloud/library/1404_luojun_sdnmininet/index.html
floodlight vm 下载
https://floodlight.atlassian.net/wiki/display/floodlightcontroller/Floodlight+VM
mn vm解决方案
http://mininet.org/download/
vbox下载地址
http://mininet.org/download/
vmware下载地址
https://my.vmware.com/group/vmware/details?downloadGroup=WKST-904-LX&productId=293&rPId=6194
floodlight+mininet高人博客
http://blog.163.com/s_zhchluo/blog/#m=0&t=2&c=2014-2