sdn - Matching TCP flows based on tcp ports Ryu Controller -
i'm trying redirect tcp flows specific servers using tcp source port ryu sdn controller. topology (simple first step):
host -- ovs1 -- ovs2 -- server
match rule ovs1:
match = parse.ofpmatch(in_port=port,eth_type=0x0800, ipv4_dst=server_ip, tcp_src=tcp_pkt.src_port)
but following error:
eventofperrormsg received. version=0x4, msg_type=0x1, msg_len=0x4c, xid=0x370bf1bf `-- msg_type: ofpt_error(1) ofperrormsg(type=0x4, code=0x9, data=b'\x04\x0e\x00\x70\x37\x0b\xf1\xbf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x28\x80\x00\x00\x04\x00\x00\x00\x01\x80\x00\x0a\x02') |-- type: ofpet_bad_match(4) |-- code: ofpbmc_bad_prereq(9) `-- data: version=0x4, msg_type=0xe, msg_len=0x70, xid=0x370bf1bf `-- msg_type: ofpt_flow_mod(14)
the point is, if remove tcp_src option, works fine, that's why think problem related how i'm passing port.
any ideas?
thanks in advance!
ok, after spend lot of time problem got answer. in order define specific match tcp ports, need satisfy prerequisites, means in case needed add ip_proto field:
match = parse.ofpmatch(in_port=port,eth_type=0x0800, ip_proto=6, ipv4_dst=server_ip, tcp_src=tcp_pkt.src_port)
i found answer here: openflow switch specification
Comments
Post a Comment