Mininet

基于DFS算法的Ryu+Mininet应用

一曲冷凌霜 提交于 2019-12-10 20:05:34
利用DFS算法,实现Ryu应用,并在Mininet上完成相关验证 Ryu与Mininet相关安装与配置详见: https://blog.csdn.net/haimianxiaojie/article/details/50705288 关于本文内所有完整代码详见: https://github.com/PPPerry/Ryu_projects 中的DFS部分 实现内容如下: 在Mininet上搭建一个20个节点网络(拓扑给定),每个网络节点下挂一个主机; 按照如图所示的拓扑,编写mininet的拓扑代码,各个交换机与主机的序号均相同。 完整的拓扑代码如下: #!/usr/bin/python from mininet . net import Mininet from mininet . node import Controller , RemoteController , OVSController from mininet . node import CPULimitedHost , Host , Node from mininet . node import OVSKernelSwitch , UserSwitch from mininet . node import IVSSwitch from mininet . cli import CLI from mininet .

how to connect different switches to different remote controllers in mininet?

流过昼夜 提交于 2019-12-10 15:32:20
问题 I want to connect different switches of the mininet virtual network to different remote controller and am unable to get any idea how to proceed. Please provide any method to do this? Any python example is appreciated. 回答1: I recommand you to read this mail form mininet's mailing list archives in order to have an idea about how to do it yourself. I hope you already know the mininet's python API too. Find below the python code i wrote. You can custumize it #!/usr/bin/python from mininet.net

Mininet Cannot find required executable controller

被刻印的时光 ゝ 提交于 2019-12-10 14:37:58
问题 Whenever I want to run sshd.py example in mininet or some custome code I have written myself I get *** Creating network *** Adding controller *** Adding hosts: h1 h2 h3 h4 h5 *** Adding switches: s1 *** Adding links: (h1, s1) (h2, s1) (h3, s1) (h4, s1) (h5, s1) *** Configuring hosts h1 h2 h3 h4 h5 *** Starting controller Cannot find required executable controller. Please make sure that it is installed and available in your $PATH: (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)

2019 SDN上机第6次作业

情到浓时终转凉″ 提交于 2019-12-10 10:40:55
2019 SDN上机第6次作业 1.实验拓扑 (1)实验拓扑 (2)使用Python脚本完成拓扑搭建 from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController,CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections class MyTopo(Topo): def __init__(self): # initilaize topology Topo.__init__(self) # add hosts and switches h1 = self.addHost('h1') h2 = self.addHost('h2') h3 = self.addHost('h3') h4 = self.addHost('h4') h5 = self.addHost('h5') h6 = self.addHost('h6') s1 = self.addSwitch('s1') s2 = self.addSwitch('s2') # add links self.addLink(h1, s1, 1, 1) self

How to collect logs such as RTT and Avg RTT on Mininet?

ぃ、小莉子 提交于 2019-12-08 15:33:37
问题 Can anybody please guide me on how we can get logs for RTT and Avg RTT on Mininet while using custom topology code provided in examples. Hoping for your response . 回答1: To measure RTT You may refer to this research paper . The implementation is here for the above paper. Though I could find another paper, but i think this one would not give quite an accurate result. (Clock synchronization problems). Anyways You can have a look for motivation. 来源: https://stackoverflow.com/questions/48242461

2019 SDN上机第6次作业

巧了我就是萌 提交于 2019-12-06 13:55:15
1.实验拓扑 python编写网络拓扑 #!/usr/bin/python #创建网络拓扑 from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController,CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections class MyTopo( Topo ): "Simple topology example." def __init__( self ): "Create custom topo." # Initialize topology Topo.__init__( self ) L1 = 2 s = [] # add core ovs for i in range( L1 ): sw = self.addSwitch( 's{}'.format( i + 1 ) ) s.append( sw ) # link s1 and s2 self.addLink(s[0],s[1]) #add hosts and its links with edge ovs count = 1 for sw1 in s: for i

2019 SDN上机第6次作业

霸气de小男生 提交于 2019-12-06 12:58:40
1.实验拓扑 from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController,CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections class MyTopo( Topo ): "Simple topology example." def __init__( self ): "Create custom topo." Topo.__init__( self ) L1 = 2 s = [] for i in range( L1 ): sw = self.addSwitch( 's{}'.format( i + 1 ) ) s.append( sw ) count = 1 for sw1 in s: for i in range(3): host = self.addHost( 'h{}'.format( count ) ) self.addLink( sw1, host ) count += 1 self.addLink(s[0],s[1]) topos = { 'mytopo': ( lambda: MyTopo(

2019 SDN上机第6次作业

十年热恋 提交于 2019-12-06 12:52:29
1.实验拓扑 构建拓扑代码 from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController,CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections class MyTopo( Topo ): "Simple topology example." def __init__( self ): "Create custom topo." Topo.__init__( self ) switchs = [] for i in range(2): sw = self.addSwitch("s{}".format(i + 1)) switchs.append(sw) self.addLink(switchs[0], switchs[1],4,4) count = 1 for sw in switchs: for i in range(3): h = self.addHost("h{}".format(count)) self.addLink(sw, h,i+1,1) count += 1 topos = { 'mytopo':

2019 SDN上机第6次作业

血红的双手。 提交于 2019-12-06 12:49:58
1.实验拓扑 实验拓扑图如下: 搭建代码如下: 创建py文件,并编写py代码,代码如下: from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController,CPULimitedHost from mininet.link import TCLink from mininet.util import dumpNodeConnections class Mytopo(Topo): def __init__(self): Topo.__init__(self) s=[] for i in range(2): sw = self.addSwitch('s{}'.format(i+1)) s.append(sw) count=1 for sw in s[0:2]: for i in range(3): host = self.addHost('h{}'.format(count)) self.addLink(sw,host) count += 1 self.addLink(s[0],s[1]) topos = {'mytopo': (lambda:Mytopo())} 搭建结果如下 使用net查看拓扑 使用pingall发现都不连通

[2019.12.03]SDN上机第6次作业

好久不见. 提交于 2019-12-06 12:49:04
实验拓扑 通过图形化界面建立拓扑 先清除网络拓扑 sudo mn -c 生成Python语句 #!/usr/bin/python from mininet.net import Mininet from mininet.node import Controller, RemoteController, OVSController from mininet.node import CPULimitedHost, Host, Node from mininet.node import OVSKernelSwitch, UserSwitch from mininet.node import IVSSwitch from mininet.cli import CLI from mininet.log import setLogLevel, info from mininet.link import TCLink, Intf from subprocess import call def myNetwork(): net = Mininet( topo=None, build=False, ipBase='10.0.0.0/8') info( '*** Adding controller\n' ) info( '*** Add switches\n') s1 = net.addSwitch(