Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

Unable to insert rules matching only dl_type

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

namnx87 gravatar image

Hello,

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);
    logger.info("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?

Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

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

yijung0325 gravatar image

check this out http://www.frank-durr.de/?p=126 ; hope it helps

edit flag offensive delete publish link more

Comments

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 -0800 )edit
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

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

Seen: 490 times

Last updated: Feb 04 '15