Hi,

The match field is in your Packet-In, but it has only "in_port" field.
    Match
        Type: OFPMT_OXM (1)
        Length: 12
        OXM field
            Class: OFPXMC_OPENFLOW_BASIC (0x8000)
            0000 000. = Field: OFPXMT_OFB_IN_PORT (0)
            .... ...0 = Has mask: False
            Length: 4
            Value: 10
        Pad: 00000000
    Pad: 0000

It corresponds to the output of Ryu.

switch=1 buffer_id=ffffffff total_len=60 reason=ACTION table_id=0 cookie=0
*match=OFPMatch(oxm_fields={'in_port': 10})*
pkt=ethernet(dst='00:00:de:ad:be:ef',ethertype=2048,src='00:00:de:ad:be:ef'), ipv4(csum=46560,dst='2.2.2.2',flags=0,header_length=5,identification=0,offset=0,option=None,proto=0,src='1.1.1.1',tos=4,total_length=20,ttl=255,version=4)

Ryu does only parsing packets, so your situation should be due to your switch, I guess.

Thanks,
Fujimoto

On 2018年03月13日 20:13, Frode via Ryu-devel wrote:
 The switch is hosted in Mininet, the controller is hosted locally and they talk to each other via virtualbox. Dump shows the controller receives a match object with the packet_in. Any tips as to where I can look next?


No.     Time           Source Destination           Protocol Length Info
     91 19.337956000   192.168.56.1 192.168.56.103        OpenFlow 166    Type: OFPT_PACKET_OUT

Frame 91: 166 bytes on wire (1328 bits), 166 bytes captured (1328 bits) on interface 0 Ethernet II, Src: 0a:00:27:00:00:00 (0a:00:27:00:00:00), Dst: CadmusCo_2a:0b:8b (08:00:27:2a:0b:8b) Internet Protocol Version 4, Src: 192.168.56.1 (192.168.56.1), Dst: 192.168.56.103 (192.168.56.103) Transmission Control Protocol, Src Port: 6653 (6653), Dst Port: 54270 (54270), Seq: 665, Ack: 1341, Len: 100
OpenFlow 1.3
    Version: 1.3 (0x04)
    Type: OFPT_PACKET_OUT (13)
    Length: 100
    Transaction ID: 582839350
    Buffer ID: OFP_NO_BUFFER (0xffffffff)
    In port: 10
    Actions length: 16
    Pad: 000000000000
    Action
        Type: OFPAT_OUTPUT (0)
        Length: 16
        Port: OFPP_TABLE (0xfffffff9)
        Max length: 0
        Pad: 000000000000
    Data
        Ethernet II, Src: Unigraph_ad:be:ef (00:00:de:ad:be:ef), Dst: Unigraph_ad:be:ef (00:00:de:ad:be:ef)         Internet Protocol Version 4, Src: 1.1.1.1 (1.1.1.1), Dst: 2.2.2.2 (2.2.2.2)




No.     Time           Source Destination           Protocol Length Info
     92 19.338147000   192.168.56.103 192.168.56.1          OpenFlow 168    Type: OFPT_PACKET_IN

Frame 92: 168 bytes on wire (1344 bits), 168 bytes captured (1344 bits) on interface 0 Ethernet II, Src: CadmusCo_2a:0b:8b (08:00:27:2a:0b:8b), Dst: 0a:00:27:00:00:00 (0a:00:27:00:00:00) Internet Protocol Version 4, Src: 192.168.56.103 (192.168.56.103), Dst: 192.168.56.1 (192.168.56.1) Transmission Control Protocol, Src Port: 54270 (54270), Dst Port: 6653 (6653), Seq: 1341, Ack: 765, Len: 102
OpenFlow 1.3
    Version: 1.3 (0x04)
    Type: OFPT_PACKET_IN (10)
    Length: 102
    Transaction ID: 0
    Buffer ID: OFP_NO_BUFFER (0xffffffff)
    Total length: 60
    Reason: OFPR_ACTION (1)
    Table ID: 0
    Cookie: 0x0000000000000000
    Match
        Type: OFPMT_OXM (1)
        Length: 12
        OXM field
            Class: OFPXMC_OPENFLOW_BASIC (0x8000)
            0000 000. = Field: OFPXMT_OFB_IN_PORT (0)
            .... ...0 = Has mask: False
            Length: 4
            Value: 10
        Pad: 00000000
    Pad: 0000
    Data
        Ethernet II, Src: Unigraph_ad:be:ef (00:00:de:ad:be:ef), Dst: Unigraph_ad:be:ef (00:00:de:ad:be:ef)         Internet Protocol Version 4, Src: 1.1.1.1 (1.1.1.1), Dst: 2.2.2.2 (2.2.2.2)


Kind regards,
Frode


‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On 13 March 2018 2:50 AM, Fujimoto Satoshi <satoshi.fujimo...@gmail.com> wrote:

Hi, Frode

It is probably due to the implementation of your switch.

Could you use network analyzer, like Wireshark?
If you cannot see any match field in the PacketIn,
Your situation is due to your switch.

Please ask the help team of your switch.

Thanks,
Fujimoto


On 2018年03月13日 06:42, Frode via Ryu-devel wrote:
Hello,

I am currently testing out Ryu and cant seem to get the hang of the flow table matching. I am doing a rather basic example with one switch and one rule. I am sending out the packet with OFPP_TABLE action from the controller. Why am I seing a packet in reason of action, but when parsing the incoming packet and looking at the OFPMatch object it states "(oxm_fields={'in_port': 10})" and not the match object from the flow table entry (see below)? Any help is highly appreciated.

PACKET OUT:
version=None,msg_type=None,msg_len=None,xid=None,OFPPacketOut(actions=[OFPActionOutput(len=16,max_len=0,port=4294967289,type=0)],actions_len=0,buffer_id=4294967295,data=ethernet(dst='00:00:de:ad:be:ef',ethertype=2048,src='00:00:de:ad:be:ef'), ipv4(csum=46560,dst='2.2.2.2',flags=0,header_length=5,identification=0,offset=0,option=None,proto=0,src='1.1.1.1',tos=4,total_length=20,ttl=255,version=4),in_port=10)

FLOW TABLE:
  {'1': [{'priority': 100, 'cookie': 0, 'idle_timeout': 0, 'hard_timeout': 0, 'byte_count': 540, 'duration_sec': 1036, 'duration_nsec': 560000000, 'packet_count': 9, 'length': 88, 'flags': 0, 'actions': ['OUTPUT:CONTROLLER'], 'match': {'dl_src': '00:00:de:ad:be:ef'}, 'table_id': 0}]}

OFPPacketIn received:
switch=1 buffer_id=ffffffff total_len=60 reason=ACTION table_id=0 cookie=0
match=OFPMatch(oxm_fields={'in_port': 10})
pkt=ethernet(dst='00:00:de:ad:be:ef',ethertype=2048,src='00:00:de:ad:be:ef'), ipv4(csum=46560,dst='2.2.2.2',flags=0,header_length=5,identification=0,offset=0,option=None,proto=0,src='1.1.1.1',tos=4,total_length=20,ttl=255,version=4)

Kind regards,
Frode




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot


_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to