1 安装openflow记录
不要用sudo,改变一下文件夹的所有者权限,利用
chmod -R 775 文件夹名称
官方文档:https://www.nsnam.org/docs/release/3.29/models/html/openflow-switch.html
1.1 具体步骤参考链接:
https://www.xuebuyuan.com/2562584.html
1.2 自己安装过程遇到的问题记录
1.2.1 下面步骤的显示:
(1)链接OpenFlow模块到ns3(在ns3的源码文件夹下运行,如ns-3.12.1)
./waf configure --enable-examples --enable-tests –with-openflow=下载的openflow源码路径
问题:
解决办法:
(1)这个是=后面的路径,“openflow”,写法,参考链接
https://blog.youkuaiyun.com/wfh1992/article/details/109508133
./waf configure --enable-examples --enable-tests --with-openflow="openflow"
(2)libopenflow.a要放到指定的地方,下面是参考
https://blog.youkuaiyun.com/weixin_40286308/article/details/107212443?utm_medium=distribute.pc_relevant_t0.none-task-blog-OPENSEARCH-1.control&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-OPENSEARCH-1.control
- 可能是libopenflow.a没有出现在对的位置。在openflow文件夹查询此文件,复制,在openflow/lib和openflow/build/lib各复制一个。
(3)这个是其他两个模块(brite,click)没装,参考链接
https://www.cnblogs.com/zywnnblog/p/13100179.html
- 安装brite的官方文档
https://www.nsnam.org/docs/release/3.28/models/html/brite.html
注意路径的大小写:
BRITE Integration not enabled 的问题
./waf configure --with-brite=/home/larry/ns-3-allinone/ns-3.28/BRITE --enable-examples
1.3 要配置openflow和brite, 需要使用下面的代码,让他们都处于enabled状态,不然在编译ns-3时,就会只有一个装好了,另外一个没有装。
./waf configure --enable-examples --enable-tests --with-openflow="openflow" --with-brite=/home/larry/ns-3-allinone/ns-3.28/BRITE
之后出现的结果图:
编译时,因为openflow的build是有权限的,最后进入root下编译
root@larry-VirtualBox:/home/larry/ns-3-allinone/ns-3.28# ./waf build
结果图:
以此类推,click的安装也一样。
./waf configure --enable-examples --enable-tests --with-openflow="openflow" --with-brite=/home/larry/repos/ns-3-allinone/ns-3.28/BRITE --with-nsclick=/home/larry/repos/ns-3-allinone/ns-3.28/click --enable-mpi --enable-sudo