mininet 网络模拟器

mininet简介

mininet,Python的第三方库,在一台机器上模拟一个由主机、链路和交换机组成的完整网络,可用于交互式开发、测试和演示,尤其是那些使用OpenFlow和SDN的网络。在Mininet中原型化的基于OpenFlow的网络控制器通常可以转移到硬件上,只需进行最小的更改即可实现全线速率执行。

mininet应用实例

#创建自定义网络
from mininet.net import Mininet
from mininet.topolib import TreeTopo
tree4 = TreeTopo(depth=2,fanout=2)
net = Mininet(topo=tree4)
net.start()
h1, h4  = net.hosts[0], net.hosts[3]
print h1.cmd('ping -c1 %s' % h4.IP())
net.stop()

mininet Github统计数据

BSD-3-Clause license

Github 5k stars

mininet安装命令

pip install mininet(来源pypi)

免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。


行业导航 / Python指南 :
























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.