In order for NW_DST to be valid, you must set DL_TYPE to 0x0800 (IP).
-- Murphy
On Mar 8, 2012, at 4:52 AM, bbs wrote:
> Hi,
>
> I want to insert some flow-entries into the openflow-switch from the NOX, so
> I write some program using python, and a part of the program is as follows.
>
> flow = { }
> flow[core.NW_DST] = ipstr_to_int("10.0.0.1")
> flow[core.NW_DST_N_WILD] = 8
> actions = [[openflow.OFPAT_OUTPUT, [0, 2]]]
> inst.install_datapath_flow(dpid, flow, CACHE_TIMEOUT,
> openflow.OFP_FLOW_PERMANENT, actions)
>
> but the flow-entry inserted into the openflow-switch is not what I wanted.
> the flow-entry is as follows.
>
> cookie=0, duration_sec=10870s, duration_nsec=7250000s, table_id=1,
> priority=32768, n_packet=254, n_bytes=9402, idle_timeout=0, hard_timeout=0,
> actions=output:2
>
> could someone tell me why? and how to make it ?
>
> thanks a lot!
>
> John
>
>
> 三八节,网易微博替男人伸冤!