[ovs-discuss] Want to create two flows when a packet is received in POX

Naman Muley naman.g.muley at gmail.com
Tue Jun 25 09:54:17 UTC 2013


You can do that with the same syntax.
The openflow_mod() returns the flow modification message with the default
command set as OFPFC_ADD. Just reverse the match match.nw_src(IPAddr(B))
and match.nw_dst (IPAddr(A))

Make another back_msg=openflow_mod() and do a connection.send(back_msg)

Be careful with the other entries that get wild carded.

There is a proper example in the pox wiki.

On Jun 25, 2013 11:27 AM, "Muhammad Asad" <muhammad.asad at aisec.fraunhofer.de>
wrote:
>
> Hi,
>
> In my network, a packet is sent from Host A to Host B. What I want is
whenever Host A sends a packet to Host B, two flows should be created. One
flow with NW Src A and NW Dest B and second flow with NW Src B and NW Dest
A.
>
> I can install flow with NW Src A and NW Dest B with the following code:
>
> msg = of.ofp_flow_mod()
> msg.match.nw_src = IPAddr("IP_of_Host_A")
> msg.match.nw_dst = IPAddr("IP_of_Host_B")
> msg.actions.append(of.ofp_action_output(port = 4))
> self.connection.send(msg)
>
> But how can I install the second flow with NW Src B and NW Dst A?
Remember, I need to install both flows from packet sent from Host A to Host
B, while Host B never sends a packet to Host A but I still need flow for it.
>
> Thank you.
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> http://openvswitch.org/mailman/listinfo/discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20130625/be2f044c/attachment.html>


More information about the discuss mailing list