On Apr 4, 2013, at 4:08 PM, Sayed Qaiser Ali Shah Shah wrote:
> The link which you provide was very helpful and I found match class in that 
> and I use this code
> 
> import pox.openflow.libopenflow_01 as of # POX convention
> import pox.lib.packet as pkt # POX convention
> my_match = of.ofp_match(dl_type = pkt.ethernet.IP_TYPE, nw_proto = 
> pkt.ipv4.TCP_PROTOCOL, tp_dst = 80)
> 
> Which will create match to web servers but I don't know how this will work. 
> Will it work automatically i.e. it will forward packets to server 
> automatically when any packet having nw_proto=TCP_Protocol and tp_dst=80. If 
> it does not forward the packet automatically then how it works?

You still haven't really explained what it is that you're trying to do.  What 
is your high-level goal?  Are you trying to install flow table entries?  Do you 
want packets from particular flows sent to the controller?  Are you trying to 
block certain connections?

If you're trying to install flow entries on the switch, you need to send an 
ofp_flow_mod (as per the OpenFlow spec).  This contains a match object and then 
contains actions to tell the switch what to do with it (send it out of a port, 
send it to the controller, etc.).  See the section of the manual wiki on 
ofp_flow_mod, as well as the examples in the forwarding directory of POX (for 
example, l2_learning).

-- Murphy

Reply via email to