NS-3下的OpenFlow仿真(二)——OFswitch13登场



  • OFswitch13,一款专用于解决NS-3的垃圾openflow支持的武器。我们可以直接进入这个支持项目的主页看一看:点击进入
    闲话不多说,下面我们开始安装这一款武器
    启动之前,请确保系统上安装了以下软件包:

    sudoaptgetinstallbuildessentialgccg++pythongitmercurialunzipcmake sudo apt-get install build-essential gcc g++ python git mercurial unzip cmake
     sudo apt-get install libpcap-dev libxerces-c-dev libpcre3-dev flex bison
    $ sudo apt-get install pkg-config autoconf libtool libboost-dev
    

    ofSoftSwitch13依赖于netbee库(https://github.com/netgroup-polito/netbee),用于解析网络数据包(有一项正在进行的工作来消除这种依赖性)。所以我们需要手动编译安装此库。首先,克隆netbee存储库并编译库:

    $ git clone https://github.com/netgroup-polito/netbee.git
    cdnetbee/src/ cd netbee/src/
     cmake .
    $ make
    

    然后,安装共享库,配置动态链接器运行时绑定,并复制包含文件:

    $ sudo cp ../bin/libn*.so /usr/local/lib
    sudoldconfig sudo ldconfig
     sudo cp -R ../include/* /usr/include/
    $ cd -
    

    于是我们的准备工作就完成了
    将最近稳定的NS-3代码下载到您的计算机中(我们使用的是用于NS-3.29的Mercurial存储库):
    $ hg clone http://code.nsnam.org/ns-3.29
    将ofswitch13代码下载到src/文件夹中(从ns-3.28开始,您还可以下载代码到新的contrib/文件夹中)。此过程将递归地将ofSoftSwitch13代码下载到ofswitch13/lib/ofsoftswitch13/目录。

    cdns3.29/src cd ns-3.29/src
     git clone --recurse-submodules https://github.com/ljerezchaves/ofswitch13.git
    cdofswitch13 cd ofswitch13
     git checkout 3.3.0 && git submodule update --recursive
    cdlib/ofsoftswitch13 cd lib/ofsoftswitch13
     ./boot.sh
    ./configureenablens3lib ./configure --enable-ns3-lib
     make
    cd../../../../ cd ../../../../
     patch -p1 < src/ofswitch13/utils/ofswitch13-src-3_29.patch
    $ patch -p1 < src/ofswitch13/utils/ofswitch13-doc-3_29.patch
    $ ./waf configure
    $ ./waf
    

    好了我们的OFswitch13安装完成了,下一节我们将介绍of13的基本实现原理和使用例程



  • 在ns-3原始的Openflow下,困了好久。。。。直到OFswitch13登场


 

Copyright © 2018 bbs.dian.org.cn All rights reserved.

与 Dian 的连接断开,我们正在尝试重连,请耐心等待