It looks like what you have is right. If you want to match on VLAN you
should use DL_VLAN, there is no DL_VLAN_VID.

If you want to add a vlan tag on a packet then OFPAT_SET_VLAN_VID is the
action for that.

Aaron

P.S: in your code I think you want flow[core.DL_VLAN] = 5 from your
description.

On Sun, Nov 27, 2011 at 12:17 AM, Dushyant Arora
<dushy...@cs.princeton.edu>wrote:

> Hello,
>
> I wan to install the following rule in pyswitch for switch s1: All flows
> with INPORT=1 and VLAN_VID=5 forward to port 2.
>
>        flow = {}
>        flow[core.IN_PORT] = 1

       flow[core.DL_VLAN] = 1 ?? #There is DL_VLAN_PCP but no DL_VLAN_VID!
>        actions = [[openflow.OFPAT_OUTPUT, [0,2]]]
>        inst.install_datapath_flow(dpid, flow, openflow.OFP_FLOW_PERMANENT,
> openflow.OFP_FLOW_PERMANENT, actions,None,
> openflow.OFP_DEFAULT_PRIORITY,1,None)
>
> There is no DL_VLAN_VID parameter for a flow. You can set it in the
> actions using openflow.OFPAT_SET_VLAN_VID though. Can someone please shed
> some light on this.
>
> Thanks,
>
> Dushyant
> _______________________________________________
> nox-dev mailing list
> nox-dev@noxrepo.org
> http://noxrepo.org/mailman/listinfo/nox-dev
>



-- 
Aaron O. Rosen
Masters Student - Network Communication
306B Fluor Daniel
_______________________________________________
nox-dev mailing list
nox-dev@noxrepo.org
http://noxrepo.org/mailman/listinfo/nox-dev

Reply via email to