Ask Your Question

Unable to insert rules matching only dl_type

asked 2015-02-04 02:09:45 -0700

namnx87 gravatar image


I try to insert a rules matching only DLTYPE using IFlowProgrammerService. I can see the rule appearing in the flow table, but there is not matching field DLType. Here is my code:

Match match = new Match();
short ethertype = EtherTypes.IPv4.shortValue();
    match.setField( new MatchField(MatchType.DL_TYPE, ethertype));

    List<Action> actions = new ArrayList<Action>();
    actions.add(new Output(outConnector));

    Flow f = new Flow(match, actions);

    f.setIdleTimeout((short) 0);
    f.setPriority((short) 5);

    // Modify the flow on the network node
    Status status = programmer.addFlow(node, f);"Add Default Rules: {} to {} ", f, node);        


The log I got:

Flow[match = Match [fields={DL_TYPE=DL_TYPE(2048)}, matches=128], actions = [OUTPUT[OF13|4@OF13|1]], priority = 5, id = 0, idleTimeout = 0, hardTimeout = 0] to OF13|1

I tried to insert similar rules using OVS command, it works.

Is there any problem in my code?


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-02-04 02:54:33 -0700

yijung0325 gravatar image

check this out ; hope it helps

edit flag offensive delete publish link more


Thanks. I solved it. My code does not work with ODL controller in SDNHub VM but it works with ODL controller from the official website.

namnx87 ( 2015-02-12 00:02:51 -0700 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2015-02-04 02:09:45 -0700

Seen: 488 times

Last updated: Feb 04 '15