SDN控制器之旅(一) NOX環境搭建

2021-07-03 11:27:15 字數 3445 閱讀 7853

看了師兄的部落格想試驗一下,於是想自己搭建乙個nox出來,做一做部落格裡面的實驗,結果···確實很繁瑣

虛擬機器環境 ubantu 12.04

先從github上下了乙個nox,參照裡面有個install說明安裝(因為當時沒找到wiki位址),有如下指令:

./boot.sh

mkdir build/

cd build/

../configure

make -j

後來才知道wiki位址是: (現在說後悔也沒用,心雖然很痛)然後按照如上五條挨著做,但是道路曲折

第一次 ./boot.sh

問題:缺少maketools(我是裝的ubantu 12.04裸機,估計什麼工具都沒有,讀者可能並沒有這個問題,可忽略)

解決:sudo apt-get install autoconf

第二次 ./boot.sh

問題:can』t exec 「libtoolize」: 沒有那個檔案或目錄 at /usr/bin/autoreconf line 196.

libtool library used but `libtool』 is undefined

解決:可能沒有裝aclocal

檢視aclocal的路徑 aclocal –print-ac-dir

在/usr/share/aclocal中未找到libtool.m4 ,網上給出的都是「將相應的*.m4」檔案放進去這類模糊的說法

find .-name libtool.m4

並沒找到

sudo apt-get install libtool

再次查詢有了 libtool.m4

第三次 ./boot.sh

you should add the contents ofm4/libtool.m4' toaclocal.m4』

類似的資訊,但是沒有提示錯誤,應該是安裝好了

接著執行三條:

mkdir build/

cd build/

(這兩條是不會有問題的- -)

../configure

問題:configure: error: no support for c++0x

解決:初步判斷是沒有g++,安裝一下試試(真是裸機)

sudo apt-get install g++

成功是成功了,然後又有了新的問題–

問題:configure: error: cannot find the openssl library

checking for openssl/ssl.h in /usr/local/ssl… no

checking for openssl/ssl.h in /usr/lib/ssl… no

checking for openssl/ssl.h in /usr/ssl… no

checking for openssl/ssl.h in /usr/pkg… no

checking for openssl/ssl.h in /usr/local… no

checking for openssl/ssl.h in /usr… no

相似的遭遇–:

問題:

ecking for tbb/tbb.h in /usr… no

checking for tbb/tbb.h in /usr/local… no

checking for tbb/tbb.h in /opt… no

checking for tbb/tbb.h in /opt/local… no

解決:

link1:

link2:

按照上面的教程 執行到make時,先提示

問題:g++ -o2 -dndebug -o square square.cpp gen_input.cpp -ltbb -lrt

square.cpp:25:26: 致命錯誤: tbb/pipeline.h:沒有那個檔案或目錄

解決:將上層資料夾中的tbb資料夾考到square資料夾中,解決,繼續

問題:g++ -o2 -dndebug -o square square.cpp gen_input.cpp -ltbb -lrt

/usr/bin/ld: cannot find -ltbb

解決:sudo apt-get install libtbb-dev

g++ -o2 -dndebug -o square square.cpp gen_input.cpp -ltbb -lrt

./square 0 input.txt output.txt

serial run time = 1.34199

parallel run time = 1.14308

elapsed time : 3.37606 seconds

得到link2中的結果

make -j

問題:

../../src/include/vlog.hh:32:33: fatal error: boost/noncopyable.hpp: no such file or directory

../../src/include/network_oarchive.hh:5:36: fatal error: boost/asio/streambuf.hpp: no such file or directory

../../src/include/network_iarchive.hh:5:36: fatal error: boost/asio/streambuf.hpp: no such file or directory

../../src/include/vlog.hh:32:33: fatal error: boost/noncopyable.hpp: no such file or directory

fault.cc:30:28: fatal error: boost/format.hpp: no such file or directory

compilation terminated.

connection.cc:23:30: fatal error: boost/asio/ssl.hpp: no such file or directory

compilation terminated.

解決:

缺少boost庫

安裝步驟:

安裝會花費較長時間,安裝完成後回到make

第二次make -j

沒什麼問題,但是由於筆者筆記本跑虛擬機器,跑了不知多久,等有結果再來更新,至此筆者已經算配好了環境,如果make -j無響應,接下來的實驗將考慮重新裝乙個整合好環境的來做。

總結:關於sdn控制器,搭環境這一塊確實很繁瑣,乙個nox,如果像筆者這般對linux不熟的話,搭個環境就把自己的好幾天給搭進去了,當然跟電腦的效能也有關係,本來配置不好的筆記本再開虛擬機器,筆者也是很拼的- -

SDN架構中 控制器實現之一 POX控制器的研究

pox的自帶的元件來分析 開始構建自己的 pox 模組的常用方法是將現有模組 例如 forwarding l2 learning.py 複製到 ext 目錄 例如 ext my component.py 下發流表操作 按照元件的功能進行分類 控制器和交換機根據openflow協議進行通訊前,使用of...

SDN控制器 Ryu簡單使用

下面兩篇是關於mininet基本使用指南,剛剛接觸sdn的人要詳細閱讀 openflow官方指南 mininet指南 下面是ryu的簡單使用指南 ryu wiki ryu tutorials 我的ryu版本是3.24,應該與之前的版本使用略有差別。我的問題如下如所示 topology裡顯示 disc...

談談SDN控制器的「亂」

身在通訊領域,言不稱sdn,就有被打上 落伍 標籤的風險,從運營商到裝置商,再到科研機構,無人不在表達著自己的主張,足見sdn在如今有多火熱。然而這種火熱,讓sdn變得眾說紛紜而不可捉摸,給業內人士的第一直觀感受就是 亂 的確,作為一種堪稱在通訊史具有劃時代意義的變革,sdn在千呼萬喚中被業內人士寄...