Openflow: Redirect TCP Flow only for Controller

1.2k views Asked by At

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

3

There are 3 answers

0
Lafa On

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

0
waynner On

There are two ways that you can filter the tcp packets.

  1. Using payload attribute of the packet object which coordinating with pox.lib.packet library.

  2. 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!

0
krish7919 On

You can use the dpctl command in mininet (ovs-dpctl in host) to configure flows rules and actions for flows matching the flow rules