How to push Valn-Id in ODL- Helium

asked 2015-07-03 01:47:21 -0700

viru gravatar image

HI All,

I am using below code to push vlan -ID in flows //Add Vlan-ID.

        PushVlanActionBuilder pushVlanActionBuilder9 = new PushVlanActionBuilder();
        pushVlanActionBuilder9.setEthernetType(0x8100);
        VlanId vlanId = new VlanId(2);
        pushVlanActionBuilder9.setVlanId(vlanId);
        ActionBuilder actionBuilder9 = new ActionBuilder();
        actionBuilder9.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(pushVlanActionBuilder9.build()).build());
        actionBuilder9.setOrder(0);
        Action action9 = actionBuilder9.build();
        actionList.add(action9);

And it shows me this flow on switch:- cookie=0x2b00000000000001, duration=241.908s, table=0, npackets=11, nbytes=814, sendflowrem priority=65535,ip,nwsrc=10.0.0.2,nwdst=10.0.0.1 actions=setfield:10.0.0.1->ipdst,pushvlan:0x8100,setfield:10.0.0.2->ip_src,output:1

but it is not adding any VLAN-Id when packet pass through it. Please let me know the way to implent vlan -id and if possible strip the vlan-id also.

Regards, Virender

edit retag flag offensive close merge delete