This document aims to comprehensively document all of the fields, both standard and non-standard, supported by OpenFlow or Open vSwitch, regardless of origin46
A field is a property of a packet46 Most familiarly, data fields are fields that can be extracted from a packet46 Most data fields are copied directly from protocol headers, e46g46 at layer 2, the Ethernet source and destination addresses, or the VLAN ID; at layer 3, the IPv4 or IPv6 source and destination; and at layer 4, the TCP or UDP ports46 Other data fields are computed, e46g46 ip_frag describes whether a packet is a fragment but it is not copied directly from the IP header46
Data fields that are always present as a consequence of the basic networking technology in use are called called root fields46 Open vSwitch 2467 and earlier considered Ethernet fields to be root fields, and this remains the default mode of operation for Open vSwitch bridges46 When a packet is received from a non-Ethernet interfaces, such as a layer-3 LISP tunnel, Open vSwitch 2467 and earlier force-fit the packet to this Ethernet-centric point of view by pretending that an Ethernet header is present whose Ethernet type that indicates the packet's actual type (and whose source and destination addresses are all-zero)46
Open vSwitch 2468 and later implement the ``packet type-aware pipeline'' concept introduced in OpenFlow 146546 Such a pipeline does not have any root fields46 Instead, a new metadata field, packet_type, indicates the basic type of the packet, which can be Ethernet, IPv4, IPv6, or another type46 For backward compatibility, by default Open vSwitch 2468 imitates the behavior of Open vSwitch 2467 and earlier46 Later versions of Open vSwitch may change the default, and in the meantime controllers can turn off this legacy behavior, on a port-by-port basis, by setting options:packet_type to ptap in the Interface table46 This is significant only for ports that can handle non-Ethernet packets, which is currently just LISP, VXLAN-GPE, and GRE tunnel ports46 See ovs-vwitchd46conf46db(5) for more information46
Non-root data fields are not always present46 A packet contains ARP fields, for example, only when its packet type is ARP or when it is an Ethernet packet whose Ethernet header indicates the Ethertype for ARP, 0x080646 In this documentation, we say that a field is applicable when it is present in a packet, and inapplicable when it is not46 (These are not standard terms46) We refer to the conditions that determine whether a field is applicable as prerequisites46 Some VLAN-related fields are a special case: these fields are always applicable for Ethernet packets, but have a designated value or bit that indicates whether a VLAN header is present, with the remaining values or bits indicating the VLAN header's content (if it is present)46
An inapplicable field does not have a value, not even a nominal ``value'' such as all-zero-bits46 In many circumstances, OpenFlow and Open vSwitch allow references only to applicable fields46 For example, one may match (see Matching, below) a given field only if the match includes the field's prerequisite, e46g46 matching an ARP field is only allowed if one also matches on Ethertype 0x0806 or the packet_type for ARP in a packet type-aware bridge46
Sometimes a packet may contain multiple instances of a header46 For example, a packet may contain multiple VLAN or MPLS headers, and tunnels can cause any data field to recur46 OpenFlow and Open vSwitch do not address these cases uniformly46 For VLAN and MPLS headers, only the outermost header is accessible, so that inner headers may be accessed only by ``popping'' (removing) the outer header46 (Open vSwitch supports only a single VLAN header in any case46) For tunnels, e46g46 GRE or VXLAN, the outer header and inner headers are treated as different data fields46
Many network protocols are built in layers as a stack of concatenated headers46 Each header typically contains a ``next type'' field that indicates the type of the protocol header that follows, e46g46 Ethernet contains an Ethertype and IPv4 contains a IP protocol type46 The exceptional cases, where protocols are layered but an outer layer does not indicate the protocol type for the inner layer, or gives only an ambiguous indication, are troublesome46 An MPLS header, for example, only indicates whether another MPLS header or some other protocol follows, and in the latter case the inner protocol must be known from the context46 In these exceptional cases, OpenFlow and Open vSwitch cannot provide insight into the inner protocol data fields without additional context, and thus they treat all later data fields as inapplicable until an OpenFlow action explicitly specifies what protocol follows46 In the case of MPLS, the OpenFlow ``pop MPLS'' action that removes the last MPLS header from a packet provides this context, as the Ethertype of the payload46 See Layer 2465: MPLS for more information46
OpenFlow and Open vSwitch support some fields other than data fields46 Metadata fields relate to the origin or treatment of a packet, but they are not extracted from the packet data itself46 One example is the physical port on which a packet arrived at the switch46 Register fields act like variables: they give an OpenFlow switch space for temporary storage while processing a packet46 Existing metadata and register fields have no prerequisites46
A field's value consists of an integral number of bytes46 For data fields, sometimes those bytes are taken directly from the packet46 Other data fields are copied from a packet with padding (usually with zeros and in the most significant positions)46 The remaining data fields are transformed in other ways as they are copied from the packets, to make them more useful for matching46
The most important use of fields in OpenFlow is matching, to determine whether particular field values agree with a set of constraints called a match46 A match consists of zero or more constraints on individual fields, all of which must be met to satisfy the match46 (A match that contains no constraints is always satisfied46) OpenFlow and Open vSwitch support a number of forms of matching on individual fields:
Some types of matches on individual fields cannot be expressed directly with OpenFlow and Open vSwitch46 These can be expressed indirectly:
01111101000
11111001111
01111101xxx
0111111xxxx
10xxxxxxxxx
110xxxxxxxx
1110xxxxxxx
11110xxxxxx
1111100xxxx
tcp,tp_src=0x03e8/0xfff8
tcp,tp_src=0x03f0/0xfff0
tcp,tp_src=0x0400/0xfe00
tcp,tp_src=0x0600/0xff00
tcp,tp_src=0x0700/0xff80
tcp,tp_src=0x0780/0xffc0
tcp,tp_src=0x07c0/0xfff0
All of these supported forms of matching are special cases of bitwise matching46 In some cases this influences the design of field values46 ip_frag is the most prominent example: it is designed to make all of the practically useful checks for IP fragmentation possible as a single bitwise match46
Shorthands
Some matches are very commonly used, so Open vSwitch accepts shorthand notations46 In some cases, Open vSwitch also uses shorthand notations when it displays matches46 The following shorthands are defined, with their long forms shown on the right side:
The discussion so far applies to all OpenFlow and Open vSwitch versions46 This section starts to draw in specific information by explaining, in broad terms, the treatment of fields and matches in each OpenFlow version46
OpenFlow 1460
OpenFlow 1460 defined the OpenFlow protocol format of a match as a fixed-length data structure that could match on the following fields:
Each supported field corresponded to some member of the data structure46 Some members represented multiple fields, in the case of the TCP, UDP, ICMPv4, and ARP fields whose presence is mutually exclusive46 This also meant that some members were poor fits for their fields: only the low 8 bits of the 16-bit ARP opcode could be represented, and the ICMPv4 type and code were padded with 8 bits of zeros to fit in the 16-bit members primarily meant for TCP and UDP ports46 An additional bitmap member indicated, for each member, whether its field should be an ``exact'' or ``wildcarded'' match (see Matching), with additional support for CIDR prefix matching on the IPv4 source and destination fields46
Simplicity was recognized early on as the main virtue of this approach46 Obviously, any fixed-length data structure cannot support matching new protocols that do not fit46 There was no room, for example, for matching IPv6 fields, which was not a priority at the time46 Lack of room to support matching the Ethernet addresses inside ARP packets actually caused more of a design problem later, leading to an Open vSwitch extension action specialized for dropping ``spoofed'' ARP packets in which the frame and ARP Ethernet source addressed differed46 (This extension was never standardized46 Open vSwitch dropped support for it a few releases after it added support for full ARP matching46)
The design of the OpenFlow fixed-length matches also illustrates compromises, in both directions, between the strengths and weaknesses of software and hardware that have always influenced the design of OpenFlow46 Support for matching ARP fields that do fit in the data structure was only added late in the design process (and remained optional in OpenFlow 1460), for example, because common switch ASICs did not support matching these fields46
The compromises in favor of software occurred for more complicated reasons46 The OpenFlow designers did not know how to implement matching in software that was fast, dynamic, and general46 (A way was later found [Srinivasan]46) Thus, the designers sought to support dynamic, general matching that would be fast in realistic special cases, in particular when all of the matches were microflows, that is, matches that specify every field present in a packet, because such matches can be implemented as a single hash table lookup46 Contemporary research supported the feasibility of this approach: the number of microflows in a campus network had been measured to peak at about 10,000 [Casado, section 3462]46 (Calculations show that this can only be true in a lightly loaded network [Pepelnjak]46)
As a result, OpenFlow 1460 required switches to treat microflow matches as the highest possible priority46 This let software switches perform the microflow hash table lookup first46 Only on failure to match a microflow did the switch need to fall back to checking the more general and presumed slower matches46 Also, the OpenFlow 1460 flow match was minimally flexible, with no support for general bitwise matching, partly on the basis that this seemed more likely amenable to relatively efficient software implementation46 (CIDR masking for IPv4 addresses was added relatively late in the OpenFlow 1460 design process46)
Microflow matching was later discovered to aid some hardware implementations46 The TCAM chips used for matching in hardware do not support priority in the same way as OpenFlow but instead tie priority to ordering [Pagiamtzis]46 Thus, adding a new match with a priority between the priorities of existing matches can require reordering an arbitrary number of TCAM entries46 On the other hand, when microflows are highest priority, they can be managed as a set-aside portion of the TCAM entries46
The emphasis on matching microflows also led designers to carefully consider the bandwidth requirements between switch and controller: to maximize the number of microflow setups per second, one must minimize the size of each flow's description46 This favored the fixed-length format in use, because it expressed common TCP and UDP microflows in fewer bytes than more flexible ``type-length-value'' (TLV) formats46 (Early versions of OpenFlow also avoided TLVs in general to head off protocol fragmentation46)
Inapplicable Fields
OpenFlow 1460 does not clearly specify how to treat inapplicable fields46 The members for inapplicable fields are always present in the match data structure, as are the bits that indicate whether the fields are matched, and the ``correct'' member and bit values for inapplicable fields is unclear46 OpenFlow 1460 implementations changed their behavior over time as priorities shifted46 The early OpenFlow reference implementation, motivated to make every flow a microflow to enable hashing, treated inapplicable fields as exact matches on a value of 046 Initially, this behavior was implemented in the reference controller only46
Later, the reference switch was also changed to actually force any wildcarded inapplicable fields into exact matches on 046 The latter behavior sometimes caused problems, because the modified flow was the one reported back to the controller later when it queried the flow table, and the modifications sometimes meant that the controller could not properly recognize the flow that it had added46 In retrospect, perhaps this problem should have alerted the designers to a design error, but the ability to use a single hash table was held to be more important than almost every other consideration at the time46
When more flexible match formats were introduced much later, they disallowed any mention of inapplicable fields as part of a match46 This raised the question of how to translate between this new format and the OpenFlow 1460 fixed format46 It seemed somewhat inconsistent and backward to treat fields as exact-match in one format and forbid matching them in the other, so instead the treatment of inapplicable fields in the fixed-length format was changed from exact match on 0 to wildcarding46 (A better classifier had by now eliminated software performance problems with wildcards46)
The OpenFlow 1460461 errata (released only in 2012) added some additional explanation [OpenFlow 1460461, section 3464], but it did not mandate specific behavior because of variation among implementations46
OpenFlow 1461
The OpenFlow 1461 protocol match format was designed as a type/length/value (TLV) format to allow for future flexibility46 The specification standardized only a single type OFPMT_STANDARD (0) with a fixed-size payload, described here46 The additional fields and bitwise masks in OpenFlow 1461 cause this match structure to be over twice as large as in OpenFlow 1460, 88 bytes versus 4046
OpenFlow 1461 added support for the following fields:
OpenFlow 1461 increased the width of the ingress port number field (and all other port numbers in the protocol) from 16 bits to 32 bits46
OpenFlow 1461 increased matching flexibility by introducing arbitrary bitwise matching on Ethernet and IPv4 address fields and on the new ``metadata'' register field46 Switches were not required to support all possible masks [OpenFlow 1461, section 4463]46
By a strict reading of the specification, OpenFlow 1461 removed support for matching ICMPv4 type and code [OpenFlow 1461, section A462463], but this is likely an editing error because ICMP matching is described elsewhere [OpenFlow 1461, Table 3, Table 4, Figure 4]46 Open vSwitch does support ICMPv4 type and code matching with OpenFlow 146146
OpenFlow 1461 avoided the pitfalls of inapplicable fields that OpenFlow 1460 encountered, by requiring the switch to ignore the specified field values [OpenFlow 1461, section A462463]46 It also implied that the switch should ignore the bits that indicate whether to match inapplicable fields46
Physical Ingress Port
OpenFlow 1461 introduced a new pseudo-field, the physical ingress port46 The physical ingress port is only a pseudo-field because it cannot be used for matching46 It appears only one place in the protocol, in the ``packet-in'' message that passes a packet received at the switch to an OpenFlow controller46
A packet's ingress port and physical ingress port are identical except for packets processed by a switch feature such as bonding or tunneling that makes a packet appear to arrive on a ``virtual'' port associated with the bond or the tunnel46 For such packets, the ingress port is the virtual port and the physical ingress port is, naturally, the physical port46 Open vSwitch implements both bonding and tunneling, but its bonding implementation does not use virtual ports and its tunnels are typically not on the same OpenFlow switch as their physical ingress ports (which need not be part of any switch), so the ingress port and physical ingress port are always the same in Open vSwitch46
OpenFlow 1462
OpenFlow 1462 abandoned the fixed-length approach to matching46 One reason was size, since adding support for IPv6 address matching (now seen as important), with bitwise masks, would have added 64 bytes to the match length, increasing it from 88 bytes in OpenFlow 1461 to over 150 bytes46 Extensibility had also become important as controller writers increasingly wanted support for new fields without having to change messages throughout the OpenFlow protocol46 The challenges of carefully defining fixed-length matches to avoid problems with inapplicable fields had also become clear over time46
Therefore, OpenFlow 1462 adopted a flow format using a flexible type-length-value (TLV) representation, in which each TLV expresses a match on one field46 These TLVs were in turn encapsulated inside the outer TLV wrapper introduced in OpenFlow 1461 with the new identifier OFPMT_OXM (1)46 (This wrapper fulfilled its intended purpose of reducing the amount of churn in the protocol when changing match formats; some messages that included matches remained unchanged from OpenFlow 1461 to 1462 and later versions46)
OpenFlow 1462 added support for the following fields:
The OpenFlow 1462 format, called OXM (OpenFlow Extensible Match), was modeled closely on an extension to OpenFlow 1460 introduced in Open vSwitch 1461 called NXM (Nicira Extended Match)46 Each OXM or NXM TLV has the following format:
type
<---------------->
16 7 1 8 length bytes
+------------+-----+--+------+ +------------+
|vendor/class|field|HM|length| | body |
+------------+-----+--+------+ +------------+
The most significant 16 bits of the NXM or OXM header, called vendor by NXM and class by OXM, identify an organization permitted to allocate identifiers for fields46 NXM allocates only two vendors, 0x0000 for fields supported by OpenFlow 1460 and 0x0001 for fields implemented as an Open vSwitch extension46 OXM assigns classes as follows:
When class is 0xffff, the OXM header is extended to 64 bits by using the first 32 bits of the body as an experimenter field whose most significant byte is zero and whose remaining bytes are an Organizationally Unique Identifier (OUI) assigned by the IEEE [IEEE OUI], as shown below46
type experimenter
<----------> <---------->
16 7 1 8 8 24 (length - 4) bytes
+------+-----+--+------+ +------+-----+ +------------------+
|class |field|HM|length| | zero | OUI | | body |
+------+-----+--+------+ +------+-----+ +------------------+
0xffff 0x00
OpenFlow says that support for experimenter fields is optional46 Open vSwitch 2464 and later does support them, so that it can support the following experimenter classes:
Taken as a unit, class (or vendor), field, and experimenter (when present) uniquely identify a particular field46
When hasmask (abbreviated HM above) is 0, the OXM is an exact match on an entire field46 In this case, the body (excluding the experimenter field, if present) is a single value to be matched46
When hasmask is 1, the OXM is a bitwise match46 The body (excluding the experimenter field) consists of a value to match, followed by the bitwise mask to apply46 A 1-bit in the mask indicates that the corresponding bit in the value should be matched and a 0-bit that it should be ignored46 For example, for an IP address field, a value of 19246168460460 followed by a mask of 25546255460460 would match addresses in the 19646168460460/16 subnet46
The length identifies the number of bytes in the body, including the 4-byte experimenter header, if it is present46 Each OXM TLV has a fixed length; that is, given class, field, experimenter (if present), and hasmask, length is a constant46 The length is included explicitly to allow software to minimally parse OXM TLVs of unknown types46
OXM TLVs must be ordered so that a field's prerequisites are satisfied before it is parsed46 For example, an OXM TLV that matches on the IPv4 source address field is only allowed following an OXM TLV that matches on the Ethertype for IPv446 Similarly, an OXM TLV that matches on the TCP source port must follow a TLV that matches an Ethertype of IPv4 or IPv6 and one that matches an IP protocol of TCP (in that order)46 The order of OXM TLVs is not otherwise restricted; no canonical ordering is defined46
A given field may be matched only once in a series of OXM TLVs46
OpenFlow 1463
OpenFlow 1463 showed OXM to be largely successful, by adding new fields without making any changes to how flow matches otherwise worked46 It added OXMs for the following fields supported by Open vSwitch:
OpenFlow 1463 also added OXMs for the following fields not documented here and not yet implemented by Open vSwitch:
OpenFlow 1464
OpenFlow 1464 added OXMs for the following fields not documented here and not yet implemented by Open vSwitch:
OpenFlow 1465
OpenFlow 1465 added OXMs for the following fields supported by Open vSwitch:
The following sections document the fields that Open vSwitch supports46 Each section provides introductory material on a group of related fields, followed by information on each individual field46 In addition to field-specific information, each field begins with a table with entries for the following important properties:
Prefix | Vendor | Class |
NXM_OF | (none) | 0x0000 |
NXM_NX | (none) | 0x0001 |
ERICOXM_OF | (none) | 0x1000 |
OXM_OF | (none) | 0x8000 |
OXM_OF_PKT_REG | (none) | 0x8001 |
NXOXM_ET | 0x00002320 | 0xffff |
NXOXM_NSH | 0x005ad650 | 0xffff |
ONFOXM_ET | 0x4f4e4600 | 0xffff |
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
conj_id | 4 | no | no | none | OVS 2.4+ |
An individual OpenFlow flow can match only a single value for each field46 However, situations often arise where one wants to match one of a set of values within a field or fields46 For matching a single field against a set, it is straightforward and efficient to add multiple flows to the flow table, one for each value in the set46 For example, one might use the following flows to send packets with IP source address a, b, c, or d to the OpenFlow controller:
ip,ip_src=a actions=controller
ip,ip_src=b actions=controller
ip,ip_src=c actions=controller
ip,ip_src=d actions=controller
Similarly, these flows send packets with IP destination address e, f, g, or h to the OpenFlow controller:
ip,ip_dst=e actions=controller
ip,ip_dst=f actions=controller
ip,ip_dst=g actions=controller
ip,ip_dst=h actions=controller
Installing all of the above flows in a single flow table yields a disjunctive effect: a packet is sent to the controller if ip_src mo {a,b,c,d} or ip_dst mo {e,f,g,h} (or both)46 (Pedantically, if both of the above sets of flows are present in the flow table, they should have different priorities, because OpenFlow says that the results are undefined when two flows with same priority can both match a single packet46)
Suppose, on the other hand, one wishes to match conjunctively, that is, to send a packet to the controller only if both ip_src mo {a,b,c,d} and ip_dst mo {e,f,g,h}46 This requires 4 × 4 = 16 flows, one for each possible pairing of ip_src and ip_dst46 That is acceptable for our small example, but it does not gracefully extend to larger sets or greater numbers of dimensions46
The conjunction action is a solution for conjunctive matches that is built into Open vSwitch46 A conjunction action ties groups of individual OpenFlow flows into higher-level ``conjunctive flows''46 Each group corresponds to one dimension, and each flow within the group matches one possible value for the dimension46 A packet that matches one flow from each group matches the conjunctive flow46
To implement a conjunctive flow with conjunction, assign the conjunctive flow a 32-bit id, which must be unique within an OpenFlow table46 Assign each of the n ≥ 2 dimensions a unique number from 1 to n; the ordering is unimportant46 Add one flow to the OpenFlow flow table for each possible value of each dimension with conjunction(id, k/n) as the flow's actions, where k is the number assigned to the flow's dimension46 Together, these flows specify the conjunctive flow's match condition46 When the conjunctive match condition is met, Open vSwitch looks up one more flow that specifies the conjunctive flow's actions and receives its statistics46 This flow is found by setting conj_id to the specified id and then again searching the flow table46
The following flows provide an example46 Whenever the IP source is one of the values in the flows that match on the IP source (dimension 1 of 2), and the IP destination is one of the values in the flows that match on IP destination (dimension 2 of 2), Open vSwitch searches for a flow that matches conj_id against the conjunction ID (1234), finding the first flow listed below46
conj_id=1234 actions=controller
ip,ip_src=10460460461 actions=conjunction(1234, 1/2)
ip,ip_src=10460460464 actions=conjunction(1234, 1/2)
ip,ip_src=10460460466 actions=conjunction(1234, 1/2)
ip,ip_src=10460460467 actions=conjunction(1234, 1/2)
ip,ip_dst=10460460462 actions=conjunction(1234, 2/2)
ip,ip_dst=10460460465 actions=conjunction(1234, 2/2)
ip,ip_dst=10460460467 actions=conjunction(1234, 2/2)
ip,ip_dst=10460460468 actions=conjunction(1234, 2/2)
Many subtleties exist:
conj_id=1234,ip actions=mod_nw_src:1462463464,controller
conj_id=1234,tcp,tcp_dst=i actions=mod_nw_src:1462463464,controller
Conjunction ID Field
Name: | conj_id |
Width: | 32 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | none |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CONJ_ID (37) since Open vSwitch 2.4
|
Used for conjunctive matching46 See above for more information46
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
tun_id aka tunnel_id | 8 | yes | yes | none | OF 1.3+ and OVS 1.1+ | |
tun_src | 4 | yes | yes | none | OVS 2.0+ | |
tun_dst | 4 | yes | yes | none | OVS 2.0+ | |
tun_ipv6_src | 16 | yes | yes | none | OVS 2.5+ | |
tun_ipv6_dst | 16 | yes | yes | none | OVS 2.5+ | |
tun_gbp_id | 2 | yes | yes | none | OVS 2.4+ | |
tun_gbp_flags | 1 | yes | yes | none | OVS 2.4+ | |
tun_erspan_ver | 1 (low 4 bits) | yes | yes | none | OVS 2.10+ | |
tun_erspan_idx | 4 (low 20 bits) | yes | yes | none | OVS 2.10+ | |
tun_erspan_dir | 1 (low 1 bits) | yes | yes | none | OVS 2.10+ | |
tun_erspan_hwid | 1 (low 6 bits) | yes | yes | none | OVS 2.10+ | |
tun_metadata0 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata1 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata2 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata3 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata4 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata5 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata6 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata7 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata8 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata9 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata10 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata11 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata12 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata13 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata14 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata15 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata16 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata17 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata18 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata19 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata20 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata21 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata22 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata23 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata24 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata25 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata26 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata27 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata28 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata29 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata30 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata31 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata32 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata33 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata34 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata35 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata36 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata37 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata38 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata39 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata40 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata41 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata42 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata43 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata44 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata45 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata46 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata47 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata48 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata49 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata50 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata51 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata52 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata53 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata54 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata55 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata56 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata57 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata58 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata59 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata60 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata61 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata62 | 124 | yes | yes | none | OVS 2.5+ | |
tun_metadata63 | 124 | yes | yes | none | OVS 2.5+ | |
tun_flags | 2 (low 1 bits) | yes | yes | none | OVS 2.5+ |
The fields in this group relate to tunnels, which Open vSwitch supports in several forms (GRE, VXLAN, and so on)46 Most of these fields do appear in the wire format of a packet, so they are data fields from that point of view, but they are metadata from an OpenFlow flow table point of view because they do not appear in packets that are forwarded to the controller or to ordinary (non-tunnel) output ports46
Open vSwitch supports a spectrum of usage models for mapping tunnels to OpenFlow ports:
ovs-vsctl add-br br-int
ovs-vsctl add-port br-int tap0 -- set interface tap0 ofport_request=1
ovs-vsctl add-port br-int gre0 -- \
set interface gre0 ofport_request=2 type=gre \
options:remote_ip=19246168461461 options:key=5001
ovs-ofctl add-flow br-int in_port=1,actions=2
ovs-ofctl add-flow br-int in_port=2,actions=1
ovs-vsctl add-br br-int
ovs-vsctl add-port br-int tap0 -- set interface tap0 ofport_request=1
ovs-vsctl add-port br-int allgre -- \
set interface allgre ofport_request=3 type=gre \
options:remote_ip=flow options:key=flow
ovs-ofctl add-flow br-int \
'in_port=1 actions=set_tunnel:5001,set_field:19246168461461->tun_dst,3'
ovs-ofctl add-flow br-int 'in_port=3,tun_src=19246168461461,tun_id=5001 actions=1'
ovs-vswitchd46conf46db(5) describes all the details of tunnel configuration46
These fields do not have any prerequisites, which means that a flow may match on any or all of them, in any combination46
These fields are zeros for packets that did not arrive on a tunnel46
Tunnel ID Field
Name: | tun_id (aka tunnel_id) |
Width: | 64 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_TUNNEL_ID (38) since OpenFlow 1.3 and Open vSwitch 1.10
|
NXM: |
NXM_NX_TUN_ID (16) since Open vSwitch 1.1
|
Many kinds of tunnels support a tunnel ID:
When a packet is received from a tunnel, this field holds the tunnel ID in its least significant bits, zero-extended to fit46 This field is zero if the tunnel does not support an ID, or if no ID is in use for a tunnel type that has an optional ID, or if an ID of zero received, or if the packet was not received over a tunnel46
When a packet is output to a tunnel port, the tunnel configuration determines whether the tunnel ID is taken from this field or bound to a fixed value46 See the earlier description of ``port-based'' and ``flow-based'' tunnels for more information46
The following diagram shows the origin of this field in a typical keyed GRE tunnel:
Ethernet IPv4 GRE Ethernet
<-----------> <---------------> <------------> <---------->
48 48 16 8 32 32 16 16 32 48 48 16
+---+---+-----+ +---+-----+---+---+ +---+------+---+ +---+---+----+
|dst|src|type | |...|proto|src|dst| |...| type |key| |dst|src|type| ...
+---+---+-----+ +---+-----+---+---+ +---+------+---+ +---+---+----+
0x800 47 0x6558
Tunnel IPv4 Source Field
Name: | tun_src |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_IPV4_SRC (31) since Open vSwitch 2.0
|
When a packet is received from a tunnel, this field is the source address in the outer IP header of the tunneled packet46 This field is zero if the packet was not received over a tunnel46
When a packet is output to a flow-based tunnel port, this field influences the IPv4 source address used to send the packet46 If it is zero, then the kernel chooses an appropriate IP address based using the routing table46
The following diagram shows the origin of this field in a typical keyed GRE tunnel:
Ethernet IPv4 GRE Ethernet
<-----------> <---------------> <------------> <---------->
48 48 16 8 32 32 16 16 32 48 48 16
+---+---+-----+ +---+-----+---+---+ +---+------+---+ +---+---+----+
|dst|src|type | |...|proto|src|dst| |...| type |key| |dst|src|type| ...
+---+---+-----+ +---+-----+---+---+ +---+------+---+ +---+---+----+
0x800 47 0x6558
Tunnel IPv4 Destination Field
Name: | tun_dst |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_IPV4_DST (32) since Open vSwitch 2.0
|
When a packet is received from a tunnel, this field is the destination address in the outer IP header of the tunneled packet46 This field is zero if the packet was not received over a tunnel46
When a packet is output to a flow-based tunnel port, this field specifies the destination to which the tunnel packet is sent46
The following diagram shows the origin of this field in a typical keyed GRE tunnel:
Ethernet IPv4 GRE Ethernet
<-----------> <---------------> <------------> <---------->
48 48 16 8 32 32 16 16 32 48 48 16
+---+---+-----+ +---+-----+---+---+ +---+------+---+ +---+---+----+
|dst|src|type | |...|proto|src|dst| |...| type |key| |dst|src|type| ...
+---+---+-----+ +---+-----+---+---+ +---+------+---+ +---+---+----+
0x800 47 0x6558
Tunnel IPv6 Source Field
Name: | tun_ipv6_src |
Width: | 128 bits |
Format: | IPv6 |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_IPV6_SRC (109) since Open vSwitch 2.5
|
Similar to tun_src, but for tunnels over IPv646
Tunnel IPv6 Destination Field
Name: | tun_ipv6_dst |
Width: | 128 bits |
Format: | IPv6 |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_IPV6_DST (110) since Open vSwitch 2.5
|
Similar to tun_dst, but for tunnels over IPv646
The VXLAN header is defined as follows [RFC 7348], where the I bit must be set to 1, unlabeled bits or those labeled reserved must be set to 0, and Open vSwitch makes the VNI available via tun_id:
VXLAN flags
<------------->
1 1 1 1 1 1 1 1 24 24 8
+-+-+-+-+-+-+-+-+--------+---+--------+
| | | | |I| | | |reserved|VNI|reserved|
+-+-+-+-+-+-+-+-+--------+---+--------+
VXLAN Group-Based Policy [VXLAN Group Policy Option] adds new interpretations to existing bits in the VXLAN header, reinterpreting it as follows, with changes highlighted:
GBP flags
<------------->
1 1 1 1 1 1 1 1 24 24 8
+-+-+-+-+-+-+-+-+---------------+---+--------+
| |D| | |A| | | |group policy ID|VNI|reserved|
+-+-+-+-+-+-+-+-+---------------+---+--------+
Open vSwitch makes GBP fields and flags available through the following fields46 Only packets that arrive over a VXLAN tunnel with the GBP extension enabled have these fields set46 In other packets they are zero on receive and ignored on transmit46
VXLAN Group-Based Policy ID Field
Name: | tun_gbp_id |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_GBP_ID (38) since Open vSwitch 2.4
|
For a packet tunneled over VXLAN with the Group-Based Policy (GBP) extension, this field represents the GBP policy ID, as shown above46
VXLAN Group-Based Policy Flags Field
Name: | tun_gbp_flags |
Width: | 8 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_GBP_FLAGS (39) since Open vSwitch 2.4
|
For a packet tunneled over VXLAN with the Group-Based Policy (GBP) extension, this field represents the GBP policy flags, as shown above46
The field has the format shown below:
GBP Flags
<------------->
1 1 1 1 1 1 1 1
+-+-+-+-+-+-+-+-+
| |D| | |A| | | |
+-+-+-+-+-+-+-+-+
Unlabeled bits are reserved and must be transmitted as 046 The VXLAN GBP draft defines the other bits' meanings as:
These fields provide access to features in the ERSPAN tunneling protocol [ERSPAN], which has two major versions: version 1 (aka type II) and version 2 (aka type III)46
Regardless of version, ERSPAN is encapsulated within a fixed 8-byte GRE header that consists of a 4-byte GRE base header and a 4-byte sequence number46 The ERSPAN version 1 header format is:
GRE ERSPAN v1 Ethernet
<------------> <---------------------> <---------->
16 16 32 4 18 10 12 20 48 48 16
+---+------+---+ +---+---+-------+---+---+ +---+---+----+
|...| type |seq| |ver|...|session|...|idx| |dst|src|type| ...
+---+------+---+ +---+---+-------+---+---+ +---+---+----+
0x88be 1 tun_id
The ERSPAN version 2 header format is:
GRE ERSPAN v2 Ethernet
<------------> <----------------------------------------> <---------->
16 16 32 4 18 10 32 22 6 1 3 48 48 16
+---+------+---+ +---+---+-------+---------+---+----+---+---+ +---+---+----+
|...| type |seq| |ver|...|session|timestamp|...|hwid|dir|...| |dst|src|type| ...
+---+------+---+ +---+---+-------+---------+---+----+---+---+ +---+---+----+
0x22eb 2 tun_id 0/1
ERSPAN Version Field
Name: | tun_erspan_ver |
Width: | 8 bits (only the least-significant 4 bits may be nonzero) |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_ET_ERSPAN_VER (12) since Open vSwitch 2.10
|
ERSPAN version number: 1 for version 1, or 2 for version 246
ERSPAN Index Field
Name: | tun_erspan_idx |
Width: | 32 bits (only the least-significant 20 bits may be nonzero) |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_ET_ERSPAN_IDX (11) since Open vSwitch 2.10
|
This field is a 20-bit index/port number associated with the ERSPAN traffic's source port and direction (ingress/egress)46 This field is platform dependent46
ERSPAN Direction Field
Name: | tun_erspan_dir |
Width: | 8 bits (only the least-significant 1 bits may be nonzero) |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_ET_ERSPAN_DIR (13) since Open vSwitch 2.10
|
For ERSPAN v2, the mirrored traffic's direction: 0 for ingress traffic, 1 for egress traffic46
ERSPAN Hardware ID Field
Name: | tun_erspan_hwid |
Width: | 8 bits (only the least-significant 6 bits may be nonzero) |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_ET_ERSPAN_HWID (14) since Open vSwitch 2.10
|
A 6-bit unique identifier of an ERSPAN v2 engine within a system46
These fields provide access to additional features in the Geneve tunneling protocol [Geneve]46 Their names are somewhat generic in the hope that the same fields could be reused for other protocols in the future; for example, the NSH protocol [NSH] supports TLV options whose form is identical to that for Geneve options46
Generic Tunnel Option 0 Field
Name: | tun_metadata0 |
Width: | 992 bits (124 bytes) |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_METADATA0 (40) since Open vSwitch 2.5
|
The above information specifically covers generic tunnel option 0, but Open vSwitch supports 64 options, numbered 0 through 63, whose NXM field numbers are 40 through 10346
These fields provide OpenFlow access to the generic type-length-value options defined by the Geneve tunneling protocol or other protocols with options in the same TLV format as Geneve options46 Each of these options has the following wire format:
header body
<-------------------> <------------------>
16 8 3 5 4×(length - 1) bytes
+-----+----+---+------+--------------------+
|class|type|res|length| value |
+-----+----+---+------+--------------------+
0
Taken together, the class and type in the option format mean that there are about 16 million distinct kinds of TLV options, too many to give individual OXM code points46 Thus, Open vSwitch requires the user to define the TLV options of interest, by binding up to 64 TLV options to generic tunnel option NXM code points46 Each option may have up to 124 bytes in its body, the maximum allowed by the TLV format, but bound options may total at most 252 bytes of body46
Open vSwitch extensions to the OpenFlow protocol bind TLV options to NXM code points46 The ovs-ofctl(8) program offers one way to use these extensions, e46g46 to configure a mapping from a TLV option with class 0xffff, type 0, and a body length of 4 bytes:
ovs-ofctl add-tlv-map br0 "{class=0xffff,type=0,len=4}->tun_metadata0"
Once a TLV option is properly bound, it can be accessed and modified like any other field, e46g46 to send packets that have value 1234 for the option described above to the controller:
ovs-ofctl add-flow br0 tun_metadata0=1234,actions=controller
An option not received or not bound is matched as all zeros46
Tunnel Flags Field
Name: | tun_flags |
Width: | 16 bits (only the least-significant 1 bits may be nonzero) |
Format: | tunnel flags |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_TUN_FLAGS (104) since Open vSwitch 2.5
|
Flags indicating various aspects of the tunnel encapsulation46
Matches on this field are most conveniently written in terms of symbolic names (given in the diagram below), each preceded by either + for a flag that must be set, or - for a flag that must be unset, without any other delimiters between the flags46 Flags not mentioned are wildcarded46 For example, tun_flags=+oam matches only OAM packets46 Matches can also be written as flags/mask, where flags and mask are 16-bit numbers in decimal or in hexadecimal prefixed by 0x46
Currently, only one flag is defined:
The switch may reject matches against unknown flags46
Newer versions of Open vSwitch may introduce additional flags with new meanings46 It is therefore not recommended to use an exact match on this field since the behavior of these new flags is unknown and should be ignored46
For non-tunneled packets, the value is 046
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
in_port | 2 | no | yes | none | OVS 1.1+ | |
in_port_oxm | 4 | no | yes | none | OF 1.2+ and OVS 1.7+ | |
skb_priority | 4 | no | no | none | ||
pkt_mark | 4 | yes | yes | none | OVS 2.0+ | |
actset_output | 4 | no | no | none | OF 1.3+ and OVS 2.4+ | |
packet_type | 4 | no | no | none | OF 1.5+ and OVS 2.8+ |
These fields relate to the origin or treatment of a packet, but they are not extracted from the packet data itself46
Ingress Port Field
Name: | in_port |
Width: | 16 bits |
Format: | OpenFlow 1.0 port |
Masking: | not maskable |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
none
|
NXM: |
NXM_OF_IN_PORT (0) since Open vSwitch 1.1
|
The OpenFlow port on which the packet being processed arrived46 This is a 16-bit field that holds an OpenFlow 1460 port number46 For receiving a packet, the only values that appear in this field are:
Values not mentioned above will never appear when receiving a packet, including the following notable values:
Values that will never appear when receiving a packet may still be matched against in the flow table46 There are still circumstances in which those flows can be matched:
This field is heavily used for matching in OpenFlow tables, but for packet egress, it has only very limited roles:
in_port=1,actions=1
in_port=1,actions=drop
Because the ingress port field has so little influence on packet processing, it does not ordinarily make sense to modify the ingress port field46 The field is writable only to support the occasional use case where the ingress port's roles in packet egress, described above, become troublesome46 For example, actions=load:0->NXM_OF_IN_PORT[],output:123 will output to port 123 regardless of whether it is in the ingress port46 If the ingress port is important, then one may save and restore it on the stack:
actions=push:NXM_OF_IN_PORT[],load:0->NXM_OF_IN_PORT[],output:123,pop:NXM_OF_IN_PORT[]
or, in Open vSwitch 2467 or later, use the clone action to save and restore it:
actions=clone(load:0->NXM_OF_IN_PORT[],output:123)
The ability to modify the ingress port is an Open vSwitch extension to OpenFlow46
OXM Ingress Port Field
Name: | in_port_oxm |
Width: | 32 bits |
Format: | OpenFlow 1.1+ port |
Masking: | not maskable |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_IN_PORT (0) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
none
|
OpenFlow 1461 and later use a 32-bit port number, so this field supplies a 32-bit view of the ingress port46 Current versions of Open vSwitch support only a 16-bit range of ports:
in_port and in_port_oxm are two views of the same information, so all of the comments on in_port apply to in_port_oxm too46 Modifying in_port changes in_port_oxm, and vice versa46
Setting in_port_oxm to an unsupported value yields unspecified behavior46
Output Queue Field
Name: | skb_priority |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | not maskable |
Prerequisites: | none |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
none
|
Future Directions: Open vSwitch implements the output queue as a field, but does not currently expose it through OXM or NXM for matching purposes46 If this turns out to be a useful feature, it could be implemented in future versions46 Only the set_queue, enqueue, and pop_queue actions currently influence the output queue46
This field influences how packets in the flow will be queued, for quality of service (QoS) purposes, when they egress the switch46 Its range of meaningful values, and their meanings, varies greatly from one OpenFlow implementation to another46 Even within a single implementation, there is no guarantee that all OpenFlow ports have the same queues configured or that all OpenFlow ports in an implementation can be configured the same way queue-wise46
Configuring queues on OpenFlow is not well standardized46 On Linux, Open vSwitch supports queue configuration via OVSDB, specifically the QoS and Queue tables (see ovs-vswitchd46conf46db(5) for details)46 Ports of Open vSwitch to other platforms might require queue configuration through some separate protocol (such as a CLI)46 Even on Linux, Open vSwitch exposes only a fraction of the kernel's queuing features through OVSDB, so advanced or unusual uses might require use of separate utilities (e46g46 tc)46 OpenFlow switches other than Open vSwitch might use OF-CONFIG or any of the configuration methods mentioned above46 Finally, some OpenFlow switches have a fixed number of fixed-function queues (e46g46 eight queues with strictly defined priorities) and others do not support any control over queuing46
The only output queue that all OpenFlow implementations must support is zero, to identify a default queue, whose properties are implementation-defined46 Outputting a packet to a queue that does not exist on the output port yields unpredictable behavior: among the possibilities are that the packet might be dropped or transmitted with a very high or very low priority46
OpenFlow 1460 only allowed output queues to be specified as part of an enqueue action that specified both a queue and an output port46 That is, OpenFlow 1460 treats the queue as an argument to an action, not as a field46
To increase flexibility, OpenFlow 1461 added an action to set the output queue46 This model was carried forward, without change, through OpenFlow 146546
Open vSwitch implements the native queuing model of each OpenFlow version it supports46 Open vSwitch also includes an extension for setting the output queue as an action in OpenFlow 146046
When a packet ingresses into an OpenFlow switch, the output queue is ordinarily set to 0, indicating the default queue46 However, Open vSwitch supports various ways to forward a packet from one OpenFlow switch to another within a single host46 In these cases, Open vSwitch maintains the output queue across the forwarding step46 For example:
Packet Mark Field
Name: | pkt_mark |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_PKT_MARK (33) since Open vSwitch 2.0
|
Packet mark comes to Open vSwitch from the Linux kernel, in which the sk_buff data structure that represents a packet contains a 32-bit member named skb_mark46 The value of skb_mark propagates along with the packet it accompanies wherever the packet goes in the kernel46 It has no predefined semantics but various kernel-user interfaces can set and match on it, which makes it suitable for ``marking'' packets at one point in their handling and then acting on the mark later46 With iptables, for example, one can mark some traffic specially at ingress and then handle that traffic differently at egress based on the marked value46
Packet mark is an attempt at a generalization of the skb_mark concept beyond Linux, at least through more generic naming46 Like skb_priority, packet mark is preserved across forwarding steps within a machine46 Unlike skb_priority, packet mark has no direct effect on packet forwarding: the value set in packet mark does not matter unless some later OpenFlow table or switch matches on packet mark, or unless the packet passes through some other kernel subsystem that has been configured to interpret packet mark in specific ways, e46g46 through iptables configuration mentioned above46
Preserving packet mark across kernel forwarding steps relies heavily on kernel support, which ports to non-Linux operating systems may not have46 Regardless of operating system support, Open vSwitch supports packet mark within a single bridge and across patch ports46
The value of packet mark when a packet ingresses into the first Open vSwich bridge is typically zero, but it could be nonzero if its value was previously set by some kernel subsystem46
Action Set Output Port Field
Name: | actset_output |
Width: | 32 bits |
Format: | OpenFlow 1.1+ port |
Masking: | not maskable |
Prerequisites: | none |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
ONFOXM_ET_ACTSET_OUTPUT (43) since OpenFlow 1.3 and Open vSwitch 2.459 OXM_OF_ACTSET_OUTPUT (43) since OpenFlow 1.5 and Open vSwitch 2.4
|
NXM: |
none
|
Holds the output port currently in the OpenFlow action set (i46e46 from an output action within a write_actions instruction)46 Its value is an OpenFlow port number46 If there is no output port in the OpenFlow action set, or if the output port will be ignored (e46g46 because there is an output group in the OpenFlow action set), then the value will be OFPP_UNSET46
Open vSwitch allows any table to match this field46 OpenFlow, however, only requires this field to be matchable from within an OpenFlow egress table (a feature that Open vSwitch does not yet implement)46
Packet Type Field
Name: | packet_type |
Width: | 32 bits |
Format: | packet type |
Masking: | not maskable |
Prerequisites: | none |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_PACKET_TYPE (44) since OpenFlow 1.5 and Open vSwitch 2.8
|
NXM: |
none
|
The type of the packet in the format specified in OpenFlow 1465:
Packet type
<--------->
16 16
+---+-------+
|ns |ns_type| ...
+---+-------+
The upper 16 bits, ns, are a namespace46 The meaning of ns_type depends on the namespace46 The packet type field is specified and displayed in the format (ns,ns_type)46
Open vSwitch currently supports the following classes of packet types for matching:
Consider the distinction between a packet with packet_type=(0,0), dl_type=0x800 and one with packet_type=(1,0x800)46 The former is an Ethernet frame that contains an IPv4 packet, like this:
Ethernet IPv4
<-----------> <--------------->
48 48 16 8 32 32
+---+---+-----+ +---+-----+---+---+
|dst|src|type | |...|proto|src|dst| ...
+---+---+-----+ +---+-----+---+---+
0x800
The latter is an IPv4 packet not encapsulated inside any outer frame, like this:
IPv4
<--------------->
8 32 32
+---+-----+---+---+
|...|proto|src|dst| ...
+---+-----+---+---+
Matching on packet_type is a pre-requisite for matching on any data field, but for backward compatibility, when a match on a data field is present without a packet_type match, Open vSwitch acts as though a match on (0,0) (Ethernet) had been supplied46 Similarly, when Open vSwitch sends flow match information to a controller, e46g46 in a reply to a request to dump the flow table, Open vSwitch omits a match on packet type (0,0) if it would be implied by a data field match46
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
ct_state | 4 | yes | no | none | OVS 2.5+ | |
ct_zone | 2 | no | no | none | OVS 2.5+ | |
ct_mark | 4 | yes | yes | none | OVS 2.5+ | |
ct_label | 16 | yes | yes | none | OVS 2.5+ | |
ct_nw_src | 4 | yes | no | CT | OVS 2.8+ | |
ct_nw_dst | 4 | yes | no | CT | OVS 2.8+ | |
ct_ipv6_src | 16 | yes | no | CT | OVS 2.8+ | |
ct_ipv6_dst | 16 | yes | no | CT | OVS 2.8+ | |
ct_nw_proto | 1 | no | no | CT | OVS 2.8+ | |
ct_tp_src | 2 | yes | no | CT | OVS 2.8+ | |
ct_tp_dst | 2 | yes | no | CT | OVS 2.8+ |
Open vSwitch supports ``connection tracking,'' which allows bidirectional streams of packets to be statefully grouped into connections46 Open vSwitch connection tracking, for example, identifies the patterns of TCP packets that indicates a successfully initiated connection, as well as those that indicate that a connection has been torn down46 Open vSwitch connection tracking can also identify related connections, such as FTP data connections spawned from FTP control connections46
An individual packet passing through the pipeline may be in one of two states, ``untracked'' or ``tracked,'' which may be distinguished via the ``trk'' flag in ct_state46 A packet is untracked at the beginning of the Open vSwitch pipeline and continues to be untracked until the pipeline invokes the ct action46 The connection tracking fields are all zeroes in an untracked packet46 When a flow in the Open vSwitch pipeline invokes the ct action, the action initializes the connection tracking fields and the packet becomes tracked for the remainder of its processing46
The connection tracker stores connection state in an internal table, but it only adds a new entry to this table when a ct action for a new connection invokes ct with the commit parameter46 For a given connection, when a pipeline has executed ct, but not yet with commit, the connection is said to be uncommitted46 State for an uncommitted connection is ephemeral and does not persist past the end of the pipeline, so some features are only available to committed connections46 A connection would typically be left uncommitted as a way to drop its packets46
Connection tracking is an Open vSwitch extension to OpenFlow46 Open vSwitch 2465 added the initial support for connection tracking46 Subsequent versions of Open vSwitch added many refinements and extensions to the initial support46 Many of these capabilities depend on the Open vSwitch datapath rather than simply the userspace version46 The capabilities column in the Datapath table (see ovs-vswitchd46conf46db(5)) reports the detailed capabilities of a particular Open vSwitch datapath46
Connection Tracking State Field
Name: | ct_state |
Width: | 32 bits |
Format: | ct state |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_STATE (105) since Open vSwitch 2.5
|
This field holds several flags that can be used to determine the state of the connection to which the packet belongs46
Matches on this field are most conveniently written in terms of symbolic names (listed below), each preceded by either + for a flag that must be set, or - for a flag that must be unset, without any other delimiters between the flags46 Flags not mentioned are wildcarded46 For example, tcp,ct_state=+trk-new matches TCP packets that have been run through the connection tracker and do not establish a new connection46 Matches can also be written as flags/mask, where flags and mask are 32-bit numbers in decimal or in hexadecimal prefixed by 0x46
The following flags are defined:
There are additional constraints on these flags, listed in decreasing order of precedence below:
Future versions of Open vSwitch may define new flags46
Connection Tracking Zone Field
Name: | ct_zone |
Width: | 16 bits |
Format: | hexadecimal |
Masking: | not maskable |
Prerequisites: | none |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_ZONE (106) since Open vSwitch 2.5
|
A connection tracking zone, the zone value passed to the most recent ct action46 Each zone is an independent connection tracking context, so tracking the same packet in multiple contexts requires using the ct action multiple times46
Connection Tracking Mark Field
Name: | ct_mark |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_MARK (107) since Open vSwitch 2.5
|
The metadata committed, by an action within the exec parameter to the ct action, to the connection to which the current packet belongs46
Connection Tracking Label Field
Name: | ct_label |
Width: | 128 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_LABEL (108) since Open vSwitch 2.5
|
The label committed, by an action within the exec parameter to the ct action, to the connection to which the current packet belongs46
Open vSwitch 2468 introduced the matching support for connection tracker original direction 5-tuple fields46
For non-committed non-related connections the conntrack original direction tuple fields always have the same values as the corresponding headers in the packet itself46 For any other packets of a committed connection the conntrack original direction tuple fields reflect the values from that initial non-committed non-related packet, and thus may be different from the actual packet headers, as the actual packet headers may be in reverse direction (for reply packets), transformed by NAT (when nat option was applied to the connection), or be of different protocol (i46e46, when an ICMP response is sent to an UDP packet)46 In case of related connections, e46g46, an FTP data connection, the original direction tuple contains the original direction headers from the master connection, e46g46, an FTP control connection46
The following fields are populated by the ct action, and require a match to a valid connection tracking state as a prerequisite, in addition to the IP or IPv6 ethertype match46 Examples of valid connection tracking state matches include ct_state=+new, ct_state=+est, ct_state=+rel, and ct_state=+trk-inv46
Connection Tracking Original Direction IPv4 Source Address Field
Name: | ct_nw_src |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | CT |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_NW_SRC (120) since Open vSwitch 2.8
|
Matches IPv4 conntrack original direction tuple source address46 See the paragraphs above for general description to the conntrack original direction tuple46 Introduced in Open vSwitch 246846
Connection Tracking Original Direction IPv4 Destination Address Field
Name: | ct_nw_dst |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | CT |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_NW_DST (121) since Open vSwitch 2.8
|
Matches IPv4 conntrack original direction tuple destination address46 See the paragraphs above for general description to the conntrack original direction tuple46 Introduced in Open vSwitch 246846
Connection Tracking Original Direction IPv6 Source Address Field
Name: | ct_ipv6_src |
Width: | 128 bits |
Format: | IPv6 |
Masking: | arbitrary bitwise masks |
Prerequisites: | CT |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_IPV6_SRC (122) since Open vSwitch 2.8
|
Matches IPv6 conntrack original direction tuple source address46 See the paragraphs above for general description to the conntrack original direction tuple46 Introduced in Open vSwitch 246846
Connection Tracking Original Direction IPv6 Destination Address Field
Name: | ct_ipv6_dst |
Width: | 128 bits |
Format: | IPv6 |
Masking: | arbitrary bitwise masks |
Prerequisites: | CT |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_IPV6_DST (123) since Open vSwitch 2.8
|
Matches IPv6 conntrack original direction tuple destination address46 See the paragraphs above for general description to the conntrack original direction tuple46 Introduced in Open vSwitch 246846
Connection Tracking Original Direction IP Protocol Field
Name: | ct_nw_proto |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | CT |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_NW_PROTO (119) since Open vSwitch 2.8
|
Matches conntrack original direction tuple IP protocol type, which is specified as a decimal number between 0 and 255, inclusive (e46g46 1 to match ICMP packets or 6 to match TCP packets)46 In case of, for example, an ICMP response to an UDP packet, this may be different from the IP protocol type of the packet itself46 See the paragraphs above for general description to the conntrack original direction tuple46 Introduced in Open vSwitch 246846
Connection Tracking Original Direction Transport Layer Source Port Field
Name: | ct_tp_src |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | CT |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_TP_SRC (124) since Open vSwitch 2.8
|
Bitwise match on the conntrack original direction tuple transport source, when MFF_CT_NW_PROTO has value 6 for TCP, 17 for UDP, or 132 for SCTP46 When MFF_CT_NW_PROTO has value 1 for ICMP, or 58 for ICMPv6, the lower 8 bits of MFF_CT_TP_SRC matches the conntrack original direction ICMP type46 See the paragraphs above for general description to the conntrack original direction tuple46 Introduced in Open vSwitch 246846
Connection Tracking Original Direction Transport Layer Source Port Field
Name: | ct_tp_dst |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | CT |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_CT_TP_DST (125) since Open vSwitch 2.8
|
Bitwise match on the conntrack original direction tuple transport destination port, when MFF_CT_NW_PROTO has value 6 for TCP, 17 for UDP, or 132 for SCTP46 When MFF_CT_NW_PROTO has value 1 for ICMP, or 58 for ICMPv6, the lower 8 bits of MFF_CT_TP_DST matches the conntrack original direction ICMP code46 See the paragraphs above for general description to the conntrack original direction tuple46 Introduced in Open vSwitch 246846
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
metadata | 8 | yes | yes | none | OF 1.2+ and OVS 1.8+ | |
reg0 | 4 | yes | yes | none | OVS 1.1+ | |
reg1 | 4 | yes | yes | none | OVS 1.1+ | |
reg2 | 4 | yes | yes | none | OVS 1.1+ | |
reg3 | 4 | yes | yes | none | OVS 1.1+ | |
reg4 | 4 | yes | yes | none | OVS 1.3+ | |
reg5 | 4 | yes | yes | none | OVS 1.7+ | |
reg6 | 4 | yes | yes | none | OVS 1.7+ | |
reg7 | 4 | yes | yes | none | OVS 1.7+ | |
reg8 | 4 | yes | yes | none | OVS 2.6+ | |
reg9 | 4 | yes | yes | none | OVS 2.6+ | |
reg10 | 4 | yes | yes | none | OVS 2.6+ | |
reg11 | 4 | yes | yes | none | OVS 2.6+ | |
reg12 | 4 | yes | yes | none | OVS 2.6+ | |
reg13 | 4 | yes | yes | none | OVS 2.6+ | |
reg14 | 4 | yes | yes | none | OVS 2.6+ | |
reg15 | 4 | yes | yes | none | OVS 2.6+ | |
xreg0 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xreg1 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xreg2 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xreg3 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xreg4 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xreg5 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xreg6 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xreg7 | 8 | yes | yes | none | OF 1.3+ and OVS 2.4+ | |
xxreg0 | 16 | yes | yes | none | OVS 2.6+ | |
xxreg1 | 16 | yes | yes | none | OVS 2.6+ | |
xxreg2 | 16 | yes | yes | none | OVS 2.6+ | |
xxreg3 | 16 | yes | yes | none | OVS 2.6+ |
These fields give an OpenFlow switch space for temporary storage while the pipeline is running46 Whereas metadata fields can have a meaningful initial value and can persist across some hops across OpenFlow switches, registers are always initially 0 and their values never persist across inter-switch hops (not even across patch ports)46
OpenFlow Metadata Field
Name: | metadata |
Width: | 64 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | yes |
OXM: |
OXM_OF_METADATA (2) since OpenFlow 1.2 and Open vSwitch 1.8
|
NXM: |
none
|
This field is the oldest standardized OpenFlow register field, introduced in OpenFlow 146146 It was introduced to model the limited number of user-defined bits that some ASIC-based switches can carry through their pipelines46 Because of hardware limitations, OpenFlow allows switches to support writing and masking only an implementation-defined subset of bits, even no bits at all46 The Open vSwitch software switch always supports all 64 bits, but of course an Open vSwitch port to an ASIC would have the same restriction as the ASIC itself46
This field has an OXM code point, but OpenFlow 1464 and earlier allow it to be modified only with a specialized instruction, not with a ``set-field'' action46 OpenFlow 1465 removes this restriction46 Open vSwitch does not enforce this restriction, regardless of OpenFlow version46
Register 0 Field
Name: | reg0 |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_REG0 (0) since Open vSwitch 1.1
|
This is the first of several Open vSwitch registers, all of which have the same properties46 Open vSwitch 1461 introduced registers 0, 1, 2, and 3, version 1463 added register 4, version 1467 added registers 5, 6, and 7, and version 2466 added registers 8 through 1546
Extended Register 0 Field
Name: | xreg0 |
Width: | 64 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_PKT_REG0 (0) since OpenFlow 1.3 and Open vSwitch 2.4
|
NXM: |
none
|
This is the first of the registers introduced in OpenFlow 146546 OpenFlow 1465 calls these fields just the ``packet registers,'' but Open vSwitch already had 32-bit registers by that name, so Open vSwitch uses the name ``extended registers'' in an attempt to reduce confusion46 The standard allows for up to 128 registers, each 64 bits wide, but Open vSwitch only implements 4 (in versions 2464 and 2465) or 8 (in version 2466 and later)46
Each of the 64-bit extended registers overlays two of the 32-bit registers: xreg0 overlays reg0 and reg1, with reg0 supplying the most-significant bits of xreg0 and reg1 the least-significant46 Similarly, xreg1 overlays reg2 and reg3, and so on46
The OpenFlow specification says, ``In most cases, the packet registers can not be matched in tables, i46e46 they usually can not be used in the flow entry match structure'' [OpenFlow 1465, section 74624634610], but there is no reason for a software switch to impose such a restriction, and Open vSwitch does not46
Double-Extended Register 0 Field
Name: | xxreg0 |
Width: | 128 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | none |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_XXREG0 (111) since Open vSwitch 2.6
|
This is the first of the double-extended registers introduce in Open vSwitch 246646 Each of the 128-bit extended registers overlays four of the 32-bit registers: xxreg0 overlays reg0 through reg3, with reg0 supplying the most-significant bits of xxreg0 and reg3 the least-significant46 xxreg1 similarly overlays reg4 through reg7, and so on46
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
eth_src aka dl_src | 6 | yes | yes | Ethernet | OF 1.2+ and OVS 1.1+ | |
eth_dst aka dl_dst | 6 | yes | yes | Ethernet | OF 1.2+ and OVS 1.1+ | |
eth_type aka dl_type | 2 | no | no | Ethernet | OF 1.2+ and OVS 1.1+ |
Ethernet is the only layer-2 protocol that Open vSwitch supports46 As with most software, Open vSwitch and OpenFlow regard an Ethernet frame to begin with the 14-byte header and end with the final byte of the payload; that is, the frame check sequence is not considered part of the frame46
Ethernet Source Field
Name: | eth_src (aka dl_src) |
Width: | 48 bits |
Format: | Ethernet |
Masking: | arbitrary bitwise masks |
Prerequisites: | Ethernet |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes |
OXM: |
OXM_OF_ETH_SRC (4) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ETH_SRC (2) since Open vSwitch 1.1
|
The Ethernet source address:
Ethernet
<---------->
48 48 16
+---+---+----+
|dst|src|type| ...
+---+---+----+
Ethernet Destination Field
Name: | eth_dst (aka dl_dst) |
Width: | 48 bits |
Format: | Ethernet |
Masking: | arbitrary bitwise masks |
Prerequisites: | Ethernet |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes |
OXM: |
OXM_OF_ETH_DST (3) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ETH_DST (1) since Open vSwitch 1.1
|
The Ethernet destination address:
Ethernet
<---------->
48 48 16
+---+---+----+
|dst|src|type| ...
+---+---+----+
Open vSwitch 1468 and later support arbitrary masks for source and/or destination46 Earlier versions only support masking the destination with the following masks:
Ethernet Type Field
Name: | eth_type (aka dl_type) |
Width: | 16 bits |
Format: | hexadecimal |
Masking: | not maskable |
Prerequisites: | Ethernet |
Access: | read-only |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_ETH_TYPE (5) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ETH_TYPE (3) since Open vSwitch 1.1
|
The most commonly seen Ethernet frames today use a format called ``Ethernet II,'' in which the last two bytes of the Ethernet header specify the Ethertype46 For such a frame, this field is copied from those bytes of the header, like so:
Ethernet
<---------------->
48 48 16
+---+---+----------+
|dst|src| type | ...
+---+---+----------+
≥0x600
Every Ethernet type has a value 0x600 (1,536) or greater46 When the last two bytes of the Ethernet header have a value too small to be an Ethernet type, then the value found there is the total length of the frame in bytes, excluding the Ethernet header46 An 802462 LLC header typically follows the Ethernet header46 OpenFlow and Open vSwitch only support LLC headers with DSAP and SSAP 0xaa and control byte 0x03, which indicate that a SNAP header follows the LLC header46 In turn, OpenFlow and Open vSwitch only support a SNAP header with organization 0x00000046 In such a case, this field is copied from the type field in the SNAP header, like this:
Ethernet LLC SNAP
<------------> <------------> <----------------->
48 48 16 8 8 8 24 16
+---+---+------+ +----+----+----+ +--------+----------+
|dst|src| type | |DSAP|SSAP|cntl| | org | type | ...
+---+---+------+ +----+----+----+ +--------+----------+
<0x600 0xaa 0xaa 0x03 0x000000 ≥0x600
When an 802461Q header is inserted after the Ethernet source and destination, this field is populated with the encapsulated Ethertype, not the 802461Q Ethertype46 With an Ethernet II inner frame, the result looks like this:
Ethernet 802.1Q Ethertype
<------> <--------> <-------->
48 48 16 16 16
+----+---+ +------+---+ +----------+
|dst |src| | TPID |TCI| | type | ...
+----+---+ +------+---+ +----------+
0x8100 ≥0x600
LLC and SNAP encapsulation look like this with an 802461Q header:
Ethernet 802.1Q Ethertype LLC SNAP
<------> <--------> <-------> <------------> <----------------->
48 48 16 16 16 8 8 8 24 16
+----+---+ +------+---+ +---------+ +----+----+----+ +--------+----------+
|dst |src| | TPID |TCI| | type | |DSAP|SSAP|cntl| | org | type | ...
+----+---+ +------+---+ +---------+ +----+----+----+ +--------+----------+
0x8100 <0x600 0xaa 0xaa 0x03 0x000000 ≥0x600
When a packet doesn't match any of the header formats described above, Open vSwitch and OpenFlow set this field to 0x5ff (OFP_DL_TYPE_NOT_ETH_TYPE)46
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
dl_vlan | 2 (low 12 bits) | no | yes | Ethernet | ||
dl_vlan_pcp | 1 (low 3 bits) | no | yes | Ethernet | ||
vlan_vid | 2 (low 12 bits) | yes | yes | Ethernet | OF 1.2+ and OVS 1.7+ | |
vlan_pcp | 1 (low 3 bits) | no | yes | VLAN VID | OF 1.2+ and OVS 1.7+ | |
vlan_tci | 2 | yes | yes | Ethernet | OVS 1.1+ |
The 802461Q VLAN header causes more trouble than any other 4 bytes in networking46 OpenFlow 1460, 1461, and 1462+ all treat VLANs differently46 Open vSwitch extensions add another variant to the mix46 Open vSwitch reconciles all four treatments as best it can46
An 802461Q VLAN header consists of two 16-bit fields:
TPID TCI
<-------> <--------->
16 3 1 12
+---------+---+---+---+
|Ethertype|PCP|CFI|VID|
+---------+---+---+---+
0x8100 0
The first 16 bits of the VLAN header, the TPID (Tag Protocol IDentifier), is an Ethertype46 When the VLAN header is inserted just after the source and destination MAC addresses in a Ethertype frame, the TPID serves to identify the presence of the VLAN46 The standard TPID, the only one that Open vSwitch supports, is 0x810046 OpenFlow 1460 explicitly supports only TPID 0x810046 OpenFlow 1461, but not earlier or later versions, also requires support for TPID 0x88a8 (Open vSwitch does not support this)46 OpenFlow 1462 through 1465 do not require support for specific TPIDs (the ``push vlan header'' action does say that only 0x8100 and 0x88a8 should be pushed)46 No version of OpenFlow provides a way to distinguish or match on the TPID46
The remaining 16 bits of the VLAN header, the TCI (Tag Control Information), is subdivided into three subfields:
See eth_type for illustrations of a complete Ethernet frame with 802461Q tag included46
Open vSwitch can match only a single VLAN header46 If more than one VLAN header is present, then eth_type holds the TPID of the inner VLAN header46 Open vSwitch stops parsing the packet after the inner TPID, so matching further into the packet (e46g46 on the inner TCI or L3 fields) is not possible46
OpenFlow only directly supports matching a single VLAN header46 In OpenFlow 1461 or later, one OpenFlow table can match on the outermost VLAN header and pop it off, and a later OpenFlow table can match on the next outermost header46 Open vSwitch does not support this46
The four variants have three different levels of expressiveness: OpenFlow 1460 and 1461 VLAN matching are less powerful than OpenFlow 1462+ VLAN matching, which is less powerful than Open vSwitch extension VLAN matching46
OpenFlow 1460 uses two fields, called dl_vlan and dl_vlan_pcp, each of which can be either exact-matched or wildcarded, to specify VLAN matches:
VLAN matching in OpenFlow 1461 is similar to OpenFlow 146046 The one refinement is that when dl_vlan matches on 0xfffe (OFVPID_ANY), the flow matches only packets with an 802461Q header, with any VLAN ID46 If dl_vlan_pcp is wildcarded, the flow matches any packet with an 802461Q header, regardless of VLAN ID or priority46 If dl_vlan_pcp is not wildcarded, then the flow only matches packets with the priority specified in dl_vlan_pcp's low 3 bits46
OpenFlow 1461 uses the name OFPVID_NONE, instead of OFP_VLAN_NONE, for a dl_vlan of 0xffff, but it has the same meaning46
In OpenFlow 1461, Open vSwitch reports error OFPBMC_BAD_VALUE for an attempt to match on dl_vlan between 4,096 and 0xfffd, inclusive, or dl_vlan_pcp greater than 746
OpenFlow 1.2+ VLAN ID Field
Name: | vlan_vid |
Width: | 16 bits (only the least-significant 12 bits may be nonzero) |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | Ethernet |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_VLAN_VID (6) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
none
|
The OpenFlow standard describes this field as consisting of ``12+1'' bits46 On ingress, its value is 0 if no 802461Q header is present, and otherwise it holds the VLAN VID in its least significant 12 bits, with bit 12 (0x1000 aka OFPVID_PRESENT) also set to 146 The three most significant bits are always zero:
OXM_OF_VLAN_VID
<------------->
3 1 12
+---+--+--------+
| |P |VLAN ID |
+---+--+--------+
0
As a consequence of this field's format, one may use it to match the VLAN ID in all of the ways available with the OpenFlow 1460 and 1461 formats, and a few new ways:
OpenFlow 1.2+ VLAN Priority Field
Name: | vlan_pcp |
Width: | 8 bits (only the least-significant 3 bits may be nonzero) |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | VLAN VID |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_VLAN_PCP (7) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
none
|
The 3 least significant bits may be used to match the PCP bits in an 802461Q header46 Other bits are always zero:
OXM_OF_VLAN_VID
<------------->
5 3
+--------+------+
| zero | PCP |
+--------+------+
0
This field may only be used when vlan_vid is not wildcarded and does not exact match on 0 (which only matches when there is no 802461Q header)46
See VLAN Comparison Chart, below, for some examples46
The vlan_tci extension can describe more kinds of VLAN matches than the other variants46 It is also simpler than the other variants46
VLAN TCI Field
Name: | vlan_tci |
Width: | 16 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | Ethernet |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
none
|
NXM: |
NXM_OF_VLAN_TCI (4) since Open vSwitch 1.1
|
For a packet without an 802461Q header, this field is zero46 For a packet with an 802461Q header, this field is the TCI with the bit in CFI's position (marked P for ``present'' below) forced to 146 Thus, for a packet in VLAN 9 with priority 7, it has the value 0xf009:
NXM_VLAN_TCI
<---------->
3 1 12
+----+--+----+
|PCP |P |VID |
+----+--+----+
7 1 9
Usage examples:
See VLAN Comparison Chart, below, for more examples46
The following table describes each of several possible matching criteria on 802461Q header may be expressed with each variation of the VLAN matching fields:
Criteria OpenFlow 1.0 OpenFlow 1.1 OpenFlow 1.2+ NXM | ||||
_ _ _ _ _ | ||||
[1] ????/1,??/? ????/1,??/? 0000/0000,-- 0000/0000 | ||||
[2] ffff/0,??/? ffff/0,??/? 0000/ffff,-- 0000/ffff | ||||
[3] 0xxx/0,??/1 0xxx/0,??/1 1xxx/ffff,-- 1xxx/1fff | ||||
[4] ????/1,0y/0 fffe/0,0y/0 1000/1000,0y z000/f000 | ||||
[5] 0xxx/0,0y/0 0xxx/0,0y/0 1xxx/ffff,0y zxxx/ffff | ||||
[6] (none) (none) 1001/1001,-- 1001/1001 | ||||
[7] (none) (none) (none) 3000/3000 | ||||
[8] (none) (none) (none) 0000/0fff | ||||
[9] (none) (none) (none) 0000/f000 | ||||
[10] (none) (none) (none) 0000/efff |
All numbers in the table are expressed in hexadecimal46 The columns in the table are interpreted as follows:
The matching criteria described by the table are:
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
mpls_label | 4 (low 20 bits) | no | yes | MPLS | OF 1.2+ and OVS 1.11+ | |
mpls_tc | 1 (low 3 bits) | no | yes | MPLS | OF 1.2+ and OVS 1.11+ | |
mpls_bos | 1 (low 1 bits) | no | no | MPLS | OF 1.3+ and OVS 1.11+ | |
mpls_ttl | 1 | no | yes | MPLS | OVS 2.6+ |
One or more MPLS headers (more commonly called MPLS labels) follow an Ethernet type field that specifies an MPLS Ethernet type [RFC 3032]46 Ethertype 0x8847 is used for all unicast46 Multicast MPLS is divided into two specific classes, one of which uses Ethertype 0x8847 and the other 0x8848 [RFC 5332]46
The most common overall packet format is Ethernet II, shown below (SNAP encapsulation may be used but is not ordinarily seen in Ethernet networks):
Ethernet MPLS
<------------> <------------>
48 48 16 20 3 1 8
+---+---+------+ +-----+--+-+---+
|dst|src| type | |label|TC|S|TTL| ...
+---+---+------+ +-----+--+-+---+
0x8847
MPLS can be encapsulated inside an 802461Q header, in which case the combination looks like this:
Ethernet 802.1Q Ethertype MPLS
<------> <--------> <-------> <------------>
48 48 16 16 16 20 3 1 8
+----+---+ +------+---+ +---------+ +-----+--+-+---+
|dst |src| | TPID |TCI| | type | |label|TC|S|TTL| ...
+----+---+ +------+---+ +---------+ +-----+--+-+---+
0x8100 0x8847
The fields within an MPLS label are:
Unlike the other encapsulations supported by OpenFlow and Open vSwitch, MPLS labels are routinely used in ``stacks'' two or three deep and sometimes even deeper46 Open vSwitch currently supports up to three labels46
The OpenFlow specification only supports matching on the outermost MPLS label at any given time46 To match on the second label, one must first ``pop'' the outer label and advance to another OpenFlow table, where the inner label may be matched46 To match on the third label, one must pop the two outer labels, and so on46
Unlike all other forms of encapsulation that Open vSwitch and OpenFlow support, an MPLS label does not indicate what inner protocol it encapsulates46 Different deployments determine the inner protocol in different ways [RFC 3032]:
Open vSwitch and OpenFlow do not infer the inner protocol, even if reserved label values are in use46 Instead, the flow table must specify the inner protocol at the time it pops the bottommost MPLS label, using the Ethertype argument to the pop_mpls action46
MPLS Label Field
Name: | mpls_label |
Width: | 32 bits (only the least-significant 20 bits may be nonzero) |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | MPLS |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_MPLS_LABEL (34) since OpenFlow 1.2 and Open vSwitch 1.11
|
NXM: |
none
|
The least significant 20 bits hold the ``label'' field from the MPLS label46 Other bits are zero:
OXM_OF_MPLS_LABEL
<--------------->
12 20
+--------+--------+
| zero | label |
+--------+--------+
0
Most label values are available for any use by deployments46 Values under 16 are reserved46
MPLS Traffic Class Field
Name: | mpls_tc |
Width: | 8 bits (only the least-significant 3 bits may be nonzero) |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | MPLS |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_MPLS_TC (35) since OpenFlow 1.2 and Open vSwitch 1.11
|
NXM: |
none
|
The least significant 3 bits hold the TC field from the MPLS label46 Other bits are zero:
OXM_OF_MPLS_TC
<------------>
5 3
+--------+-----+
| zero | TC |
+--------+-----+
0
This field is intended for use for Quality of Service (QoS) and Explicit Congestion Notification purposes, but its particular interpretation is deployment specific46
Before 2009, this field was named EXP and reserved for experimental use [RFC 5462]46
MPLS Bottom of Stack Field
Name: | mpls_bos |
Width: | 8 bits (only the least-significant 1 bits may be nonzero) |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | MPLS |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_MPLS_BOS (36) since OpenFlow 1.3 and Open vSwitch 1.11
|
NXM: |
none
|
The least significant bit holds the BOS field from the MPLS label46 Other bits are zero:
OXM_OF_MPLS_BOS
<------------->
7 1
+--------+------+
| zero | BOS |
+--------+------+
0
This field is useful as part of processing a series of incoming MPLS labels46 A flow that includes a pop_mpls action should generally match on mpls_bos:
MPLS Time-to-Live Field
Name: | mpls_ttl |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | MPLS |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_MPLS_TTL (30) since Open vSwitch 2.6
|
Holds the 8-bit time-to-live field from the MPLS label:
NXM_NX_MPLS_TTL
<------------->
8
+---------------+
| TTL |
+---------------+
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
ip_src aka nw_src | 4 | yes | yes | IPv4 | OF 1.2+ and OVS 1.1+ | |
ip_dst aka nw_dst | 4 | yes | yes | IPv4 | OF 1.2+ and OVS 1.1+ | |
ipv6_src | 16 | yes | yes | IPv6 | OF 1.2+ and OVS 1.1+ | |
ipv6_dst | 16 | yes | yes | IPv6 | OF 1.2+ and OVS 1.1+ | |
ipv6_label | 4 (low 20 bits) | yes | yes | IPv6 | OF 1.2+ and OVS 1.4+ | |
nw_proto aka ip_proto | 1 | no | no | IPv4/IPv6 | OF 1.2+ and OVS 1.1+ | |
nw_ttl | 1 | no | yes | IPv4/IPv6 | OVS 1.4+ | |
ip_frag aka nw_frag | 1 (low 2 bits) | yes | no | IPv4/IPv6 | OVS 1.3+ | |
nw_tos | 1 | no | yes | IPv4/IPv6 | OVS 1.1+ | |
ip_dscp | 1 (low 6 bits) | no | yes | IPv4/IPv6 | OF 1.2+ and OVS 1.7+ | |
nw_ecn aka ip_ecn | 1 (low 2 bits) | no | yes | IPv4/IPv6 | OF 1.2+ and OVS 1.4+ |
These fields are applicable only to IPv4 flows, that is, flows that match on the IPv4 Ethertype 0x080046
IPv4 Source Address Field
Name: | ip_src (aka nw_src) |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | IPv4 |
Access: | read/write |
OpenFlow 1.0: | yes (CIDR match only) |
OpenFlow 1.1: | yes |
OXM: |
OXM_OF_IPV4_SRC (11) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_IP_SRC (7) since Open vSwitch 1.1
|
The source address from the IPv4 header:
Ethernet IPv4
<-----------> <--------------->
48 48 16 8 32 32
+---+---+-----+ +---+-----+---+---+
|dst|src|type | |...|proto|src|dst| ...
+---+---+-----+ +---+-----+---+---+
0x800
For historical reasons, in an ARP or RARP flow, Open vSwitch interprets matches on nw_src as actually referring to the ARP SPA46
IPv4 Destination Address Field
Name: | ip_dst (aka nw_dst) |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | IPv4 |
Access: | read/write |
OpenFlow 1.0: | yes (CIDR match only) |
OpenFlow 1.1: | yes |
OXM: |
OXM_OF_IPV4_DST (12) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_IP_DST (8) since Open vSwitch 1.1
|
The destination address from the IPv4 header:
Ethernet IPv4
<-----------> <--------------->
48 48 16 8 32 32
+---+---+-----+ +---+-----+---+---+
|dst|src|type | |...|proto|src|dst| ...
+---+---+-----+ +---+-----+---+---+
0x800
For historical reasons, in an ARP or RARP flow, Open vSwitch interprets matches on nw_dst as actually referring to the ARP TPA46
These fields apply only to IPv6 flows, that is, flows that match on the IPv6 Ethertype 0x86dd46
IPv6 Source Address Field
Name: | ipv6_src |
Width: | 128 bits |
Format: | IPv6 |
Masking: | arbitrary bitwise masks |
Prerequisites: | IPv6 |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_IPV6_SRC (26) since OpenFlow 1.2 and Open vSwitch 1.1
|
NXM: |
NXM_NX_IPV6_SRC (19) since Open vSwitch 1.1
|
The source address from the IPv6 header:
Ethernet IPv6
<------------> <-------------->
48 48 16 8 128 128
+---+---+------+ +---+----+---+---+
|dst|src| type | |...|next|src|dst| ...
+---+---+------+ +---+----+---+---+
0x86dd
Open vSwitch 1468 added support for bitwise matching; earlier versions supported only CIDR masks46
IPv6 Destination Address Field
Name: | ipv6_dst |
Width: | 128 bits |
Format: | IPv6 |
Masking: | arbitrary bitwise masks |
Prerequisites: | IPv6 |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_IPV6_DST (27) since OpenFlow 1.2 and Open vSwitch 1.1
|
NXM: |
NXM_NX_IPV6_DST (20) since Open vSwitch 1.1
|
The destination address from the IPv6 header:
Ethernet IPv6
<------------> <-------------->
48 48 16 8 128 128
+---+---+------+ +---+----+---+---+
|dst|src| type | |...|next|src|dst| ...
+---+---+------+ +---+----+---+---+
0x86dd
Open vSwitch 1468 added support for bitwise matching; earlier versions supported only CIDR masks46
IPv6 Flow Label Field
Name: | ipv6_label |
Width: | 32 bits (only the least-significant 20 bits may be nonzero) |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | IPv6 |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_IPV6_FLABEL (28) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_IPV6_LABEL (27) since Open vSwitch 1.4
|
The least significant 20 bits hold the flow label field from the IPv6 header46 Other bits are zero:
OXM_OF_IPV6_FLABEL
<---------------->
12 20
+--------+---------+
| zero | label |
+--------+---------+
0
These fields exist with at least approximately the same meaning in both IPv4 and IPv6, so they are treated as a single field for matching purposes46 Any flow that matches on the IPv4 Ethertype 0x0800 or the IPv6 Ethertype 0x86dd may match on these fields46
IPv4/v6 Protocol Field
Name: | nw_proto (aka ip_proto) |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | IPv4/IPv6 |
Access: | read-only |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_IP_PROTO (10) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_IP_PROTO (6) since Open vSwitch 1.1
|
Matches the IPv4 or IPv6 protocol type46
For historical reasons, in an ARP or RARP flow, Open vSwitch interprets matches on nw_proto as actually referring to the ARP opcode46 The ARP opcode is a 16-bit field, so for matching purposes ARP opcodes greater than 255 are treated as 0; this works adequately because in practice ARP and RARP only use opcodes 1 through 446
IPv4/v6 TTL/Hop Limit Field
Name: | nw_ttl |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | IPv4/IPv6 |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_IP_TTL (29) since Open vSwitch 1.4
|
The main reason to match on the TTL or hop limit field is to detect whether a dec_ttl action will fail due to a TTL exceeded error46 Another way that a controller can detect TTL exceeded is to listen for OFPR_INVALID_TTL ``packet-in'' messages via OpenFlow46
IPv4/v6 Fragment Bitmask Field
Name: | ip_frag (aka nw_frag) |
Width: | 8 bits (only the least-significant 2 bits may be nonzero) |
Format: | frag |
Masking: | arbitrary bitwise masks |
Prerequisites: | IPv4/IPv6 |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXM_NX_IP_FRAG (26) since Open vSwitch 1.3
|
Specifies what kinds of IP fragments or non-fragments to match46 The value for this field is most conveniently specified as one of the following:
The field is internally formatted as 2 bits: bit 0 is 1 for an IP fragment with any offset (and otherwise 0), and bit 1 is 1 for an IP fragment with nonzero offset (and otherwise 0), like so:
NXM_NX_IP_FRAG
<------------>
6 1 1
+----+-----+---+
|zero|later|any|
+----+-----+---+
0
Even though 2 bits have 4 possible values, this field only uses 3 of them:
The switch may reject matches against values that can never appear46
It is important to understand how this field interacts with the OpenFlow fragment handling mode:
Thus, this field is likely to be most useful for an Open vSwitch switch configured in OFPC_FRAG_NX_MATCH mode46 See the description of the set-frags command in ovs-ofctl(8), for more details46
IPv4/IPv6 TOS Fields
IPv4 and IPv6 contain a one-byte ``type of service'' or TOS field that has the following format:
type of service
<------------->
6 2
+--------+------+
| DSCP | ECN |
+--------+------+
IPv4/v6 DSCP (Bits 2-7) Field
Name: | nw_tos |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | IPv4/IPv6 |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
none
|
NXM: |
NXM_OF_IP_TOS (5) since Open vSwitch 1.1
|
This field is the TOS byte with the two ECN bits cleared to 0:
NXM_OF_IP_TOS
<----------->
6 2
+------+------+
| DSCP | zero |
+------+------+
0
IPv4/v6 DSCP (Bits 0-5) Field
Name: | ip_dscp |
Width: | 8 bits (only the least-significant 6 bits may be nonzero) |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | IPv4/IPv6 |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_IP_DSCP (8) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
none
|
This field is the TOS byte shifted right to put the DSCP bits in the 6 least-significant bits:
OXM_OF_IP_DSCP
<------------>
2 6
+-------+------+
| zero | DSCP |
+-------+------+
0
IPv4/v6 ECN Field
Name: | nw_ecn (aka ip_ecn) |
Width: | 8 bits (only the least-significant 2 bits may be nonzero) |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | IPv4/IPv6 |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_IP_ECN (9) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_IP_ECN (28) since Open vSwitch 1.4
|
This field is the TOS byte with the DSCP bits cleared to 0:
OXM_OF_IP_ECN
<----------->
6 2
+-------+-----+
| zero | ECN |
+-------+-----+
0
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
arp_op | 2 | no | yes | ARP | OF 1.2+ and OVS 1.1+ | |
arp_spa | 4 | yes | yes | ARP | OF 1.2+ and OVS 1.1+ | |
arp_tpa | 4 | yes | yes | ARP | OF 1.2+ and OVS 1.1+ | |
arp_sha | 6 | yes | yes | ARP | OF 1.2+ and OVS 1.1+ | |
arp_tha | 6 | yes | yes | ARP | OF 1.2+ and OVS 1.1+ |
In theory, Address Resolution Protocol, or ARP, is a generic protocol generic protocol that can be used to obtain the hardware address that corresponds to any higher-level protocol address46 In contemporary usage, ARP is used only in Ethernet networks to obtain the Ethernet address for a given IPv4 address46 OpenFlow and Open vSwitch only support this usage of ARP46 For this use case, an ARP packet has the following format, with the ARP fields exposed as Open vSwitch fields highlighted:
Ethernet ARP
<-----------> <---------------------------------->
48 48 16 16 16 8 8 16 48 16 48 16
+---+---+-----+ +---+-----+---+---+--+---+---+---+---+
|dst|src|type | |hrd| pro |hln|pln|op|sha|spa|tha|tpa|
+---+---+-----+ +---+-----+---+---+--+---+---+---+---+
0x806 1 0x800 6 4
The ARP fields are also used for RARP, the Reverse Address Resolution Protocol, which shares ARP's wire format46
ARP Opcode Field
Name: | arp_op |
Width: | 16 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | ARP |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_ARP_OP (21) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ARP_OP (15) since Open vSwitch 1.1
|
Even though this is a 16-bit field, Open vSwitch does not support ARP opcodes greater than 255; it treats them to zero46 This works adequately because in practice ARP and RARP only use opcodes 1 through 446
ARP Source IPv4 Address Field
Name: | arp_spa |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | ARP |
Access: | read/write |
OpenFlow 1.0: | yes (CIDR match only) |
OpenFlow 1.1: | yes |
OXM: |
OXM_OF_ARP_SPA (22) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ARP_SPA (16) since Open vSwitch 1.1
|
ARP Target IPv4 Address Field
Name: | arp_tpa |
Width: | 32 bits |
Format: | IPv4 |
Masking: | arbitrary bitwise masks |
Prerequisites: | ARP |
Access: | read/write |
OpenFlow 1.0: | yes (CIDR match only) |
OpenFlow 1.1: | yes |
OXM: |
OXM_OF_ARP_TPA (23) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ARP_TPA (17) since Open vSwitch 1.1
|
ARP Source Ethernet Address Field
Name: | arp_sha |
Width: | 48 bits |
Format: | Ethernet |
Masking: | arbitrary bitwise masks |
Prerequisites: | ARP |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_ARP_SHA (24) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_ARP_SHA (17) since Open vSwitch 1.1
|
ARP Target Ethernet Address Field
Name: | arp_tha |
Width: | 48 bits |
Format: | Ethernet |
Masking: | arbitrary bitwise masks |
Prerequisites: | ARP |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_ARP_THA (25) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_ARP_THA (18) since Open vSwitch 1.1
|
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
nsh_flags | 1 | yes | yes | NSH | OVS 2.8+ | |
nsh_ttl | 1 | no | yes | NSH | OVS 2.9+ | |
nsh_mdtype | 1 | no | no | NSH | OVS 2.8+ | |
nsh_np | 1 | no | no | NSH | OVS 2.8+ | |
nsh_spi aka nsp | 4 (low 24 bits) | no | yes | NSH | OVS 2.8+ | |
nsh_si aka nsi | 1 | no | yes | NSH | OVS 2.8+ | |
nsh_c1 aka nshc1 | 4 | yes | yes | NSH | OVS 2.8+ | |
nsh_c2 aka nshc2 | 4 | yes | yes | NSH | OVS 2.8+ | |
nsh_c3 aka nshc3 | 4 | yes | yes | NSH | OVS 2.8+ | |
nsh_c4 aka nshc4 | 4 | yes | yes | NSH | OVS 2.8+ |
Service functions are widely deployed and essential in many networks46 These service functions provide a range of features such as security, WAN acceleration, and server load balancing46 Service functions may be instantiated at different points in the network infrastructure such as the wide area network, data center, and so forth46
Prior to development of the SFC architecture [RFC 7665] and the protocol specified in this document, current service function deployment models have been relatively static and bound to topology for insertion and policy selection46 Furthermore, they do not adapt well to elastic service environments enabled by virtualization46
New data center network and cloud architectures require more flexible service function deployment models46 Additionally, the transition to virtual platforms demands an agile service insertion model that supports dynamic and elastic service delivery46 Specifically, the following functions are necessary:
The Network Service Header (NSH) specification defines a new data plane protocol, which is an encapsulation for service function chains46 The NSH is designed to encapsulate an original packet or frame, and in turn be encapsulated by an outer transport encapsulation (which is used to deliver the NSH to NSH-aware network elements), as shown below:
+-----------------------+----------------------------+---------------------+
|Transport Encapsulation|Network Service Header (NSH)|Original Packet/Frame|
+-----------------------+----------------------------+---------------------+
The NSH is composed of the following elements:
[RFC 7665] provides an overview of a service chaining architecture that clearly defines the roles of the various elements and the scope of a service function chaining encapsulation46 Figure 3 of [RFC 7665] depicts the SFC architectural components after classification46 The NSH is the SFC encapsulation referenced in [RFC 7665]46
flags field (2 bits) Field
Name: | nsh_flags |
Width: | 8 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_FLAGS (1) since Open vSwitch 2.8
|
TTL field (6 bits) Field
Name: | nsh_ttl |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_TTL (10) since Open vSwitch 2.9
|
mdtype field (8 bits) Field
Name: | nsh_mdtype |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | NSH |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_MDTYPE (2) since Open vSwitch 2.8
|
np (next protocol) field (8 bits) Field
Name: | nsh_np |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | NSH |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_NP (3) since Open vSwitch 2.8
|
spi (service path identifier) field (24 bits) Field
Name: | nsh_spi (aka nsp) |
Width: | 32 bits (only the least-significant 24 bits may be nonzero) |
Format: | hexadecimal |
Masking: | not maskable |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_SPI (4) since Open vSwitch 2.8
|
si (service index) field (8 bits) Field
Name: | nsh_si (aka nsi) |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_SI (5) since Open vSwitch 2.8
|
c1 (Network Platform Context) field (32 bits) Field
Name: | nsh_c1 (aka nshc1) |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_C1 (6) since Open vSwitch 2.8
|
c2 (Network Shared Context) field (32 bits) Field
Name: | nsh_c2 (aka nshc2) |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_C2 (7) since Open vSwitch 2.8
|
c3 (Service Platform Context) field (32 bits) Field
Name: | nsh_c3 (aka nshc3) |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_C3 (8) since Open vSwitch 2.8
|
c4 (Service Shared Context) field (32 bits) Field
Name: | nsh_c4 (aka nshc4) |
Width: | 32 bits |
Format: | hexadecimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | NSH |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
NXOXM_NSH_C4 (9) since Open vSwitch 2.8
|
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
tcp_src aka tp_src | 2 | yes | yes | TCP | OF 1.2+ and OVS 1.1+ | |
tcp_dst aka tp_dst | 2 | yes | yes | TCP | OF 1.2+ and OVS 1.1+ | |
tcp_flags | 2 (low 12 bits) | yes | no | TCP | OF 1.3+ and OVS 2.1+ | |
udp_src | 2 | yes | yes | UDP | OF 1.2+ and OVS 1.1+ | |
udp_dst | 2 | yes | yes | UDP | OF 1.2+ and OVS 1.1+ | |
sctp_src | 2 | yes | yes | SCTP | OF 1.2+ and OVS 2.0+ | |
sctp_dst | 2 | yes | yes | SCTP | OF 1.2+ and OVS 2.0+ |
For matching purposes, no distinction is made whether these protocols are encapsulated within IPv4 or IPv646
The following diagram shows TCP within IPv446 Open vSwitch also supports TCP in IPv646 Only TCP fields implemented as Open vSwitch fields are shown:
Ethernet IPv4 TCP
<-----------> <---------------> <------------------->
48 48 16 8 32 32 16 16 12
+---+---+-----+ +---+-----+---+---+ +---+---+---+-----+---+
|dst|src|type | |...|proto|src|dst| |src|dst|...|flags|...| ...
+---+---+-----+ +---+-----+---+---+ +---+---+---+-----+---+
0x800 6
TCP Source Port Field
Name: | tcp_src (aka tp_src) |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | TCP |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_TCP_SRC (13) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_TCP_SRC (9) since Open vSwitch 1.1
|
Open vSwitch 1466 added support for bitwise matching46
TCP Destination Port Field
Name: | tcp_dst (aka tp_dst) |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | TCP |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_TCP_DST (14) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_TCP_DST (10) since Open vSwitch 1.1
|
Open vSwitch 1466 added support for bitwise matching46
TCP Flags Field
Name: | tcp_flags |
Width: | 16 bits (only the least-significant 12 bits may be nonzero) |
Format: | TCP flags |
Masking: | arbitrary bitwise masks |
Prerequisites: | TCP |
Access: | read-only |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
ONFOXM_ET_TCP_FLAGS (42) since OpenFlow 1.3 and Open vSwitch 2.459 OXM_OF_TCP_FLAGS (42) since OpenFlow 1.5 and Open vSwitch 2.3
|
NXM: |
NXM_NX_TCP_FLAGS (34) since Open vSwitch 2.1
|
This field holds the TCP flags46 TCP currently defines 9 flag bits46 An additional 3 bits are reserved46 For more information, see [RFC 793], [RFC 3168], and [RFC 3540]46
Matches on this field are most conveniently written in terms of symbolic names (given in the diagram below), each preceded by either + for a flag that must be set, or - for a flag that must be unset, without any other delimiters between the flags46 Flags not mentioned are wildcarded46 For example, tcp,tcp_flags=+syn-ack matches TCP SYNs that are not ACKs, and tcp,tcp_flags=+[200] matches TCP packets with the reserved [200] flag set46 Matches can also be written as flags/mask, where flags and mask are 16-bit numbers in decimal or in hexadecimal prefixed by 0x46
The flag bits are:
reserved later RFCs RFC 793
<---------------> <--------> <--------------------->
4 1 1 1 1 1 1 1 1 1 1 1 1
+----+-----+-----+-----+--+---+---+---+---+---+---+---+---+
|zero|[800]|[400]|[200]|NS|CWR|ECE|URG|ACK|PSH|RST|SYN|FIN|
+----+-----+-----+-----+--+---+---+---+---+---+---+---+---+
0
The following diagram shows UDP within IPv446 Open vSwitch also supports UDP in IPv646 Only UDP fields that Open vSwitch exposes as fields are shown:
Ethernet IPv4 UDP
<-----------> <---------------> <--------->
48 48 16 8 32 32 16 16
+---+---+-----+ +---+-----+---+---+ +---+---+---+
|dst|src|type | |...|proto|src|dst| |src|dst|...| ...
+---+---+-----+ +---+-----+---+---+ +---+---+---+
0x800 17
UDP Source Port Field
Name: | udp_src |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | UDP |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_UDP_SRC (15) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_UDP_SRC (11) since Open vSwitch 1.1
|
UDP Destination Port Field
Name: | udp_dst |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | UDP |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_UDP_DST (16) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_UDP_DST (12) since Open vSwitch 1.1
|
The following diagram shows SCTP within IPv446 Open vSwitch also supports SCTP in IPv646 Only SCTP fields that Open vSwitch exposes as fields are shown:
Ethernet IPv4 SCTP
<-----------> <---------------> <--------->
48 48 16 8 32 32 16 16
+---+---+-----+ +---+-----+---+---+ +---+---+---+
|dst|src|type | |...|proto|src|dst| |src|dst|...| ...
+---+---+-----+ +---+-----+---+---+ +---+---+---+
0x800 132
SCTP Source Port Field
Name: | sctp_src |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | SCTP |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_SCTP_SRC (17) since OpenFlow 1.2 and Open vSwitch 2.0
|
NXM: |
none
|
SCTP Destination Port Field
Name: | sctp_dst |
Width: | 16 bits |
Format: | decimal |
Masking: | arbitrary bitwise masks |
Prerequisites: | SCTP |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_SCTP_DST (18) since OpenFlow 1.2 and Open vSwitch 2.0
|
NXM: |
none
|
Name | Bytes | Mask | RW? | Prereqs | NXM/OXM Support | |
icmp_type | 1 | no | yes | ICMPv4 | OF 1.2+ and OVS 1.1+ | |
icmp_code | 1 | no | yes | ICMPv4 | OF 1.2+ and OVS 1.1+ | |
icmpv6_type | 1 | no | yes | ICMPv6 | OF 1.2+ and OVS 1.1+ | |
icmpv6_code | 1 | no | yes | ICMPv6 | OF 1.2+ and OVS 1.1+ | |
nd_target | 16 | yes | yes | ND | OF 1.2+ and OVS 1.1+ | |
nd_sll | 6 | yes | yes | ND solicit | OF 1.2+ and OVS 1.1+ | |
nd_tll | 6 | yes | yes | ND advert | OF 1.2+ and OVS 1.1+ | |
nd_reserved | 4 | no | yes | ND | OVS 2.11+ | |
nd_options_type | 1 | no | yes | ND | OVS 2.11+ |
Ethernet IPv4 ICMPv4
<-----------> <---------------> <----------->
48 48 16 8 32 32 8 8
+---+---+-----+ +---+-----+---+---+ +----+----+---+
|dst|src|type | |...|proto|src|dst| |type|code|...| ...
+---+---+-----+ +---+-----+---+---+ +----+----+---+
0x800 1
ICMPv4 Type Field
Name: | icmp_type |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | ICMPv4 |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_ICMPV4_TYPE (19) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ICMP_TYPE (13) since Open vSwitch 1.1
|
For historical reasons, in an ICMPv4 flow, Open vSwitch interprets matches on tp_src as actually referring to the ICMP type46
ICMPv4 Code Field
Name: | icmp_code |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | ICMPv4 |
Access: | read/write |
OpenFlow 1.0: | yes (exact match only) |
OpenFlow 1.1: | yes (exact match only) |
OXM: |
OXM_OF_ICMPV4_CODE (20) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_OF_ICMP_CODE (14) since Open vSwitch 1.1
|
For historical reasons, in an ICMPv4 flow, Open vSwitch interprets matches on tp_dst as actually referring to the ICMP code46
Ethernet IPv6 ICMPv6
<------------> <--------------> <----------->
48 48 16 8 128 128 8 8
+---+---+------+ +---+----+---+---+ +----+----+---+
|dst|src| type | |...|next|src|dst| |type|code|...| ...
+---+---+------+ +---+----+---+---+ +----+----+---+
0x86dd 58
ICMPv6 Type Field
Name: | icmpv6_type |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | ICMPv6 |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_ICMPV6_TYPE (29) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_ICMPV6_TYPE (21) since Open vSwitch 1.1
|
ICMPv6 Code Field
Name: | icmpv6_code |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | ICMPv6 |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_ICMPV6_CODE (30) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_ICMPV6_CODE (22) since Open vSwitch 1.1
|
Ethernet IPv6 ICMPv6 ICMPv6 ND
<------------> <--------------> <--------------> <--------------->
48 48 16 8 128 128 8 8 128
+---+---+------+ +---+----+---+---+ +-------+----+---+ +------+----------+
|dst|src| type | |...|next|src|dst| | type |code|...| |target|option ...|
+---+---+------+ +---+----+---+---+ +-------+----+---+ +------+----------+
0x86dd 58 135/136 0
ICMPv6 Neighbor Discovery Target IPv6 Field
Name: | nd_target |
Width: | 128 bits |
Format: | IPv6 |
Masking: | arbitrary bitwise masks |
Prerequisites: | ND |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_IPV6_ND_TARGET (31) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_ND_TARGET (23) since Open vSwitch 1.1
|
ICMPv6 Neighbor Discovery Source Ethernet Address Field
Name: | nd_sll |
Width: | 48 bits |
Format: | Ethernet |
Masking: | arbitrary bitwise masks |
Prerequisites: | ND solicit |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_IPV6_ND_SLL (32) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_ND_SLL (24) since Open vSwitch 1.1
|
ICMPv6 Neighbor Discovery Target Ethernet Address Field
Name: | nd_tll |
Width: | 48 bits |
Format: | Ethernet |
Masking: | arbitrary bitwise masks |
Prerequisites: | ND advert |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
OXM_OF_IPV6_ND_TLL (33) since OpenFlow 1.2 and Open vSwitch 1.7
|
NXM: |
NXM_NX_ND_TLL (25) since Open vSwitch 1.1
|
ICMPv6 Neighbor Discovery Reserved Field Field
Name: | nd_reserved |
Width: | 32 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | ND |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
ERICOXM_OF_ICMPV6_ND_RESERVED (1) since Open vSwitch 2.11
|
This is used to set the R,S,O bits in Neighbor Advertisement Messages
ICMPv6 Neighbor Discovery Options Type Field Field
Name: | nd_options_type |
Width: | 8 bits |
Format: | decimal |
Masking: | not maskable |
Prerequisites: | ND |
Access: | read/write |
OpenFlow 1.0: | not supported |
OpenFlow 1.1: | not supported |
OXM: |
none
|
NXM: |
ERICOXM_OF_ICMPV6_ND_OPTIONS_TYPE (2) since Open vSwitch 2.11
|
A value of 1 indicates that the option is Source Link Layer46 A value of 2 indicates that the options is Target Link Layer46 See RFC 4861 for further details46
Ben Pfaff, with advice from Justin Pettit and Jean Tourrilhes46