zoukankan      html  css  js  c++  java
  • ndn挖坑记(一)

    NDN是什么(简单记录)

    NDN是命名数据网络的缩写,简单来是说以数据命名取代IP 的主体地位,数据名称取代了IP 作为网络中的唯一标识在网络层的数据请求、路由、转发以上层应用直接关心的数据名称作为第一语义,而不用关心数据所在位置。

    更多详情:NDN

    ndnSIM的安装

    关于NDN的仿真必须在ndnSIM上面跑,所以安装这个是必不可少的。

    环境:ubuntu 18.04 LTS + ndnSIM2.7
    

    ndnSIM是有自己的官网教程的,遇到问题应该优先查找文档寻找解决。
    ndnSIM安装教程

    编译运行的错误记录

    Traceback (most recent call last):
    File "<string>", line 3, in <module>
    File "/usr/lib/python2.7/py_compile.py", line 117, in compile
       raise py_exc
    py_compile.PyCompileError:   File
    "/usr/local/lib/python2.7/dist-packages/visualizer/base.py", line 139
       print("Plugin %r has no 'register' function" % name,file=sys.stderr)
    SyntaxError: invalid syntax
    

    python语法错误,估计是版本不兼容问题,所以去掉上面文件中第139行的的file=即可

    首先把/ndnSIM/ns-3/src/visualizer/visualizer/hub.py"文件中修改开头部分的"from . import core"为“import core",然后运行下面的命令行。

    No visualization support,对于可视化模块启动失败,在官网教程中也有提及 https://ndnsim.net/current/best-practices.html

    在 How to run the simulation scenarios (with visualizer) 中提到 To run a scenario with the visualizer, you will have to setup some python environment variables to find the visualizer module. The easiest way to do so is by using the following commands:

    cd ns-dev/ns-3   //即ns-3所在的文件夹
    ./waf shell
    

    就是进入即ns-3所在的文件夹,然会运行./waf shell之后在启动可视化模块就可以了。

  • 相关阅读:
    shell getopt getopts获取参数
    apache+svn+ladp认证
    SVN 迁移项目分支
    iptables 优先级
    很实用的一篇HTTP状态码
    套路还在——矩阵计算估值
    CU上看到的一个简单的算法帖子
    linux下服务端实现公网数据转发
    c++接口实现与分离(转载)
    c++继承概念
  • 原文地址:https://www.cnblogs.com/FlyerBird/p/11853770.html
Copyright © 2011-2022 走看看