简体   繁体   中英

Why do my OpenFlow matches not match the first packet?

I am using Ryu simple_switch_13.py (slightly modified) and Mininet to emulate a software-defined network.

If I ping for example:

h1 ping h2

The flow match is created however the first packets are not registered in the packet count of the flow.

Is this normal in Openflow? Does the switch/controller first have to receive packets that don't match anything, create a match, then any further packets will match?

The normal behavior of OpenFlow is to receive the first packet of a flow and then send it to the controller using the default flow entry that mostly seems like the following (depending on the controller type):

cookie=0x0, duration=10.97s, table=0, n_packets=0, n_bytes=0, priority=0, action=CONTROLLER:65535

When the first packet comes, it will be sent to the controller by the switch and then, the controller decides about the flow entry and sends it to the switch by OpenFlow message ( flowAdd ). This first packet will not match with the created flow rule.

That was a simple example that I hope was useful to you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM