Dear Aneesh,

I'm also using hp3500 with ryu controller... unfortunately the OpenFlow 
implementation in those switches is limited and not very well documented.

Table 100 in the hp3500 is devoted only for matches executed in 
hardware. While table 200 is for matches executed in software.

Following the documentation mac_destination field is not matched in 
hardware, so you cannot install a flow matching mac_destination in table 
100. This explain why you are able to install it in table 200. 
Conversely, for instance, ip_destination is matched in hardware, so you 
can match ip_destination in table 100.

A workaround to match mac_destination field can be:
- push a flow on table 100 matching in_port with istruction goto table 200
- push a flow on table 200 matching mac_destination

Following hp documentation the fields that are matched in hardware in 
the hp 3500 are:

- in port
- vlan id
- ethernet type
- ip src
- ip dst
- ip proto
- ip dscp
- tcp/udp src
- tcp/udp dst


Let me nkow if this helped you.

Best Regards,
alessio








Il 09/06/2016 12:06, Aneesh Dogra ha scritto:
> Hello,
>
> I am using an HP 3500yl openflow 1.3 capable switch. I am trying to get
> the simple_switch_13 example to work, for an experiment. I keep on
> getting: OFPET_BAD_MATCH (4), OFPBMC_BAD_TYPE (0) for all the rules the
> controller tries to push. Let me explain a bit more about my setup: I
> have made 2 VLANS one for the controller and another for the clients.
> Here's the running configuration:
>
> ; J9310A Configuration Editor; Created on release #K.15.15.0012
> ; Ver #06:14.18.7f.ff.3f.ef:5a
> hostname "HP-3500yl-24G-PoEP"
> module 1 type j93xxa
> ip routing
> snmp-server community "public" unrestricted
> openflow
>    controller-id 1 ip 192.168.2.2 controller-interface vlan 1
>    instance "test01"
>       listen-port 8080
>       member vlan 2
>       controller-id 1
>       version 1.3
>       enable
>       exit
>    enable
>    exit
> vlan 1
>    name "openflow-controller"
>    no untagged 2-6
>    untagged 1,7-24
>    ip address 192.168.2.1 255.255.255.0
>    exit
> vlan 2
>    name "clients"
>    untagged 2-6
>    ip address 192.168.3.1 255.255.255.0
>    exit
>
>
> I have connected to hosts on the client vlan and one host that acts as
> the controller in the controller vlan.
>
> Wireshark screenshots of error packets:
>
>
>
> ​
> Here's how my flows look like:
>
> HP-3500yl-24G-PoEP(config)# sh openflow instance test01 flows
>
>  OpenFlow Flow Table
>
>  Flow 1
>  Match
>   Incoming Port : Any                   Ethernet Type    : Any
>   Source MAC    : Any                   Destination MAC  : Any
>   VLAN ID       : Any                   VLAN priority    : Any
>   Source Protocol Address : Any
>   Target Protocol Address : Any
>   IP Protocol   : Any
>   IP ECN        : Any                   IP DSCP          : Any
>   Source Port   : Any                   Destination Port : Any
>  Attributes
>   Priority      : 0                     Duration         : 5 seconds
>   Hard Timeout  : 0 seconds             Idle Timeout     : 0 seconds
>   Byte Count    : 0                     Packet Count     : NA
>   Flow Table ID : 0                     Controller ID    : NA
>   Activity Count: NA                    Cookie           : 0x0
>   Hardware Index     : NA
>  Instructions
>    Goto Table ID                 : 100
>
>   Flow 2
>  Match
>   Incoming Port : Any                   Ethernet Type    : Any
>   Source MAC    : Any                   Destination MAC  : Any
>   VLAN ID       : Any                   VLAN priority    : Any
>   Source Protocol Address : Any
>   Target Protocol Address : Any
>   IP Protocol   : Any
>   IP ECN        : Any                   IP DSCP          : Any
>   Source Port   : Any                   Destination Port : Any
>  Attributes
>   Priority      : 0                     Duration         : 23 seconds
>   Hard Timeout  : 0 seconds             Idle Timeout     : 0 seconds
>   Byte Count    : NA                    Packet Count     : 13
>   Flow Table ID : 100                   Controller ID    : 1
>   Activity Count: NA                    Cookie           : 0x0
>   Hardware Index     : NA
>  Instructions
>    Apply Actions
>     Controller Port
>
>
>  Flow 3
>  Match
>   Incoming Port : Any                   Ethernet Type    : Any
>   Source MAC    : Any                   Destination MAC  : Any
>   VLAN ID       : Any                   VLAN priority    : Any
>   Source Protocol Address : Any
>   Target Protocol Address : Any
>   IP Protocol   : Any
>   IP ECN        : Any                   IP DSCP          : Any
>   Source Port   : Any                   Destination Port : Any
>  Attributes
>   Priority      : 0                     Duration         : 5 seconds
>   Hard Timeout  : 0 seconds             Idle Timeout     : 0 seconds
>   Byte Count    : 0                     Packet Count     : 0
>   Flow Table ID : 200                   Controller ID    : NA
>   Activity Count: NA                    Cookie           : 0x0
>   Hardware Index     : NA
>  Instructions
>     Drop
>
>
> Its interesting to note that *Flow 2* that redirects packets to the
> controller, gets pushed, but none of the other flows.
>
> Here's the git diff of simple_switch_13.py:
>
> iiitd@siegebreaker:~/siege/ryu$ git diff ryu/app/simple_switch_13.py
> diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py
> index 3e7c598..f57cfef 100644
> --- a/ryu/app/simple_switch_13.py
> +++ b/ryu/app/simple_switch_13.py
> @@ -57,10 +57,10 @@ class SimpleSwitch13(app_manager.RyuApp):
>          if buffer_id:
>              mod = parser.OFPFlowMod(datapath=datapath, buffer_id=buffer_id,
>                                      priority=priority, match=match,
> -                                    instructions=inst)
> +                                    instructions=inst, table_id=100)
>          else:
>              mod = parser.OFPFlowMod(datapath=datapath, priority=priority,
> -                                    match=match, instructions=inst)
> +                                    match=match, instructions=inst,
> table_id=100)
>          datapath.send_msg(mod)
>
>      @set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
>
> I have just added a table_id=100, because table_id=0 is read only in hp
> switches (source
> <http://community.hpe.com/t5/SDN-Development/OFPFMFC-EPERM-error-message/td-p/6314363>).
>
> Also, another interesting thing to note: if I push flows to table 200,
> they don't give any error but the Flows in table 100 take priority and
> my flows are never followed.
>
> Here's how my flows look like if I push to table 200:
>
>  Flow 4
>  Match
>   Incoming Port : 5                     Ethernet Type    : Any
>   Source MAC    : Any                   Destination MAC  : 406c8f-051c67
>   VLAN ID       : Any                   VLAN priority    : Any
>   Source Protocol Address : Any
>   Target Protocol Address : Any
>   IP Protocol   : Any
>   IP ECN        : Any                   IP DSCP          : Any
>   Source Port   : Any                   Destination Port : Any
>  Attributes
>   Priority      : 2                     Duration         : 0 seconds
>   Hard Timeout  : 0 seconds             Idle Timeout     : 0 seconds
>   Byte Count    : 0                     Packet Count     : 0
>   Flow Table ID : 200                   Controller ID    : 1
>   Activity Count: NA                    Cookie           : 0x0
>   Hardware Index     : NA
>  Instructions
>    Apply Actions
>      Output                      : 3
>
>  Flow 5
>  Match
>   Incoming Port : 3                     Ethernet Type    : Any
>   Source MAC    : Any                   Destination MAC  : f0761c-19e473
>   VLAN ID       : Any                   VLAN priority    : Any
>   Source Protocol Address : Any
>   Target Protocol Address : Any
>   IP Protocol   : Any
>   IP ECN        : Any                   IP DSCP          : Any
>   Source Port   : Any                   Destination Port : Any
>  Attributes
>   Priority      : 2                     Duration         : 0 seconds
>   Hard Timeout  : 0 seconds             Idle Timeout     : 0 seconds
>   Byte Count    : 0                     Packet Count     : 0
>   Flow Table ID : 200                   Controller ID    : 1
>   Activity Count: NA                    Cookie           : 0x0
>   Hardware Index     : NA
>  Instructions
>    Apply Actions
>      Output                      : 5
>
>
> I am stuck on this problem from over a week with no idea how to proceed.
> I'll appreciate any kind of help from you guys on this.
>
> Thanks
> --
> Regardless, I hope you're well and happy -
> Aneesh
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>
>
>
> _______________________________________________
> Ryu-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ryu-devel
>

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to