无题3

1(现在已经将ndn-cxx安装好了。)

2、下载mini-ndn0.1.1版本


第一部分InstallNDN

3、安装mini-ndn的依赖NFD


首先安装add-apt-repository
sudo
apt-get install software-properties-common
其次add
NDN PPA库:
sudo
add-apt-repository ppa:named-data/ppa
sudo
apt-get update


一旦添加好了NDNPPA库之后,NFD就可以被非常简单的安装了,使用下面命令:

sudo
apt-get install nfd



4、安装NFD的依赖库ndn-cxx,这个参考我的另一篇关于ndn-cxx的文章。


下载gitclone https://github.com/named-data/ndn-cxx

然后转到ndn-cxx所在目录

输入以下:

sudo
apt-get install build-essential pkg-config libboost-all-dev
libsqlite3-dev libssl-dev libpcap-dev
sudo
apt-get install doxygen graphviz python-sphinx

然后再输入以下三条指令进行Build构建:

./waf
configure
./waf
sudo
./waf install

注意,在构建这块可能会出现,第一个指令可以执行,但是第二个和第三个指令就会执行出错,解决办法参考我的另一篇文章。







5、安装NLSR

安装NLSR有两个前提,第一个是安装NFD,这个我们已经在第5步中已经做了。


第二个前提是,ChronoSync库,然后给了一个链接https://github.com/named-data/ChronoSync#build

,我们将这个下载下来。


gitclone https://github.com/named-data/ChronoSync


下载下来之后进行安装。


ChronoSync库是以ndn-cxx为前提的,这个我们在之前已经将ndn-cxx安装好了。


注意此时将当前目录调整到ChronoSync库所在目录下

接下里依次输入下面的指令进行Build构建:

./waf
configu
./waf
sudo
./waf install
到此为止ChronoSync库也装好了


接下来,我们将NLSR下载下来:

gitclone https://github.com/named-data/NLSR


转到NLSR所在的目录下:

还是输入下面三条指令,进行Build构建:


./wafconfigure

./waf

sudo
./waf install
到此,NLSR就安装完成了,开心。
6、安装ndn-tools
下载ndn-tools
git
clone https://github.com/named-data/ndn-tools
接下来进行ndn-tools的安装。
Ndn-tools也需要ndn-cxx做前提,但是ndn-cxx我们已经安装了。
输入下面指令:
 sudo
apt-get install libpcap-dev
接下来还是输入下面三条指令进行Build构建:
./waf
configure
./waf
sudo
./waf install

这样看下来,有没有发现ndn-cxx库的安装是一个非常关键的事情。搞定了./waf这三条相似的指令,下面的很多工作都顺利了好多。


到此为止ndn-tools也安装完了。


第二部分InstallingMininet


7、注意mininet的版本是2.2.1,不要下载错了

下载下来之后,转入到mininet的目录下,进行mininet的安装。


https://github.com/mininet/mininet/blob/2.2.1/INSTALL我们采用第三种方法



下载mininet的目录,

转到mininet目录下


使用以下指令:

./util/install.sh-nv



安装mininet出现了一个问题:暂时不知道这个算不算是问题

【警告】:下列软件包不能通过验证!

libsigsegv2m4 autoconf autotools-dev automake libltdl-dev libtool

E:碰到了一些问题,您使用了 -y选项,但是没有用 --force-yes


软件包不能通过验证,是因为系统源的问题。解决办法就是还源,


ubuntu安装git提示软件包不能通过验证,这是系统的安装源出了问题。http://mirrors.ustc.edu.cn里面有ubuntu帮助,帮助里有换源的方法。

具体链接地址:http://mirrors.ustc.edu.cn/help/ubuntu.html



经过换源的这一步骤的倒腾,

之后再输入一次指令:

./util/install.sh-nv



终于,Mininet好了.

最后,在mininet目录下直接使用

sudomn –test pingall进行验证是否弄好了。





8cdmini-ndn0.1.1版本目录中

因为在前面的步骤中已经安装了mini-ndn的所有依赖,所以这块我们只需要输入下面的指令:


sudo
./install.sh -i



安装完了之后进行验证,




Verification

Youcan use these steps to verify your installation:

  1. Issuethe command: sudo minindn --experiment=pingall--nPings=50

  2. Whenthe mini-ndn> CLI prompt appears,the experiment has finished. On the Mini-NDN CLI, issue the commandexit to exit the experiment.

  3. Issuethe command: grep -c content/tmp/minindn/*/ping-data/*.txt. Each file should report acount of 50.

  4. Eachfile should report a count of 0.

现在出现了一个问题,就是NLIssuethe command: grep -c timeout/tmp/minindn/*/ping-data/*.txt.SR has not converged.Exiting... ,这个问题明天来解决。

今天已经看不下去了。



第二天++++++++++++++++++++++




试着在mini-ndn目录下运行sudominindn,出现了下面的报错信息:


cp:无法获取"/usr/local/etc/ndn/nfd.conf.sample"的文件状态(stat):没有那个文件或目录

sed:无法读取 /usr/local/etc/mini-ndn//nfd.conf:没有那个文件或目录

NLSRhas not convergence错误信息。



查了一下,/usr/local/etc/ndn/nfd.conf.sample是安装NFD时的配置文件,而NFD被安装在/usr/local/bin


,所以的话,找不到/usr/local/etc/ndn/nfd.conf.sample文件可能是NFD没有装好,那么现在重新装一下


好像是应该先安装ndn-cxx,再安装NFD


/usr/local/bin中没有找见nfd,而却看见了有nlsr。那就极有可能是NFD没有装好。



现在重新安装一下NFD,因为之前ndn-cxx已经安装好了,所以现在就非常简单,


gitclone --recurse-submodules https://github.com/named-data/NFD

cdNFD

./wafconfigure

./waf

sudo./waf install


这些步骤弄完了,检查一下,有没有。


进入/usr/local/bin目录中,查找nfd,我们发现这次有了nfd这个选项了。

然后在进入/usr/local/etc/ndn中,我们发现现在已经多了一个nfd.conf.sample的文件,


我们使用下面这条指令:

sudocp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf


我们可以看到这条指令中出现的两条文件名,都是和之前上面的报错信息有关的文件名。




可以说这一步就解决了。


接下来,我们再进入minindn中进行verfication验证。


mini-ndn目录下运行sudominindn


这次就没有出现报错信息。


报出的信息如下:

Parseof /usr/local/etc/mini-ndn/default-topology.conf done.

***Creating network

***Adding controller

***Adding hosts:

ab c d

***Adding switches:

***Adding links:

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(a,b) (10ms delay) *** Error: RTNETLINK answers: No such file ordirectory

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(a,c) (10ms delay) *** Error: RTNETLINK answers: No such file ordirectory

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(b,d)

***Configuring hosts

ab c d

Setuptime: 8

***Starting controller

c0

***Starting 0 switches

***Starting CLI:

mininet>



这次我们发现,之前的三个报错信息已经消失掉了,

cp:无法获取"/usr/local/etc/ndn/nfd.conf.sample"的文件状态(stat):没有那个文件或目录

sed:无法读取 /usr/local/etc/mini-ndn//nfd.conf:没有那个文件或目录

NLSRhas not convergence错误信息。


但是这次,又发现了新的错误提示:Error:RTNETLINK answers: No such file or directory


当我尝试在bishe目录下,输入sudominindn --experiment=pingall –nPings=50指令,

报出了以下信息:

Noresults folder specified; experiment results will remain in theworking directory

Parseof /usr/local/etc/mini-ndn/default-topology.conf done.

***Creating network

***Adding controller

***Adding hosts:

ab c d

***Adding switches:

***Adding links:

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(a,b) (10ms delay) *** Error: RTNETLINK answers: No such file ordirectory

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(a,c) (10ms delay) *** Error: RTNETLINK answers: No such file ordirectory

(10msdelay) *** Error: RTNETLINK answers: No such file or directory

(b,d)

***Configuring hosts

ab c d

Setuptime: 8

***Starting controller

c0

***Starting 0 switches

Loadingexperiment: pingall

Using1.000000 traffic

Waiting60 seconds for convergence...

...done

NLSRhas not converged. Exiting...



我们发现又出现了NLSRhas not convergence错误信息,

还有Error:RTNETLINK answers: No such file or directory信息。


当我输入nfd-status时,出现了一个错误,显示的是errowhile connecting to the forwarder(connectionrefused)ucla大学的回答者说,安装ndn-cxxNFD时要么从sourcecode安装,要么从packet安装,不能两个都安装,否则可能会冲突。



恩,我检查了一下,我发现我的第3步先是从PPA处安装NFD,然后之后,又安装了一次NFD,从源码处。

那么接下来就需要重新创建一个账号了,来再进行安装一次。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值