自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Floodlight(controller)+OpenFlow交換機(jī):環(huán)境搭建

網(wǎng)絡(luò) 通信技術(shù)
本文主要介紹了有OpenFlow硬件設(shè)備的情況下與controller如何搭建一個(gè)OpenFlow環(huán)境。

 本文主要介紹了有OpenFlow硬件設(shè)備的情況下與controller如何搭建一個(gè)OpenFlow環(huán)境。

我的設(shè)備:controller機(jī)器*1 openflow交換機(jī)*1 PC機(jī)若干

平臺(tái)細(xì)節(jié):

controller機(jī)器:Ubuntu12.04+Floodlight

PC機(jī):系統(tǒng)隨意

一.controllerd在ubuntu系統(tǒng)下安裝Floodlight,并運(yùn)行,作為OpenFlow環(huán)境的控制器

安裝Floodlight

[controller@host ]# sudo apt-get install build-essential default-jdk ant python-dev

[controller@host ]# git clone git://github.com/floodlight/floodlight.git

[controller@host ]# cd floodlight

[controller@host ]# git checkout fl-last-passed-build 或者 git checkout stable

[controller@host ]# ant 整合

[controller@host ]# java -jar target/floodlight.jar 運(yùn)行floodlight

如果執(zhí)行卡住,并報(bào)錯(cuò)為address already use.說(shuō)明端口被占用

解決方法為兩種(選一):

1: [controller@host ]# netstat -anp | grep 8080 查看端口

[controller@host ]# kill -9 關(guān)閉端口

2: 修改配置文件,使其不用被占用的端口

在floodlight目錄下

[controller@host ]# vi src/main/resources/floodlightdefault.properties

把8080改成8085或其它,再整合

[controller@host ]# ant

再運(yùn)行floodlight

注:運(yùn)行后本終端為卡住狀態(tài),并實(shí)時(shí)輸出debug信息.

正常信息為:

.......

12:49:05.079 [main] INFO o.r.Component.InternalRouter.Server - Starting the Simple [HTTP/1.1] server on port 8080

12:49:05.132 [main] DEBUG n.f.core.internal.Controller - OFListeners for FLOW_REMOVED: staticflowentry,

12:49:05.132 [main] DEBUG n.f.core.internal.Controller - OFListeners for PACKET_IN: linkdiscovery,topology,devicemanager,firewall,forwarding,

12:49:05.132 [main] DEBUG n.f.core.internal.Controller - OFListeners for PORT_STATUS: linkdiscovery,

12:49:05.253 [main] INFO n.f.core.internal.Controller - Listening for switch connections on 0.0.0.0/0.0.0.0:6633

12:49:11.388 [debugserver-main] INFO n.f.jython.JythonServer - Starting DebugServer on port 6655

12:49:11.558 [New I/O server worker #1-1] INFO n.f.core.internal.Controller - New switch connection from /10.0.0.1:47324

12:49:11.601 [New I/O server worker #1-1] DEBUG n.f.core.internal.Controller - This controller's role is null, not sending role request msg to null

12:49:11.609 [main] DEBUG n.f.s.StaticFlowEntryPusher - addedSwitch OFSwitchImpl [/10.0.0.1:47324 DPID[00:34:a0:b3:cc:a3:5f:40]]; processing its static entries

12:49:11.785 [New I/O server worker #1-1] DEBUG n.f.d.internal.DeviceManagerImpl - New device created.......

.......

二.配置好openflow交換機(jī)

配置好交換機(jī)的管理地址,可先用串口登,使管理口地址與controller地址在同一個(gè)網(wǎng)絡(luò)中.

在交換機(jī)上配置controller地址:

如:

先用命令新建一個(gè)bridge,并加入其接口.

[switch@shell ]# ovs-vsctl set-controller br0 tcp:192.168.1.1:6633 --->此地址為controller IP地址

三.將若干PC機(jī)與交換機(jī)接口相連,并在controller上查看floodlight的信息,可以發(fā)現(xiàn)有OpenFlow Switch與之相連,并能查看連接上的PC機(jī)與拓?fù)?。進(jìn)入http://localhost:8080/ui/index.html

8080為floodlightdefault.properties文件中所指定的端口號(hào).可以登錄floodligt的web界面.

四.通過(guò)controller控制openflow交換機(jī)

當(dāng)floodlightdefault.properties配置文件中加載了轉(zhuǎn)發(fā)模塊(net.floodlightcontroller.forwarding.Forwarding).則連接在交換機(jī)上的PC機(jī)是可以互相ping通的.floodlight中沒(méi)有加載此模塊時(shí),須要用使添加流表來(lái)控制流向.下面介紹一下從控制器端對(duì)openflow交換機(jī)添加與刪除流表.

添加流表:

[controller@host ]# curl -d '{"switch": "00:00:00:00:00:00:00:01", "name":"flow-mod-1", "cookie":"0", "priority":"2232", "ingress-port":"1","active":"true", "actions":"output=2"}' http://:8080/wm/staticflowentrypusher/json

[controller@host ]# curl -d '{"switch": "00:00:00:00:00:00:00:01", "name":"flow-mod-2", "cookie":"0", "priority":"2232", "ingress-port":"2","active":"true", "actions":"output=1"}' http://:8080/wm/staticflowentrypusher/json

這兩條流表為1號(hào)端口的流向2號(hào)接口,2號(hào)端口的流向1號(hào)接口.

連接在這兩個(gè)接口上的PC機(jī)可以互相通信.

可變參數(shù)解析:

"00:00:00:00:00:00:00:01"為openflow交換機(jī)與controller交互所產(chǎn)生的DPID.

"flow-mod-1"為該流表的名字(索引),后可用此名字(索引)來(lái)刪除該流表.

"ingress-port":后面的參數(shù)為入接口

"actions":后面的參數(shù)為出接口

填入controller的IP

讀取流表:

[controller@host ]# curl http://192.168.1.100:8080/wm/core/switch/1/flow/json

[controller@host ]# curl http://192.168.1.100:8080/wm/staticflowentrypusher/list/all/json

刪除流表:

1.刪除所有流表

[controller@host ]# curl http://192.168.1.208:8080/wm/staticflowentrypusher/clear//json

2.刪除單條流表

[controller@host ]# curl -X DELETE -d '{"name":"flow-mod-1"}' http://:8080/wm/staticflowentrypusher/json

責(zé)任編輯:林琳 來(lái)源: 博客
相關(guān)推薦

2014-07-30 09:48:23

OpenflowSDN

2010-03-17 16:52:57

2013-03-27 10:41:40

Big Switch虛擬交換機(jī)OpenFlow

2015-07-02 09:46:55

OpenFlowOpenStackSDN

2011-05-24 16:20:44

OpenFlow網(wǎng)絡(luò)組成

2012-06-08 15:01:42

OpenFlow軟件定義網(wǎng)絡(luò)

2012-06-18 09:51:44

OpenFlow交換機(jī)

2011-10-27 09:44:55

OpenFlowJuniper

2010-01-14 10:43:18

交換機(jī)配置交換機(jī)種類(lèi)

2010-03-17 12:56:50

局域網(wǎng)交換機(jī)

2012-02-15 09:49:38

OpenFlowOpenFlow交換機(jī)IBM OpenFlo

2014-06-20 14:02:11

交換機(jī)

2013-01-23 13:48:59

NEC虛擬交換機(jī)OpenFlow

2024-01-30 11:49:10

交換機(jī)網(wǎng)絡(luò)設(shè)備網(wǎng)絡(luò)操作系統(tǒng)

2010-01-05 10:14:39

交換機(jī)配置TRUNK

2017-05-23 13:57:42

交換機(jī)方法網(wǎng)絡(luò)

2010-01-04 16:52:51

2010-03-19 10:38:47

傳統(tǒng)交換機(jī)

2015-11-13 15:05:26

華為交換機(jī)

2015-01-04 09:02:53

點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)