Hi,

This is a beginner question, I think.

I want to do this - >
 match: {VLAN none, in-port 1}  -->  action: {change VLAN to 5, fwd port 3}
 // pkts from native link

i.e. for a when a packet with no vlan comes in on port 1, I want to add a
vlan tag of 5 to it and send it out on port 3.

So I am trying to use the ofctl_rest.py app to do this.

The following is the rest API that I am using for it,

1) curl -d '{"dpid": "1", "cookie":"0", "priority":"32768", \
   "actions":[{"port":3, "type":"OUTPUT"}], "match":{"in_port":1}}' \
   http://192.168.1.100:8080/stats/flowentry/add

This adds the rule to send packets coming in on port 1 to be sent out on
port 3.
This goes through fine. Next I try -

2) curl -d '{"dpid": "1", "cookie":"0", "priority":"32768", \
   "actions":[{"ethertype":"5" ,"type":"PUSH_VLAN"}],
"match":{"in_port":1}}' \
   http://192.168.1.100:8080/stats/flowentry/add

This when I add this rule, the switch gives me an error saying

error msg ev version: 0x4 msg_type 0x1 xid 0x624b0232
OFPErrorMsg(code=5,data='\x04\x0e\x00PbK\x022\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x01\x00\x0c\x80\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\x00\x04\x00\x10\x00\x00\x00\x00\x00\x11\x00\x08\x00\x05\x00\x00',type=2)
type 0x2 code 0x5 0x4 0xe 0x0 0x50 0x62 0x4b 0x2 0x32 0x0 0x0 0x0 0x0 0x0
0x0 0x0 0x1 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x80
0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x0 0x0 0x0
0x0 0x0 0x1 0x0 0xc 0x80 0x0 0x0 0x4 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x0 0x0
0x4 0x0 0x10 0x0 0x0 0x0 0x0 0x0 0x11 0x0 0x8 0x0 0x5 0x0 0x0


Out of this, the only thing I could make sense of was type 0x1 (which meant
bad request) and code = 5 (which meant EPERM).

Can you help solve this problem for me? I am not able to make progress.

Thanks,
-Sachin.
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to