Classification

Classifiers are the fundamental component of an OpenFlow switch. Each flow, or row, in the flow table contains a classifier. The first flow whose classifier matches a packet becomes the active flow entry for that packet. The flow entry also contains an action set which will be applied to all packets matched. A classifier is a sequence of partial or full field match elements from various protocols. Each subsequent version of OpenFlow expands the number of protocols and fields supporting classification.

Classifier Stack

This version of OpenFlow can classify against port ID and up to 6 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifier for ARP, based on a FeatureRes. The feature_capabilities will indicate ARP matching is supported if the switch is capable. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name Match Field Mask Type
Port none Port ID in_port wildcard
Ethernet none Source MAC dl_src wildcard
Destination MAC dl_dst wildcard
Type/Length dl_type wildcard
VLAN ID dl_vlan wildcard
VLAN Priority dl_vlan_pcp wildcard
ARP dl_type = 0x0806 Opcode nw_proto wildcard
Sender Protocol Address nw_src prefix
Target Protocol Address nw_dst prefix
IPv4 dl_type = 0x0800 Type of Service nw_tos wildcard
Protocol nw_proto wildcard
Source Address nw_src prefix
Destination Address nw_dst prefix
TCP nw_proto = 6 Source Port tp_src wildcard
Destination Port tp_dst wildcard
UDP nw_proto = 17 Source Port tp_src wildcard
Destination Port tp_dst wildcard
ICMPv4 nw_proto = 1 Type tp_src wildcard
Code tp_dst wildcard

Vendor/Experimenter Extension

Custom classifiers must be carried in a Vendor message in this version of the protocol.

References

OpenFlow Switch Specification 1.0.0: pages 8-920-21

Classifier Stack

This version of OpenFlow can classify against port ID, metadata, and up to 7 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifier for ARP, based on a FeatureRes. The feature_capabilities will indicate ARP matching is supported if the switch is capable. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure. Additionally, this version of Openflow allows for passing information between tables via the Metadata field. A classifier can match on a maskable metadata value, which can be used to partition classification between tables.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name Match Field Mask Type
Port none Port ID in_port wildcard
Metadata none Metadata metadata prefix
Ethernet none Source MAC dl_src prefix
Destination MAC dl_dst prefix
Type/Length dl_type wildcard
VLAN ID dl_vlan wildcard
VLAN Priority dl_vlan_pcp wildcard
MPLS

dl_type = 0x8847 

or

dl_type = 0x8848

MPLS Label mpls_label wildcard
MPLS Traffic Control mpls_tc wildcard
ARP dl_type = 0x0806 Opcode nw_proto wildcard
Sender Protocol Address nw_src prefix
Target Protocol Address nw_dst prefix
IPv4 dl_type = 0x0800 Type of Service nw_tos wildcard
Protocol nw_proto wildcard
Source Address nw_src prefix
Destination Address nw_dst prefix
TCP nw_proto = 6 Source Port tp_src wildcard
Destination Port tp_dst wildcard
UDP nw_proto = 17 Source Port tp_src wildcard
Destination Port tp_dst wildcard
SCTP nw_proto = 132 Source Port tp_src wildcard
Destination Port tp_dst wildcard
ICMPv4 nw_proto = 1 Type tp_src wildcard
Code tp_dst wildcard

Vendor/Experimenter Extensions

It is possible to have custom classifier extensions in this version of the the protocol. There are two mechanisms for carrying these extensions to a switch. First, the Experimenter message can be used to carry custom data. Second, the Match structure is updated in this version of the protocol to support a type and length header. A custom structure could be defined with a different Match type.

References

OpenFlow Switch Specification 1.1.0: pages 7-10, 28-29

Classifier Stack

This version of OpenFlow can classify against port ID and up to 7 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifiers based on a Table StatsRes. The match bitmap will indicate if a particulare classifier is supported; the wildcard bitmask indicates which classifiers have masking capability. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure. Additionally, this version of Openflow allows for passing information between tables via the Metadata field. A classifier can match on a maskable metadata value, which can be used to partition classification between tables.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name OXM Name Mask Type
Port none Logical Port ID IN_PORT none
Physical Port ID IN_PHY_PORT none
Metadata none Metadata METADATA bitmask
Ethernet none Source MAC ETH_SRC bitmask
Destination MAC ETH_DST bitmask
Type/Length ETH_TYPE none
VLAN ID ETH_VLAN_VID bitmask
VLAN Priority ETH_VLAN_PCP none
MPLS

ETH_TYPE = 0x8847 

or

ETH_TYPE = 0x8848

MPLS Label MPLS_LABEL none
MPLS Traffic Control MPLS_TC none
ARP ETH_TYPE = 0x0806 Opcode ARP_OP none
Sender Hardware Address ARP_SHA bitmask
Sender Protocol Address ARP_SPA bitmask
Target Hardware Address ARP_THA bitmask
Target Protocol Address ARP_TPA bitmask
IPv4 ETH_TYPE = 0x0800 DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV4_SRC bitmask
Destination Address IPV4_DST bitmask
IPv6 ETH_TYPE = 0x08dd DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV6_SRC bitmask
Destination Address IPV6_DST bitmask
Flow Label IPV6_FLABEL bitmask
TCP IP_PROTO = 6 Source Port TCP_SRC none
Destination Port TCP_DST none
UDP IP_PROTO = 17 Source Port UDP_SRC none
Destination Port UDP_DST none
SCTP IP_PROTO = 132 Source Port SCTP_SRC none
Destination Port SCTP_DST none
ICMPv4 IP_PROTO = 1 Type ICMPV4_TYPE none
Code ICMPV4_CODE none
ICMPv6 IP_PROTO = 58 Type ICMPV6_TYPE none
Code ICMPV6_CODE none
ND Target Address IPV6_ND_TARGET none
ND Link-Layer Source IPV6_ND_SLL none
ND Link-Layer Target IPV6_ND_TLL none

Vendor/Experimenter Extensions

It is possible to have custom classifier extensions in this version of the the protocol. There are two mechanisms for carrying these extensions to a switch. First, the Experimenter message can be used to carry custom data. Second, the OXM Match structure contains an experimenter class definition. A custom structure could be defined using the Experimenter OXM and ID.

References

OpenFlow Switch Specification 1.2: pages 11, 32-38

Classifier Stack

This version of OpenFlow can classify against port ID and up to 7 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifiers based on a Table StatsRes. The match bitmap will indicate if a particulare classifier is supported; the wildcard bitmask indicates which classifiers have masking capability. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure. Additionally, this version of Openflow allows for passing information between tables via the Metadata field. A classifier can match on a maskable metadata value, which can be used to partition classification between tables.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name OXM Name Mask Type
Port none Logical Port ID IN_PORT none
Physical Port ID IN_PHY_PORT none
Metadata METADATA bitmask
Tunnel ID TUNNEL_ID bitmask
Ethernet none Source MAC ETH_SRC bitmask
Destination MAC ETH_DST bitmask
Type/Length ETH_TYPE none
VLAN ID ETH_VLAN_VID bitmask
VLAN Priority ETH_VLAN_PCP none
ETH_TYPE = 0x88e7 Backbone Service Instance ID PBB_ISID bitmask
MPLS

ETH_TYPE = 0x8847 

or

ETH_TYPE = 0x8848

MPLS Label MPLS_LABEL none
MPLS Traffic Control MPLS_TC none
Bottom of Stack MPLS_BOS_BIT none
ARP ETH_TYPE = 0x0806 Opcode ARP_OP none
Sender Hardware Address ARP_SHA bitmask
Sender Protocol Address ARP_SPA bitmask
Target Hardware Address ARP_THA bitmask
Target Protocol Address ARP_TPA bitmask
IPv4 ETH_TYPE = 0x0800 DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV4_SRC bitmask
Destination Address IPV4_DST bitmask
IPv6 ETH_TYPE = 0x08dd DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV6_SRC bitmask
Destination Address IPV6_DST bitmask
Flow Label IPV6_FLABEL bitmask
Extension Header IPV6_EXTHDR bitmask
TCP IP_PROTO = 6 Source Port TCP_SRC none
Destination Port TCP_DST none
UDP IP_PROTO = 17 Source Port UDP_SRC none
Destination Port UDP_DST none
SCTP IP_PROTO = 132 Source Port SCTP_SRC none
Destination Port SCTP_DST none
ICMPv4 IP_PROTO = 1 Type ICMPV4_TYPE none
Code ICMPV4_CODE none
ICMPv6 IP_PROTO = 58 Type ICMPV6_TYPE none
Code ICMPV6_CODE none
ND Target Address IPV6_ND_TARGET none
ND Link-Layer Source IPV6_ND_SLL none
ND Link-Layer Target IPV6_ND_TLL none

Vendor/Experimenter Extensions

It is possible to have custom classifier extensions in this version of the the protocol. There are two mechanisms for carrying these extensions to a switch. First, the Experimenter message can be used to carry custom data. Second, the OXM Match structure contains an experimenter class definition. A custom structure could be defined using the Experimenter OXM and ID.

References

OpenFlow Switch Specification 1.3.0, pages 38-46

Classifier Stack

This version of OpenFlow can classify against port ID and up to 7 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifiers based on a Table StatsRes. The match bitmap will indicate if a particulare classifier is supported; the wildcard bitmask indicates which classifiers have masking capability. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure. Additionally, this version of Openflow allows for passing information between tables via the Metadata field. A classifier can match on a maskable metadata value, which can be used to partition classification between tables.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name OXM Name Mask Type
Port none Logical Port ID IN_PORT none
Physical Port ID IN_PHY_PORT none
Metadata METADATA bitmask
Tunnel ID TUNNEL_ID bitmask
Ethernet none Source MAC ETH_SRC bitmask
Destination MAC ETH_DST bitmask
Type/Length ETH_TYPE none
VLAN ID ETH_VLAN_VID bitmask
VLAN Priority ETH_VLAN_PCP none
ETH_TYPE = 0x88e7 Backbone Service Instance ID PBB_ISID bitmask
MPLS

ETH_TYPE = 0x8847 

or

ETH_TYPE = 0x8848

MPLS Label MPLS_LABEL none
MPLS Traffic Control MPLS_TC none
Bottom of Stack MPLS_BOS_BIT none
ARP ETH_TYPE = 0x0806 Opcode ARP_OP none
Sender Hardware Address ARP_SHA bitmask
Sender Protocol Address ARP_SPA bitmask
Target Hardware Address ARP_THA bitmask
Target Protocol Address ARP_TPA bitmask
IPv4 ETH_TYPE = 0x0800 DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV4_SRC bitmask
Destination Address IPV4_DST bitmask
IPv6 ETH_TYPE = 0x08dd DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV6_SRC bitmask
Destination Address IPV6_DST bitmask
Flow Label IPV6_FLABEL bitmask
Extension Header IPV6_EXTHDR bitmask
TCP IP_PROTO = 6 Source Port TCP_SRC none
Destination Port TCP_DST none
UDP IP_PROTO = 17 Source Port UDP_SRC none
Destination Port UDP_DST none
SCTP IP_PROTO = 132 Source Port SCTP_SRC none
Destination Port SCTP_DST none
ICMPv4 IP_PROTO = 1 Type ICMPV4_TYPE none
Code ICMPV4_CODE none
ICMPv6 IP_PROTO = 58 Type ICMPV6_TYPE none
Code ICMPV6_CODE none
ND Target Address IPV6_ND_TARGET none
ND Link-Layer Source IPV6_ND_SLL none
ND Link-Layer Target IPV6_ND_TLL none

Vendor/Experimenter Extensions

It is possible to have custom classifier extensions in this version of the the protocol. There are two mechanisms for carrying these extensions to a switch. First, the Experimenter message can be used to carry custom data. Second, the OXM Match structure contains an experimenter class definition. A custom structure could be defined using the Experimenter OXM and ID.

References

OpenFlow Switch Specification 1.3.1, pages 45-54

Classifier Stack

This version of OpenFlow can classify against port ID and up to 7 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifiers based on a Table StatsRes. The match bitmap will indicate if a particulare classifier is supported; the wildcard bitmask indicates which classifiers have masking capability. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure. Additionally, this version of Openflow allows for passing information between tables via the Metadata field. A classifier can match on a maskable metadata value, which can be used to partition classification between tables.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name OXM Name Mask Type
Port none Logical Port ID IN_PORT none
Physical Port ID IN_PHY_PORT none
Metadata METADATA bitmask
Tunnel ID TUNNEL_ID bitmask
Ethernet none Source MAC ETH_SRC bitmask
Destination MAC ETH_DST bitmask
Type/Length ETH_TYPE none
VLAN ID ETH_VLAN_VID bitmask
VLAN Priority ETH_VLAN_PCP none
ETH_TYPE = 0x88e7 Backbone Service Instance ID PBB_ISID bitmask
MPLS

ETH_TYPE = 0x8847 

or

ETH_TYPE = 0x8848

MPLS Label MPLS_LABEL none
MPLS Traffic Control MPLS_TC none
Bottom of Stack MPLS_BOS_BIT none
ARP ETH_TYPE = 0x0806 Opcode ARP_OP none
Sender Hardware Address ARP_SHA bitmask
Sender Protocol Address ARP_SPA bitmask
Target Hardware Address ARP_THA bitmask
Target Protocol Address ARP_TPA bitmask
IPv4 ETH_TYPE = 0x0800 DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV4_SRC bitmask
Destination Address IPV4_DST bitmask
IPv6 ETH_TYPE = 0x08dd DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV6_SRC bitmask
Destination Address IPV6_DST bitmask
Flow Label IPV6_FLABEL bitmask
Extension Header IPV6_EXTHDR bitmask
TCP IP_PROTO = 6 Source Port TCP_SRC none
Destination Port TCP_DST none
UDP IP_PROTO = 17 Source Port UDP_SRC none
Destination Port UDP_DST none
SCTP IP_PROTO = 132 Source Port SCTP_SRC none
Destination Port SCTP_DST none
ICMPv4 IP_PROTO = 1 Type ICMPV4_TYPE none
Code ICMPV4_CODE none
ICMPv6 IP_PROTO = 58 Type ICMPV6_TYPE none
Code ICMPV6_CODE none
ND Target Address IPV6_ND_TARGET none
ND Link-Layer Source IPV6_ND_SLL none
ND Link-Layer Target IPV6_ND_TLL none

Vendor/Experimenter Extensions

It is possible to have custom classifier extensions in this version of the the protocol. There are two mechanisms for carrying these extensions to a switch. First, the Experimenter message can be used to carry custom data. Second, the OXM Match structure contains an experimenter class definition. A custom structure could be defined using the Experimenter OXM and ID.

References

OpenFlow Switch Specification 1.3.2, pages 46-55

Classifier Stack

This version of OpenFlow can classify against port ID and up to 7 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifiers based on a Table StatsRes. The match bitmap will indicate if a particulare classifier is supported; the wildcard bitmask indicates which classifiers have masking capability. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure. Additionally, this version of Openflow allows for passing information between tables via the Metadata field. A classifier can match on a maskable metadata value, which can be used to partition classification between tables.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name OXM Name Mask Type
Port none Logical Port ID IN_PORT none
Physical Port ID IN_PHY_PORT none
Metadata METADATA bitmask
Tunnel ID TUNNEL_ID bitmask
Ethernet none Source MAC ETH_SRC bitmask
Destination MAC ETH_DST bitmask
Type/Length ETH_TYPE none
VLAN ID ETH_VLAN_VID bitmask
VLAN Priority ETH_VLAN_PCP none
ETH_TYPE = 0x88e7 Backbone Service Instance ID PBB_ISID bitmask
MPLS

ETH_TYPE = 0x8847 

or

ETH_TYPE = 0x8848

MPLS Label MPLS_LABEL none
MPLS Traffic Control MPLS_TC none
Bottom of Stack MPLS_BOS_BIT none
ARP ETH_TYPE = 0x0806 Opcode ARP_OP none
Sender Hardware Address ARP_SHA bitmask
Sender Protocol Address ARP_SPA bitmask
Target Hardware Address ARP_THA bitmask
Target Protocol Address ARP_TPA bitmask
IPv4 ETH_TYPE = 0x0800 DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV4_SRC bitmask
Destination Address IPV4_DST bitmask
IPv6 ETH_TYPE = 0x08dd DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV6_SRC bitmask
Destination Address IPV6_DST bitmask
Flow Label IPV6_FLABEL bitmask
Extension Header IPV6_EXTHDR bitmask
TCP IP_PROTO = 6 Source Port TCP_SRC none
Destination Port TCP_DST none
UDP IP_PROTO = 17 Source Port UDP_SRC none
Destination Port UDP_DST none
SCTP IP_PROTO = 132 Source Port SCTP_SRC none
Destination Port SCTP_DST none
ICMPv4 IP_PROTO = 1 Type ICMPV4_TYPE none
Code ICMPV4_CODE none
ICMPv6 IP_PROTO = 58 Type ICMPV6_TYPE none
Code ICMPV6_CODE none
ND Target Address IPV6_ND_TARGET none
ND Link-Layer Source IPV6_ND_SLL none
ND Link-Layer Target IPV6_ND_TLL none

Vendor/Experimenter Extensions

It is possible to have custom classifier extensions in this version of the the protocol. There are two mechanisms for carrying these extensions to a switch. First, the Experimenter message can be used to carry custom data. Second, the OXM Match structure contains an experimenter class definition. A custom structure could be defined using the Experimenter OXM and ID.

References

OpenFlow Switch Specification 1.3.3, pages 49-59

Classifier Stack

This version of OpenFlow can classify against port ID and up to 7 protocols. It is important to note that support for classifying on ARP values is not mandatory. A controller will only know if a switch supports the optional classifiers based on a Table StatsRes. The match bitmap will indicate if a particulare classifier is supported; the wildcard bitmask indicates which classifiers have masking capability. Classifiers installed in a switch by the FlowMod message, which carriers the classifier in the Match Structure. Additionally, this version of Openflow allows for passing information between tables via the Metadata field. A classifier can match on a maskable metadata value, which can be used to partition classification between tables.

Classifier Dependencies

Classifier Fields

Protocol Dependency Name OXM Name Mask Type
Port none Logical Port ID IN_PORT none
Physical Port ID IN_PHY_PORT none
Metadata METADATA bitmask
Tunnel ID TUNNEL_ID bitmask
Ethernet none Source MAC ETH_SRC bitmask
Destination MAC ETH_DST bitmask
Type/Length ETH_TYPE none
VLAN ID ETH_VLAN_VID bitmask
VLAN Priority ETH_VLAN_PCP none
ETH_TYPE = 0x88e7 Backbone Service Instance ID PBB_ISID bitmask
ETH_TYPE = 0x88e7 Use Customer Address PBB_UCA none
MPLS

ETH_TYPE = 0x8847 

or

ETH_TYPE = 0x8848

MPLS Label MPLS_LABEL none
MPLS Traffic Control MPLS_TC none
Bottom of Stack MPLS_BOS_BIT none
ARP ETH_TYPE = 0x0806 Opcode ARP_OP none
Sender Hardware Address ARP_SHA bitmask
Sender Protocol Address ARP_SPA bitmask
Target Hardware Address ARP_THA bitmask
Target Protocol Address ARP_TPA bitmask
IPv4 ETH_TYPE = 0x0800 DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV4_SRC bitmask
Destination Address IPV4_DST bitmask
IPv6 ETH_TYPE = 0x08dd DSCP IP_DSCP none
ECN IP_ECN none
Protocol IP_PROTO none
Source Address IPV6_SRC bitmask
Destination Address IPV6_DST bitmask
Flow Label IPV6_FLABEL bitmask
Extension Header IPV6_EXTHDR bitmask
TCP IP_PROTO = 6 Source Port TCP_SRC none
Destination Port TCP_DST none
UDP IP_PROTO = 17 Source Port UDP_SRC none
Destination Port UDP_DST none
SCTP IP_PROTO = 132 Source Port SCTP_SRC none
Destination Port SCTP_DST none
ICMPv4 IP_PROTO = 1 Type ICMPV4_TYPE none
Code ICMPV4_CODE none
ICMPv6 IP_PROTO = 58 Type ICMPV6_TYPE none
Code ICMPV6_CODE none
ND Target Address IPV6_ND_TARGET none
ND Link-Layer Source IPV6_ND_SLL none
ND Link-Layer Target IPV6_ND_TLL none

Vendor/Experimenter Extensions

It is possible to have custom classifier extensions in this version of the the protocol. There are two mechanisms for carrying these extensions to a switch. First, the Experimenter message can be used to carry custom data. Second, the OXM Match structure contains an experimenter class definition. A custom structure could be defined using the Experimenter OXM and ID.

References

OpenFlow Switch Specification 1.4.0, pages 51-60