当我在mininet环境中运行simple_switch_14.py应用程序时,主机的ping工作正常 .

然后我更改以下代码字符串:

1)“从ryu.ofproto import ofproto_v1_4”到“from ryu.ofproto import ofproto_v1_5”

2)“OFP_VERSIONS = [ofproto_v1_4.OFP_VERSION]”至“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)“

这意味着我正在尝试在openflow 1.5版本环境中运行此应用程序 .

我收到以下错误:

事件ofp_event-> SimpleSwitch14 EventOFPPacketIn包在1 00:00:00:00:00:01 ff:ff:ff:ff:ff:ff 1收到EventOFPErrorMsg . 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)

所以,我想知道,为什么它会产生“错误的输出端口”错误,在“输出端口”或开放流协议的v1.4和v1.5之间的“操作”中发生了什么变化?

谢谢