Instructions & Actions

A side structure is maintained in the packet processing pipeline that contains more than just the packet being processed. It includes informational about the packet such as: arrival port, metadata, and the set of actions to apply to a packet. Actions can discard, modify, queue, or forward the packet. In version 1.0 of the OpenFlow protocol the Action set is modified directly by the Actions list in the FlowMod message; however, in 1.1.0 and subsequent versions the the protocol, the Action set is modified by the Instruction structure carried in the FlowMod. An Instruction may carry an Actions list to update the Action set, or be applied immediately to the packet bypassing the Action set.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a FeatureRes. The action_capabilities will indicate which actions are supported by a switch. Actions are installed as an action set, which is part of a FlowMod message.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Port Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: sent to controller
Table: controller injected packets
Local: host networking stack
Flood: Non-OpenFlow flood
Normal: Non-OpenFlow data-plane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
Strip VLAN ID
IPv4 Set Source Address
Destination Address
Type of Service
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port

Vendor/Experimenter Extension

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

References

OpenFlow Switch Specification 1.0.0: pages 3-721-24

Instruction Processing

Each flow entry of a flow table has a set of instructions to apply to all matching packets. These instructions can be used to modify the packets state, forward the packet to a particular port, forward the packet to another table or group for further processing and pass some metadata in the process. Each packet maintains an action set, which contains a set of actions to apply to the packet when no further table processing can be accomplished. The write and clear instructions provide ways of manipulating the action set. The apply instruction bypasses the action set and performs actions immediately. The goto insturction provides a mechanism to choose the next flow table for processing. The experimenter instructions provides a structure for custom extensions to instructions. Apply and write are the only instructions that apply actions in some way, as input they both contain action lists.

Instructions Description
Apply Apply action list immediately, bypass action set.
Clear Clear the action set.
Write Action Apply action list to action set.
Write Metadata Update the metadata.
Goto Continue processing at the indicated table.
Experimenter Custom instruction extensions.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a table StatsRes. The action_capabilities will indicate which actions are supported by a switch.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Group Forward Groud ID: apply group processing
Output Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: send to controller
Table: controller injected packets
Local: host networking stack
Flood: non-OpenFlow flood
Normal: Non-OpenFlow dataplane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
Push/Pop VLAN ID
MPLS Set Label
Traffic Control
TTL
Dec TTL
Push/Pop Label
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
IPv4 Set Source Address
Destination Address
DSCP
ECN
TTL
Decrement TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port
SCTP Set Source Port
Destination Port
Experimenter - -

Vendor/Experimenter Extension

Custom instructions can be carrier in the Experimenter Instruction structure, custom actions can be carried in the Experimenter Action structure, or an Experimenter message can be used to carry custom extensions.

References

Instructions: OpenFlow Switch Specification 1.1.0: pages 11-1230-31

Actions: OpenFlow Switch Specification 1.1.0: pages 12-1631-36

Instruction Processing

Each flow entry of a flow table has a set of instructions to apply to all matching packets. These instructions can be used to modify the packets state, forward the packet to a particular port, forward the packet to another table or group for further processing and pass some metadata in the process. Each packet maintains an action set, which contains a set of actions to apply to the packet when no further table processing can be accomplished. The write and clear instructions provide ways of manipulating the action set. The apply instruction bypasses the action set and performs actions immediately. The goto insturction provides a mechanism to choose the next flow table for processing. The experimenter instructions provides a structure for custom extensions to instructions. Apply and write are the only instructions that apply actions in some way, as input they both contain action lists.

Instructions Description
Apply Apply action list immediately, bypass action set.
Clear Clear the action set.
Write Action Apply action list to action set.
Write Metadata Update the metadata.
Goto Continue processing at the indicated table.
Experimenter Custom instruction extensions.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a table StatsRes. The action_capabilities will indicate which actions are supported by a switch.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Group Forward Groud ID: apply group processing
Output Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: send to controller
Table: controller injected packets
Local: host networking stack
Flood: non-OpenFlow flood
Normal: Non-OpenFlow dataplane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
Push/Pop VLAN ID
MPLS Set Label
Traffic Control
TTL
Dec TTL
Push/Pop Label
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
ARP Set Opcode
Sender Hardware Address
Sender Protocol Address
Target Hardware Address
Target Protocol Address
IPv4 Set Source Address
Destination Address
DSCP
ECN
TTL
Decrement TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
IPv6 Set Source Address
Destination Address
DSCP
ECN
Flow Label
TTL
Dec TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port
SCTP Set Source Port
Destination Port
ICMPv4 Set Type
Code
ICMPv6 Set Type
Code
ND Target Address
ND Link-Layer Source
ND Link-Layer Target
Experimenter - -

Vendor/Experimenter Extension

Custom instructions can be carrier in the Experimenter Instruction structure, custom actions can be carried in the Experimenter Action structure, or an Experimenter message can be used to carry custom extensions.

References

Instructions: OpenFlow Switch Specification 1.2.0: pages 13-1438-39

Actions: OpenFlow Switch Specification 1.2.0: pages 14-1739-43

Instruction Processing

Each flow entry of a flow table has a set of instructions to apply to all matching packets. These instructions can be used to modify the packets state, forward the packet to a particular port, forward the packet to another table or group for further processing and pass some metadata in the process. Each packet maintains an action set, which contains a set of actions to apply to the packet when no further table processing can be accomplished. The write and clear instructions provide ways of manipulating the action set. The apply instruction bypasses the action set and performs actions immediately. The goto insturction provides a mechanism to choose the next flow table for processing. The meter instruction allows the application of a rate limiter to the flow. The experimenter instructions provides a structure for custom extensions to instructions. Apply and write are the only instructions that apply actions in some way, as input they both contain action lists.

Instructions Description
Apply Apply action list immediately, bypass action set.
Clear Clear the action set.
Write Action Apply action list to action set.
Write Metadata Update the metadata.
Goto Continue processing at the indicated table.
Meter Apply a rate limiter.
Experimenter Custom instruction extensions.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a table MultipartRes. The action_capabilities will indicate which actions are supported by a switch.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Group Forward Groud ID: apply group processing
Output Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: send to controller
Table: controller injected packets
Local: host networking stack
Flood: non-OpenFlow flood
Normal: Non-OpenFlow dataplane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
PBB I-SID
Push/Pop VLAN ID
PBB I-SID
MPLS Set Label
Traffic Control
TTL
Bottom of Stack
Dec TTL
Push/Pop Label
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
ARP Set Opcode
Sender Hardware Address
Sender Protocol Address
Target Hardware Address
Target Protocol Address
IPv4 Set Source Address
Destination Address
DSCP
ECN
TTL
Decrement TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
IPv6 Set Source Address
Destination Address
DSCP
ECN
Flow Label
TTL
Extension Header
Dec TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port
SCTP Set Source Port
Destination Port
ICMPv4 Set Type
Code
ICMPv6 Set Type
Code
ND Target Address
ND Link-Layer Source
ND Link-Layer Target
Experimenter - -

Vendor/Experimenter Extension

Custom instructions can be carried in the Experimenter Instruction structure, custom actions can be carried in the Experimenter Action structure, or an Experimenter message can be used to carry custom extensions.

References

Instructions: OpenFlow Switch Specification 1.3.0: pages 16-18, 46-47

Actions: OpenFlow Switch Specification 1.3.0: pages 18-2148-51

Instruction Processing

Each flow entry of a flow table has a set of instructions to apply to all matching packets. These instructions can be used to modify the packets state, forward the packet to a particular port, forward the packet to another table or group for further processing and pass some metadata in the process. Each packet maintains an action set, which contains a set of actions to apply to the packet when no further table processing can be accomplished. The write and clear instructions provide ways of manipulating the action set. The apply instruction bypasses the action set and performs actions immediately. The goto insturction provides a mechanism to choose the next flow table for processing. The meter instruction allows the application of a rate limiter to the flow. The experimenter instructions provides a structure for custom extensions to instructions. Apply and write are the only instructions that apply actions in some way, as input they both contain action lists.

Instructions Description
Apply Apply action list immediately, bypass action set.
Clear Clear the action set.
Write Action Apply action list to action set.
Write Metadata Update the metadata.
Goto Continue processing at the indicated table.
Meter Apply a rate limiter.
Experimenter Custom instruction extensions.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a table MultipartRes. The action_capabilities will indicate which actions are supported by a switch.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Group Forward Groud ID: apply group processing
Output Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: send to controller
Table: controller injected packets
Local: host networking stack
Flood: non-OpenFlow flood
Normal: Non-OpenFlow dataplane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
PBB I-SID
Push/Pop VLAN ID
PBB I-SID
MPLS Set Label
Traffic Control
TTL
Bottom of Stack
Dec TTL
Push/Pop Label
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
ARP Set Opcode
Sender Hardware Address
Sender Protocol Address
Target Hardware Address
Target Protocol Address
IPv4 Set Source Address
Destination Address
DSCP
ECN
TTL
Decrement TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
IPv6 Set Source Address
Destination Address
DSCP
ECN
Flow Label
TTL
Extension Header
Dec TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port
SCTP Set Source Port
Destination Port
ICMPv4 Set Type
Code
ICMPv6 Set Type
Code
ND Target Address
ND Link-Layer Source
ND Link-Layer Target
Experimenter - -

Vendor/Experimenter Extension

Custom instructions can be carried in the Experimenter Instruction structure, custom actions can be carried in the Experimenter Action structure, or an Experimenter message can be used to carry custom extensions.

References

Instructions: OpenFlow Switch Specification 1.3.1: pages 19-21, 54-56

Actions: OpenFlow Switch Specification 1.3.1: pages 21-2556-61

Instruction Processing

Each flow entry of a flow table has a set of instructions to apply to all matching packets. These instructions can be used to modify the packets state, forward the packet to a particular port, forward the packet to another table or group for further processing and pass some metadata in the process. Each packet maintains an action set, which contains a set of actions to apply to the packet when no further table processing can be accomplished. The write and clear instructions provide ways of manipulating the action set. The apply instruction bypasses the action set and performs actions immediately. The goto insturction provides a mechanism to choose the next flow table for processing. The meter instruction allows the application of a rate limiter to the flow. The experimenter instructions provides a structure for custom extensions to instructions. Apply and write are the only instructions that apply actions in some way, as input they both contain action lists.

Instructions Description
Apply Apply action list immediately, bypass action set.
Clear Clear the action set.
Write Action Apply action list to action set.
Write Metadata Update the metadata.
Goto Continue processing at the indicated table.
Meter Apply a rate limiter.
Experimenter Custom instruction extensions.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a table MultipartRes. The action_capabilities will indicate which actions are supported by a switch.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Group Forward Groud ID: apply group processing
Output Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: send to controller
Table: controller injected packets
Local: host networking stack
Flood: non-OpenFlow flood
Normal: Non-OpenFlow dataplane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
PBB I-SID
Push/Pop VLAN ID
PBB I-SID
MPLS Set Label
Traffic Control
TTL
Bottom of Stack
Dec TTL
Push/Pop Label
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
ARP Set Opcode
Sender Hardware Address
Sender Protocol Address
Target Hardware Address
Target Protocol Address
IPv4 Set Source Address
Destination Address
DSCP
ECN
TTL
Decrement TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
IPv6 Set Source Address
Destination Address
DSCP
ECN
Flow Label
TTL
Extension Header
Dec TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port
SCTP Set Source Port
Destination Port
ICMPv4 Set Type
Code
ICMPv6 Set Type
Code
ND Target Address
ND Link-Layer Source
ND Link-Layer Target
Experimenter - -

Vendor/Experimenter Extension

Custom instructions can be carried in the Experimenter Instruction structure, custom actions can be carried in the Experimenter Action structure, or an Experimenter message can be used to carry custom extensions.

References

Instructions: OpenFlow Switch Specification 1.3.2: pages 2155-57

Actions: OpenFlow Switch Specification 1.3.2: pages 21-2557-62

Instruction Processing

Each flow entry of a flow table has a set of instructions to apply to all matching packets. These instructions can be used to modify the packets state, forward the packet to a particular port, forward the packet to another table or group for further processing and pass some metadata in the process. Each packet maintains an action set, which contains a set of actions to apply to the packet when no further table processing can be accomplished. The write and clear instructions provide ways of manipulating the action set. The apply instruction bypasses the action set and performs actions immediately. The goto insturction provides a mechanism to choose the next flow table for processing. The meter instruction allows the application of a rate limiter to the flow. The experimenter instructions provides a structure for custom extensions to instructions. Apply and write are the only instructions that apply actions in some way, as input they both contain action lists.

Instructions Description
Apply Apply action list immediately, bypass action set.
Clear Clear the action set.
Write Action Apply action list to action set.
Write Metadata Update the metadata.
Goto Continue processing at the indicated table.
Meter Apply a rate limiter.
Experimenter Custom instruction extensions.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a table MultipartRes. The action_capabilities will indicate which actions are supported by a switch.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Group Forward Groud ID: apply group processing
Output Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: send to controller
Table: controller injected packets
Local: host networking stack
Flood: non-OpenFlow flood
Normal: Non-OpenFlow dataplane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
PBB I-SID
Push/Pop VLAN ID
PBB I-SID
MPLS Set Label
Traffic Control
TTL
Bottom of Stack
Dec TTL
Push/Pop Label
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
ARP Set Opcode
Sender Hardware Address
Sender Protocol Address
Target Hardware Address
Target Protocol Address
IPv4 Set Source Address
Destination Address
DSCP
ECN
TTL
Decrement TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
IPv6 Set Source Address
Destination Address
DSCP
ECN
Flow Label
TTL
Extension Header
Dec TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port
SCTP Set Source Port
Destination Port
ICMPv4 Set Type
Code
ICMPv6 Set Type
Code
ND Target Address
ND Link-Layer Source
ND Link-Layer Target
Experimenter - -

Vendor/Experimenter Extension

Custom instructions can be carried in the Experimenter Instruction structure, custom actions can be carried in the Experimenter Action structure, or an Experimenter message can be used to carry custom extensions.

References

Instructions: OpenFlow Switch Specification 1.3.3: pages 23, 59-61

Actions: OpenFlow Switch Specification 1.3.3: pages 23-2861-66

Instruction Processing

Each flow entry of a flow table has a set of instructions to apply to all matching packets. These instructions can be used to modify the packets state, forward the packet to a particular port, forward the packet to another table or group for further processing and pass some metadata in the process. Each packet maintains an action set, which contains a set of actions to apply to the packet when no further table processing can be accomplished. The write and clear instructions provide ways of manipulating the action set. The apply instruction bypasses the action set and performs actions immediately. The goto insturction provides a mechanism to choose the next flow table for processing. The meter instruction allows the application of a rate limiter to the flow. The experimenter instructions provides a structure for custom extensions to instructions. Apply and write are the only instructions that apply actions in some way, as input they both contain action lists.

Instructions Description
Apply Apply action list immediately, bypass action set.
Clear Clear the action set.
Write Action Apply action list to action set.
Write Metadata Update the metadata.
Goto Continue processing at the indicated table.
Meter Apply a rate limiter.
Experimenter Custom instruction extensions.

Actions Stack

This version of OpenFlow can perform actions against port IDs, queue IDs, and up to 4 protocols. It is important to note that support for actions against Ethernet, IPv4, TCP, and UDP, are optional. A controller will only know if a switch supports theses optional actions based on a table MultipartRes. The action_capabilities will indicate which actions are supported by a switch.

Actions Dependencies

Actions Types

Protocol Behavior Target
Empty Drop Discards packet
Group Forward Groud ID: apply group processing
Output Forward Port ID: forward to unique port
All: flood all but ingress port
Ingress: send out ingress port
Controller: send to controller
Table: controller injected packets
Local: host networking stack
Flood: non-OpenFlow flood
Normal: Non-OpenFlow dataplane
Queue Set Queue ID
Ethernet Set Source MAC
Destination MAC
VLAN ID
VLAN Priority
PBB I-SID
PBB UCA
Push/Pop VLAN ID
PBB I-SID
MPLS Set Label
Traffic Control
TTL
Bottom of Stack
Dec TTL
Push/Pop Label
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
ARP Set Opcode
Sender Hardware Address
Sender Protocol Address
Target Hardware Address
Target Protocol Address
IPv4 Set Source Address
Destination Address
DSCP
ECN
TTL
Decrement TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
IPv6 Set Source Address
Destination Address
DSCP
ECN
Flow Label
TTL
Extension Header
Dec TTL
Copy-In TTL: copy outermost TTL to next-outermost TTL
Copy-Out TTL: copy innermost TTL to next-innermost TTL
TCP Set Source Port
Destination Port
UDP Set Source Port
Destination Port
SCTP Set Source Port
Destination Port
ICMPv4 Set Type
Code
ICMPv6 Set Type
Code
ND Target Address
ND Link-Layer Source
ND Link-Layer Target
Experimenter - -

Vendor/Experimenter Extension

Custom instructions can be carried in the Experimenter Instruction structure, custom actions can be carried in the Experimenter Action structure, or an Experimenter message can be used to carry custom extensions.

References

Instructions: OpenFlow Switch Specification 1.4.0: pages 22, 60-62

Actions: OpenFlow Switch Specification 1.4.0: pages 22-26, 62-67