about arp proxy

56 views
Skip to first unread message

jiangrui (D)

unread,
Apr 13, 2015, 3:26:01 AM4/13/15
to onos...@onosproject.org

Hi All,

     I just look at the code of arp proxy and I have some question about it

         If mininet works in openflow 1.3 mode, arp packets are sended to controller.  But I haven’t see any flowrule to introduce mininet to do like that except some table-miss entry

         If I install  any other flow rule on table 0, just like host to host intent, may be it won’t match table miss, and arp proxy wont work. Is that situation will happened?

 

 

 

private void populateTableMissEntry(int tableToAdd, boolean toControllerNow,

            boolean toControllerWrite,

            boolean toTable, int tableToSend) {

        OFOxmList oxmList = OFOxmList.EMPTY;

        OFMatchV3 match = factory.buildMatchV3()

                .setOxmList(oxmList)

                .build();

        OFAction outc = factory.actions()

                .buildOutput()

                .setPort(OFPort.CONTROLLER)

                .setMaxLen(OFPCML_NO_BUFFER)

                .build();

        List<OFInstruction> instructions = new ArrayList<OFInstruction>();

        if (toControllerNow) {

            // table-miss instruction to send to controller immediately

            OFInstruction instr = factory.instructions()

                    .buildApplyActions()

                    .setActions(Collections.singletonList(outc))

                    .build();

            instructions.add(instr);

        }

 

        if (toControllerWrite) {

            // table-miss instruction to write-action to send to controller

            // this will be executed whenever the action-set gets executed

            OFInstruction instr = factory.instructions()

                    .buildWriteActions()

                    .setActions(Collections.singletonList(outc))

                    .build();

            instructions.add(instr);

        }

 

        if (toTable) {

            // table-miss instruction to goto-table x

            OFInstruction instr = factory.instructions()

                    .gotoTable(TableId.of(tableToSend));

            instructions.add(instr);

        }

 

        if (!toControllerNow && !toControllerWrite && !toTable) {

            // table-miss has no instruction - at which point action-set will be

            // executed - if there is an action to output/group in the action

            // set

            // the packet will be sent there, otherwise it will be dropped.

            instructions = Collections.EMPTY_LIST;

        }

 

        OFMessage tableMissEntry = factory.buildFlowAdd()

                .setTableId(TableId.of(tableToAdd))

                .setMatch(match) // match everything

                .setInstructions(instructions)

                .setPriority(MIN_PRIORITY)

                .setBufferId(OFBufferId.NO_BUFFER)

                .setIdleTimeout(0)

                .setHardTimeout(0)

                .setXid(getNextTransactionId())

                .build();

        write(tableMissEntry);

    }

Charles Min-Cheng Chan

unread,
Apr 13, 2015, 7:13:01 AM4/13/15
to jiangrui (D), onos...@onosproject.org
Hi jiangrui,

It is not likely going to happen.
The priority of flow entry installed by org.onosproject.arp is 40000, which is much higher than the flow entries installed by HostToHostIntent (priority=123).
The problem only exists if you write your own application that installs a ARP rule with priority higher than 40000.

You should see a flow entry like this one if the proxyarp application is enabled properly.
cookie=0xa000005c32aa7, duration=1897.159s, table=0, n_packets=0, n_bytes=0, idle_age=1897, priority=40000,arp actions=CONTROLLER:65535

Best,
Charles

--
You received this message because you are subscribed to the Google Groups "ONOS Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to onos-dev+u...@onosproject.org.
To post to this group, send email to onos...@onosproject.org.
Visit this group at http://groups.google.com/a/onosproject.org/group/onos-dev/.
To view this discussion on the web visit https://groups.google.com/a/onosproject.org/d/msgid/onos-dev/CA1C22A30842CF4DA3929E6A16C4D8C565CE693D%40szxeml555-mbx.china.huawei.com.
Reply all
Reply to author
Forward
0 new messages