Hi
On 2014年10月07日 05:07, Hui-Lan Lee wrote:
> Hi,
> I design 2 scenarios in mininet,
> (1) host1 connect to port1 with tag vlan5, host2 connect to port2 with tag
> vlan 6 . Then host1 ping host2 .
> (2) host1 connect to port 1 with no-vlan, host2 connect to port2 with tag
> vlan 6. Then host1 ping host2 .
>
> I am running RYU :
> #./bin/ryu-manager --verbose --observe-links ryu.topology.switches
> ryu.app.rest_topology ryu.app.ofctl_re
> st ryu.app.simple_switch
> ~/ryu/ryu/gui$ ./controller.py
>
> in these two scenarios, I add static flow entry but they don't work, Either
> in case(1) or in case(2), host1 and host2 all cann't ping each other. Could
> you help me checkout what's wrong with my static flow entry?
> (1)
> curl -X POST -d '{"dpid": "0000000000000001",
> "priority":"32768","actions":[{"type":"OUTPUT","port":"1"},
> {"type":"SET_VLAN_VID","vlan_vid":"5"}], "match":{"in_port":"2",
> "dl_vlan":"6"}}' http://127.0.0.1:8080/stats/flowentry/add
>
> curl -X POST -d '{"dpid": "0000000000000001",
> "priority":"32768","actions":[{"type":"OUTPUT","port":"2"},
> {"type":"SET_VLAN_VID","vlan_vid":"6"}], "match":{"in_port":"1",
> "dl_vlan":"5"}}' http://127.0.0.1:8080/stats/flowentry/add
>
> (2)
> curl -X POST -d '{"dpid": "0000000000000001",
> "priority":"32500","actions":[{"type":"OUTPUT","port":"2"},
> {"type":"SET_VLAN_VID","vlan_vid":"6"}], "match":{"in_port":"1"}}'
> http://127.0.0.1:8080/stats/flowentry/add
>
> curl -X POST -d '{"dpid": "0000000000000001",
> "priority":"32768","actions":[{"type":"OUTPUT","port":"1"},
> {"type":"STRIP_VLAN","ethertype":33024}], "match":{"in_port":"2",
> "dl_vlan":"6"}}' http://127.0.0.1:8080/stats/flowentry/add
I think the specified order of "actions" is wrong in your flow entries.
In Open Flow Spec 1.0, action list for inserted flow entries MUST be processed
in the order specified.
So, How about commands as follows?
(1)
curl -X POST -d '{"dpid": "0000000000000001",
"priority":"32768","actions":[{"type":"SET_VLAN_VID","vlan_vid":"5"},
{"type":"OUTPUT","port":"1"}], "match":{"in_port":"2", "dl_vlan":"6"}}'
http://127.0.0.1:8080/stats/flowentry/add
curl -X POST -d '{"dpid": "0000000000000001",
"priority":"32768","actions":[{"type":"SET_VLAN_VID","vlan_vid":"6"},
{"type":"OUTPUT","port":"2"}], "match":{"in_port":"1", "dl_vlan":"5"}}'
http://127.0.0.1:8080/stats/flowentry/add
(2)
curl -X POST -d '{"dpid": "0000000000000001",
"priority":"32500","actions":[{"type":"SET_VLAN_VID","vlan_vid":"6"},
{"type":"OUTPUT","port":"2"}], "match":{"in_port":"1"}}'
http://127.0.0.1:8080/stats/flowentry/add
curl -X POST -d '{"dpid": "0000000000000001",
"priority":"32768","actions":[{"type":"STRIP_VLAN"},
{"type":"OUTPUT","port":"1"}], "match":{"in_port":"2", "dl_vlan":"6"}}'
http://127.0.0.1:8080/stats/flowentry/add
Just I changed the order of your flow entries.
(And "STRIP_VLAN" takes no arguments and consists like "ethertype")
>
>
> ------------------------------------------------------------------------------
> Slashdot TV. Videos for Nerds. Stuff that Matters.
> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel