How to do it...
Perform the following steps:
- Start the OpenDaylight distribution using the karaf script. Using this script will give you access to the Karaf CLI:
$ ./bin/karaf
- Install the user-facing feature responsible for pulling in all dependencies needed to connect an OpenFlow switch:
opendaylight-user@root>feature:install odl-openflowplugin-all
It might take a minute or so to complete the installation.
- Connect an OpenFlow switch to OpenDaylight.
As mentioned in the Getting ready section, we will use Mininet-VM as our OpenFlow switch as this VM runs an instance of OpenVSwitch:
- Log in to Mininet-VM using:
- Username: mininet
- Password: mininet
- Let's create a bridge:
mininet@mininet-vm:~$ sudo ovs-vsctl add-br br0
- Now let's connect OpenDaylight as the controller of br0:
mininet@mininet-vm:~$ sudo ovs-vsctl set-controller br0 tcp: ${CONTROLLER_IP}:6633
- Let's look at our topology:
mininet@mininet-vm:~$ sudo ovs-vsctl show
0b8ed0aa-67ac-4405-af13-70249a7e8a96
Bridge "br0"
Controller "tcp: ${CONTROLLER_IP}:6633"
is_connected: true
Port "br0"
Interface "br0"
type: internal
ovs_version: "2.0.2"
${CONTROLLER_IP} is the IP address of the host running OpenDaylight.
We're establishing a TCP connection. For a more secure connection, we could use TLS protocol; however, this will not be included in this book as this is beyond the scope of the book.
- Have a look at the created OpenFlow node.
Once the OpenFlow switch is connected, send the following request to get information regarding the switch:
- Type: GET
- Headers:
Authorization: Basic YWRtaW46YWRtaW4=
- URL: http://localhost:8181/restconf/operational/opendaylight-inventory:nodes/
This will list all the nodes under the opendaylight-inventory subtree of MD-SAL that stores OpenFlow switch information. As we connected our first switch, we should have only one node there. It will contain all the information that the OpenFlow switch has, including its tables, its ports, flow statistics, and so on.
- 計算機網(wǎng)絡(luò)
- Expert C++
- 在最好的年紀(jì)學(xué)Python:小學(xué)生趣味編程
- Vue.js 3.x從入門到精通(視頻教學(xué)版)
- 鋒利的SQL(第2版)
- 網(wǎng)絡(luò)爬蟲原理與實踐:基于C#語言
- 高級語言程序設(shè)計(C語言版):基于計算思維能力培養(yǎng)
- BIM概論及Revit精講
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- 小程序從0到1:微信全棧工程師一本通
- UX Design for Mobile
- 官方 Scratch 3.0 編程趣味卡:讓孩子們愛上編程(全彩)
- 前端架構(gòu)設(shè)計
- Java Web 從入門到項目實踐(超值版)
- Visual Basic 開發(fā)從入門到精通