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之後在啓動可視化模塊就可以了。