POX l3_learning example

I am trying to learn from the forwarding.l3_learning example in a POX controller.
In an expiration handler, if the packet timed out in the buffer, it is removed from the controller.
Later, the controller instructs the switch to omit the packet on these lines:

po = of.ofp_packet_out(buffer_id = buffer_id, in_port = in_port)
core.openflow.sendToDPID(dpid, po)

      

I don't see any such specific instruction in the generated post to switch. I don't understand how the switch knows to drop the packet.

+3


source to share


1 answer


This message is PACKET_OUT

without any action. Since there is no action, the switch simply drops the packet. If you want the switch to apply the match again (for example, when a packet came from the network), you need to explicitly set the action to output:OFPP_TABLE

.

This is not explicitly stated in the OpenFlow spec, but all switch implementations work this way (see for example here ).



The reason this send PACKET_OUT

without any action is done at all is because the switches keep the packets stored in their buffer (in the slot specified buffer_id

) until the controller tells the switch what to do with it. Over time, these buffers will fill up if the controller never does anything with the packets, so by explicitly sending them without doing anything, the buffers are freed.

If all buffers are full on the switch, packets (not just packets buffer_id

) are sent inside the message PACKET_IN

to the controller, which degrades performance.

+1


source







All Articles