安裝ofsoftswitch13需要先把mininet中的openvswitch(mininet自帶)卸載掉
在ubuntu14.04下ofsoftswitch13安裝參考 http://tocai.dia.uniroma3.it/compunet-wiki/index.php/Installing_and_setting_up_OpenFlow_tools
sudo mn --topo single,3 --mac --switch user --controller remote -x建立ofsoftswitch13交換機的拓撲網絡 要指定switch爲user
To get the dpid of CPqD switch
sudo dpctl tcp:127.0.0.1:6634 features
To get the stats and flow rule for CPqD switch:
dpctl tcp:127.0.0.1:6634 stats-flow
查看meter表
sudo dpctl unix:/tmp/s1 meter-conf
Q: Does Open vSwitch support OpenFlow meters?
A: Since version 2.0, Open vSwitch has OpenFlow protocol support for
OpenFlow meters. There is no implementation of meters in the Open
vSwitch software switch (neither the kernel-based nor userspace
switches).
還有就是我在運行ryubook qos第三個例子,ofsoftswitch13交換機總是連接不上ryu,後來發現在mininet topo腳本修改爲
輸入:
A: Since version 2.0, Open vSwitch has OpenFlow protocol support for
OpenFlow meters. There is no implementation of meters in the Open
vSwitch software switch (neither the kernel-based nor userspace
switches).
還有就是我在運行ryubook qos第三個例子,ofsoftswitch13交換機總是連接不上ryu,後來發現在mininet topo腳本修改爲
net = Mininet(topo=topo, switch=UserSwitch, controller=RemoteController)注注:最終發現,由於mininet裏的UserSwitch也就是ofsoftswitch(路徑mininet/node.py)默認參數爲--no-slicing
class UserSwitch( Switch ):
"User-space switch."
dpidLen = 12
def __init__( self, name, dpopts='--no-slicing', **kwargs ):
若帶有這個參數交換機做隊列管理時就會報錯輸入:
sudo dpctl unix:/tmp/s1 queue-mod 1 1 10
報錯:RECEIVED (xid=0xF0FF00F0):
error{type="QUEUE_OP_FAILED", code="EPERM", dlen="56"}
但去掉這個參數,控制器就無法發現ofdatapath,目前我還沒有找到解決此問題,若有方法也請告知我一下