Hello,
I want to install a flow rule which matches an IP prefix. How do I specify
the netmask value? Say, I want to send all packets (regardless of input
port) which match the prefix 10.1.0.0/16 out of port 2 of a switch. How do
I do this in my python application. Here is what I have so far.
flow = {}
flow[core.IN_PORT] = OFPP_ANY
flow[core.NW_DST] = ipstr_to_int('10.1.0.0')
actions = [[openflow.OFPAT_OUTPUT, [0, 2]]]
inst.install_datapath_flow(dpid, flow,
CACHE_TIMEOUT,openflow.OFP_FLOW_PERMANENT, actions, None,
openflow.OFP_DEFAULT_PRIORITY, OFPP_ANY, None)
Thanks,
Dushyant