Ryu, openflow v1.5, OFPET_BAD_ACTION, OFPBAC_BAD_OUT_PORT errors

淺唱寂寞╮ 提交于 2019-12-23 02:58:13

问题


When I run simple_switch_14.py application in mininet environment, the ping of hosts works just fine.

Then I change the following strings of code:

1) "from ryu.ofproto import ofproto_v1_4" to "from ryu.ofproto import ofproto_v1_5"

2) "OFP_VERSIONS = [ofproto_v1_4.OFP_VERSION]" to "OFP_VERSIONS = [ofproto_v1_5.OFP_VERSION]"

3) "out = parser.OFPPacketOut(datapath=datapath, buffer_id=msg.buffer_id, in_port=in_port, actions=actions, data=data)" to "out = parser.OFPPacketOut(datapath=datapath, buffer_id=msg.buffer_id, match=parser.OFPMatch(in_port=in_port), actions=actions, data=data)"

it means that I am trying to run this application in openflow 1.5 version environment.

I get following error:

EVENT ofp_event->SimpleSwitch14 EventOFPPacketIn packet in 1 00:00:00:00:00:01 ff:ff:ff:ff:ff:ff 1 EventOFPErrorMsg received. version=0x6, msg_type=0x1, msg_len=0x44, xid=0x703a0cc -- msg_type: OFPT_ERROR(1) OFPErrorMsg(type=0x2, code=0x4, data=b'\x06\x0d\x00\x38\x07\x03\xa0\xcc\x00\x00\x01\x00\x00\x10\x00\x00\x00\x01\x00\x16\x80\x00\x00\x04\x00\x00\x00\x01\x80\x00\x06\x06\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x10\xff\xff\xff\xfb\xff\xe5\x00\x00\x00\x00\x00\x00') |-- type: OFPET_BAD_ACTION(2) |-- code: OFPBAC_BAD_OUT_PORT(4) -- data: version=0x6, msg_type=0xd, msg_len=0x38, xid=0x703a0cc `-- msg_type: OFPT_PACKET_OUT(13)

so, I am wondering, why it generates 'bad out port' error, what has changed in 'out ports' or in 'actions' between v1.4 and v1.5 of openflow protocols?

Thanks

来源:https://stackoverflow.com/questions/39020210/ryu-openflow-v1-5-ofpet-bad-action-ofpbac-bad-out-port-errors

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!