Just to chime in, if you don't actually need a controller and just want to 
statically configure some flows... you can just use ovs-ofctl to install them 
from the commandline and forget having a controller altogether.  The manual 
page for ovs-ofctl describes the syntax it uses for flows and there are other 
examples on the net, such as:
http://www.nanog.org/meetings/nanog57/presentations/Monday/mon.tutorial.SmallWallace.OpenFlow.24.pdf

More comments inline.

On May 28, 2013, at 12:36 AM, Farhad Ibrahim wrote:

> Muhammad Shahbaz,
> 
> Thanks for your reply. You were indeed right, the port should have TG --- 
> [E1/2 - E2/2] --- [E2/2 - E1/2] --- X 
> See the new file attached. The issue i am having is really quite simple: I 
> don't know how to configure this flow. Im not at all known with coding or 
> scripting and thus.. I have a NOX controller with OE-SS and OVS-OFCTL 
> installed. I dont know if all these "applications" are needed, i just 
> followed a howto concerning a setup of the NOX controller. Im running this on 
> CentOS 6.2. The only thing i want to do, is configure the the flow for the 
> given lab. Some one advised me on using POX. He then supplied me with the 
> following code:
> curl -i -X POST -d 
> ‘{“method”:”set_table”,”params”:{“dpid”:”00-00-00-00-00-01″, 
> “flows”:["match":{"in_port":3,"dl_vlan":20,"dl_dst":"00-00-00-00-AA-AA"},{"actions":[{"type":"OFPAT_SET_VLAN_VID",
>  "vlan_vid":"30"},{"type":"OFPAT_OUTPUT", 
> "port":1},{"type":"OFPAT_SET_VLAN_VID", 
> "vlan_vid":"40"},{"type":"OFPAT_OUTPUT", "port":2}]}]}}’ 
> http://127.0.0.1:8000/OF/ 

This originally came from me, which you may or may not be aware of.

> I don`t, however, understand the code. I am going to setup a POX controller, 
> just for the sake of things. The NOX controller is working. The question 
> however remains how do you configure the flows? I there a website i can visit 
> to learn coding simple openflow "flows"? Or can anyone help out with the code 
> for the lab in the attachment? 
> 
> Also, can anyone help explain the code? I understand some bits of it. To make 
> a long story short:

This is a commandline.  It configures POX with a flow through its webservice 
API.  I gave it as an alternative to just writing a simple POX component using 
its normal Python API.

>  curl -i -X POST This i dont understand but i guess its just needed to 
> configure flows. 

curl is a commandline utility for doing HTTP, used here to access the POX 
webservice component.  New table entries are being sent via HTTP POST.

> {“method”:”set_table”,”params” = This i understand (set FIB with the 
> following parameters). 
> “dpid”:”00-00-00-00-00-01″ = What is this? Mac address? 

DPID is the datapath ID.  Basically an identifier for an OpenFlow switch.  It's 
mentioned in the OpenFlow spec and should be discussed in your switch's manual. 
 It may be configurable, or it may be the switch's MAC (or it may be something 
else).

> flows”:["match":{"in_port":3,"dl_vlan":20," = Match flows coming in on port 3 
> vlan 20
> dl_dst":"00-00-00-00-AA-AA" = What is this? dst mac address?

Yes.  I threw this together based on the following video, which was in the 
original question posed to me.
http://www.youtube.com/watch?v=NscD2qKzDls

The flow discussed in the video specifies this MAC address.

> {"actions":[{"type":"OFPAT_SET_VLAN_VID", "vlan_vid":"30"} = set VLAN ID to 30
> 
> Can any one please provide a source where i can learn this kind of "coding", 
> is it python? 

It's JSON-encoded OpenFlow as used by POX.  Mostly, it's a pretty 
straightforward JSON-izing of OpenFlow.  It's documented a bit in the reference 
for POX's openflow.webservice component.  And you can find out about JSON in 
general from Google or Wikipedia.

> 
> Thanks and regards.
> 
> 
> 
> 
> 
> 
> 
> 
> 2013/5/28 Muhammad Shahbaz <muhammad.shah...@gatech.edu>
> Also the flow installation seems a bit ambiguous:
>             MLX left           MLX right
> TG --- [E1/2 - E2/2] --- [E2/2 - E3/1] --- X 
> 
> Here, instead of ending up back at the traffic generator the traffic is going 
> back to the first switch. Is this setting correct?
> 
> - Shahbaz
> 
> 
> On Tue, May 28, 2013 at 12:32 AM, Muhammad Shahbaz 
> <muhammad.shah...@gatech.edu> wrote:
> Can you elaborate a bit more on the issue you are having? Is it related to 
> flows not being installed correctly or what?
> 
> - Shahbaz
> 
> 
> On Mon, May 27, 2013 at 7:14 AM, Farhad Ibrahim <alant...@gmail.com> wrote:
> Hey Folks, hope you can help me out. 
> 
> I have setup an OpenFlow controller with NOX, OE-SS and OVS-OFCTL. Im running 
> this on CentOS 6.2
> 
> The controller is working, the only thing im trying to do is the following 
> (please see drawing in attachment): Push the two flows seen in the drawing 
> towards the two switches. What im trying to do is have traffic coming from 
> the traffic generator on E1/2 with vlan 20 to be matched and forwarded to 
> E2/2 with vlan 30.
> 
> So: Traffic on MLX left on E1/2 with VLAN 20 go out on E2/2 with vlan 30. 
> 
> Can any one help? 
> Thanks in advance.
> 
> 
> _______________________________________________
> openflow-discuss mailing list
> openflow-discuss@lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
> 
> 
> 
> 
> <simplelab.jpg>_______________________________________________
> openflow-discuss mailing list
> openflow-discuss@lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to