try to use Java code to add a flow with action flood but failed

asked 2015-07-15 21:25:27 -0700

rueiminl gravatar image

Hi, I got some problems when addFlow with action type FloodAll.

I can use org.opendaylight.controller.sal.action.OUTPUT, and it works as expected.

However, when I try to use org.opendaylight.controller.sal.action.FloodAll and add a flowmod, it looks like:

Flow[match = Match [fields={INPORT=INPORT(OF|2@OF|00:00:00:00:00:00:00:06)}, matches=1], actions = [FLOODALL], priority = 0, id = 0, idleTimeout = 0, hardTimeout = 0]

but the result action would become 'drop':

NXSTFLOW reply (xid=0x4): cookie=0x0, duration=25.986s, table=0, npackets=0, nbytes=0, idleage=25, priority=0,in_port=3 actions=drop

When I use REST API to GET the flowmod, it shows:

                <action>
                    <order>1</order>
                    <flood-all-action></flood-all-action>
                </action>

After that, I try to use PUT with the sample xml, it works. (based on https://wiki.opendaylight.org/view/EditingOpenDaylightOpenFlowPlugin:EndtoEndFlows:ExampleFlows#Outputto_FLOOD )

            <action>
                <order>0</order>
                <output-action>
                    <output-node-connector>FLOOD</output-node-connector>
                    <max-length>60</max-length>
                </output-action>
            </action>

NXSTFLOW reply (xid=0x4): cookie=0x0, duration=25.986s, table=0, npackets=0, nbytes=0, idleage=25, priority=0,in_port=3 actions=FLOOD

I'm using distribution-karaf-0.2.3-Helium-SR3. In addition, I'd like to know how to use group in OpenFlow spec. Is there any sample code or tutorial?

edit retag flag offensive close merge delete

Comments

Now I'm using multiple OUTPUTs to simulate the FLOOD, and it seems to serve what I need better because I can assign specific ports.

rueiminl ( 2015-07-17 09:25:46 -0700 )edit