i'm new in openflow, i create with mininet a open flow toplogy with 1 controller (POX), one switch, and 3 hosts.
My question is, how can i create one rule in switch to redirect to controller only tcp flow?
*sorry for my poor english
You can use the dpctl command in mininet (ovs-dpctl in host) to configure flows rules and actions for flows matching the flow rules
You could modify the already provided app l2_learning switch to make it fulfill your needs.
To check if one packet has tcp information:
tcp_pkt=packet.find('tcp')
if tcp_pkt is not None:
#do something
There are two ways that you can filter the tcp packets.
Using payload attribute of the packet object which coordinating with pox.lib.packet library.
Using find() method to find the packets that the type is tcp.
And you can find more information in POX wiki: POX Wiki
Hope this helpful!