ODL installation, ODL and mininet connection visual display topology

One, OpenDaylight installation

step1. Install ODL dependency packages

#sudo apt-get update
#sudo apt-get install openjdk-8-jdk

step2. Download the OpenDaylight controller:

opendaylight official website download

自行选择你想要的版本,我选择的是distribution-karaf-0.3.0-Lithium.tar.gz

Insert picture description here
Insert picture description here
Insert picture description here

点进去找到distribution-karaf-0.3.0-Lithium.tar.gz就可以

Note here that the download speed is super slow, you can choose a proxy server and IDM multi-threaded download can be faster, you can choose to download during the night

#tar zxvf distribution-karaf-0.3.0-Lithium.tar.gz

step3. Configure the Java environment

#vim /etc/profile
vim 打开末尾添加记得wq!保存退出
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64

JRE_HOME=$JAVA_HOME/jre

CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib

PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

export JAVA_HOME JRE_HOME CLASS_PATH PATH
#source /etc/profile

step4. Test the Java environment

# java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-8u282-b08-0ubuntu1~16.04-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)

step5. Test whether the installation is successful

#cd distribution-karaf-0.3.0-Lithium
#./bin/karaf

The display is as follows:
Insert picture description here

In addition, I also modified some parameters (can be skipped)

The modification is because the mininet and ODL controller cannot be connected when I use it, so I made the modification

#cd distribution-karaf-0.6.0-Carbon/etc
#vim org.apache.karaf.management.cfg

modify:

rmiRegistryHost=127.0.0.1
 
rmiServerHost = 127.0.0.1 

In addition, there is also the installation of components here

https://blog.csdn.net/MuyuXiaoxiang/article/details/79238959

Two, ODL and mininet connection visual display topology

VM开两个终端,我这里没有用xshell,因为有点慢

STEP1. Terminal 1

cd distribution-karaf-0.3.0-Lithium/
./bin/karaf

Insert picture description here

STEP2. Terminal 2

这里有些人mininet连接不上ODL controller
可以先登录ODL网页,再进行mn命令进行拓扑部署
#cd /mininet/custom
#mn --switch ovsk,protocols=OpenFlow13 --custom examples.py --topo mytopo --controller=remote,ip=127.0.0.1,port=6633

Insert picture description here

STEP3. View the network topology in the VM

VM有FireFox,打开输入网址http://<IP address>:8080/index/html
我这里的IP当然就是127.0.0.1
登录账号和密码都是admin
最后注意有时候只加载了控制器和交换机,
你先在mininet中pingall一下,
再在网页reload加载一下就可以显示整个的一个拓扑结构。

Finally, my network topology is shown as follows:

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_46239293/article/details/114804935