Hi Ramon,

Have you specified the ethertype in your flowmod. I believe setting it to ip 
(0x800) and the ip protocol to TCP (6) you should be fine.

Cheers.

--
Ali

On Nov 7, 2011, at 10:44 AM, Ramon Marques wrote:

> Hi,
> 
> I'm running openflow on mininet, but I'm having a problem when I try to 
> include TCP ports in the rule.
> Here is the piece of code where I install the flow.
> 
>         attrs = {}
>         attrs[core.IN_PORT] = inport
>         attrs[core.DL_DST] = destino
>         attrs[core.TP_SRC]= tcp_port
>         attrs[core.TP_DST]= 80
> 
>         action = [[openflow.OFPAT_SET_DL_DST, server_mac], 
> [openflow.OFPAT_OUTPUT, [0, server_port]]]
>         self.install_datapath_flow(dpid, attrs, 60, 60, action, bufid, 10, 
> inport, None)
> 
> 
> I captured the FlowMod packet on wireshark, and copied the flow modification 
> fields. 
> 
> Flow Modification
>     Match
>         Match Types
>             Input Port: 3
>             Ethernet Dst Addr: Broadcast (ff:ff:ff:ff:ff:ff)
>             TCP/UDP Src Port: 59279 (59279)
>             TCP/UDP Dst Port: http (80)
> 
> 
> The fields in the FlowMod packet are correct, but the flow that is installed 
> on the switch do not contain the  TP_SRC and TP_DST  fields.
> Here is the "dpctl dump-flows" output.
> 
> openflow@openflowvm:~$ dpctl dump-flows tcp:127.0.0.1:6634
> stats_reply (xid=0x49e35a53): flags=none type=1(flow)
>   cookie=0, duration_sec=2s, duration_nsec=855000000s, table_id=0, 
> priority=10, n_packets=40, n_bytes=3045, 
> idle_timeout=60,hard_timeout=60,in_port=3,dl_dst=ff:ff:ff:ff:ff:ff,actions=mod_dl_dst:00:00:00:00:00:03,output:2
> 
> 
> Packet are matching with the flow no matter their TCP ports.
> Does anyone knows what I am doing wrong?
> 
> Thanks in advance
> 
> 
> -- 
> Ramon Marques Ramos
> 
> Engenheiro de Computação
> Mestrando em Informática -UFES
> 
> _______________________________________________
> openflow-discuss mailing list
> openflow-discuss@lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to