FlowMod

This is one of the main messages, it allows the controller to modify the state of an OpenFlow switch; All FlowMod messages begin with the standard OpenFlow header, containing the appropriate version and type values, followed by the FlowMod structure.
Initiator
Controller
Acknowledged
No

Structure

This message begins with the standard header and is followed by match, a cookie, which is an opaque field set by the controller, and command which specifies the type of flow table modification. This is followed by idle_timeout, hard_timeout and priority. Idle_timeout and hard_timeout represent number of seconds since packet inactivity and creation since expiration, respectively. Priority implies an order for matches that overlap with higher numbers representing higher priorities. Next in the FlowMod are buffer_id, out_port and flags. Buffer_id is the id of buffered packet that created a packet_in, make FlowMod and then reprocess the packet. Flag is set whether the flow can: send FlowRemoved, send Error if overlap, or function only if controller connectivity is lost. Finally, actions specifies what actions should be taken for matching packets.

Message Structure

Name Bits Byte Ordering Constraints
match 32 MSBF match restrictions
cookie 64 MSBF != 0xFFFFFFFFFFFFFFFF
command 16 MSBF See below
idle_timeout 8 - none
hard_timeout 8 - none
priority 8 - none
buffer_id 32 MSBF none
out_port 16 MSBF none
flags 16 MSBF See below
action[] 32 MSBF action restrictions

Message Constraints

Field Name Value
Command Add 0x0000
Modify 0x0001
ModifyStrict 0x0002
Delete 0x0003
DeleteStrict 0x0004
Flag SendFlowRem 0x0001
CheckOverlap 0x0002
Emerg 0x0003

References

OpenFlow Switch Specification 1.0.0, pages 27-29

Structure

This message begins with the standard header and is followed by cookie, which is an opaque field set by the controller, its mask, table id and command which specifies the type of flow table modification. This is followed by idle_timeout, hard_timeout and priority. Idle_timeout and hard_timeout represent number of seconds since packet inactivity and creation since expiration, respectively. Priority implies an order for matches that overlap with higher numbers representing higher priorities. Next in the FlowMod are buffer_id, out_port, out_group and flags. Buffer_id is the id of buffered packet that created a packet_in, make FlowMod and then reprocess the packet. Finally, after 2 byte padding, match and instructions are added in the end.

Message Structure

Name Bits Byte Ordering Constraints
cookie 64 MSBF != 0xFFFFFFFFFFFFFFFF
cookie_mask 64 MSBF none
table_id 8 - != 0xFF
command 8 - See below
idle_timeout 16 MSBF none
hard_timeout 16 MSBF none
priority 16 MSBF none
buffer_id 32 MSBF none
out_port 32 MSBF none
out_group 32 MSBF none
flags 16 MSBF See below
padding 16 - none
match 32 MSBF match restrictions
instruction[] 32 MSBF instruction restrictions

Message Constraints

Field Name Value
Command Add 0x00
Modify 0x01
ModifyStrict 0x02
Delete 0x03
DeleteStrict 0x04
Flag SendFlowRem 0x0001
CheckOverlap 0x0002

References

OpenFlow Switch Specification 1.1.0, pages 39-41

Structure

This message begins with the standard header and is followed by cookie, which is an opaque field set by the controller, its mask, table id and command which specifies the type of flow table modification. This is followed by idle_timeout, hard_timeout and priority. Idle_timeout and hard_timeout represent number of seconds since packet inactivity and creation since expiration, respectively. Priority implies an order for matches that overlap with higher numbers representing higher priorities. Next in the FlowMod are buffer_id, out_port, out_group and flags. Buffer_id is the id of buffered packet that created a packet_in, make FlowMod and then reprocess the packet. Finally, after 2 byte padding, match and instructions are added in the end.

Message Structure

Name Bits Byte Ordering Constraints
cookie 64 MSBF != 0xFFFFFFFFFFFFFFFF
cookie_mask 64 MSBF none
table_id 8 - != 0xFF
command 8 - See below
idle_timeout 16 MSBF none
hard_timeout 16 MSBF none
priority 16 MSBF none
buffer_id 32 MSBF none
out_port 32 MSBF none
out_group 32 MSBF none
flags 16 MSBF See below
padding 16 - none
match 32 MSBF match restrictions
instruction[] 32 MSBF instruction restrictions

Message Constraints

Field Name Value
Command Add 0x00
Modify 0x01
ModifyStrict 0x02
Delete 0x03
DeleteStrict 0x04
Flag SendFlowRem 0x0001
CheckOverlap 0x0002
ResetCounts 0x0004

References

OpenFlow Switch Specification 1.2.0, pages 46-48

Structure

This message begins with the standard header and is followed by cookie, which is an opaque field set by the controller, its mask, table id and command which specifies the type of flow table modification. This is followed by idle_timeout, hard_timeout and priority. Idle_timeout and hard_timeout represent number of seconds since packet inactivity and creation since expiration, respectively. Priority implies an order for matches that overlap with higher numbers representing higher priorities. Next in the FlowMod are buffer_id, out_port, out_group and flags. Buffer_id is the id of buffered packet that created a packet_in, make FlowMod and then reprocess the packet. Finally, after 2 byte padding, match and instructions are added in the end.

Message Structure

Name Bits Byte Ordering Constraints
cookie 64 MSBF != 0xFFFFFFFFFFFFFFFF
cookie_mask 64 MSBF none
table_id 8 - != 0xFF
command 8 - See below
idle_timeout 16 MSBF none
hard_timeout 16 MSBF none
priority 16 MSBF none
buffer_id 32 MSBF none
out_port 32 MSBF none
out_group 32 MSBF none
flags 16 MSBF See below
padding 16 - none
match 32 MSBF match restrictions
instruction[] 32 MSBF instruction restrictions

Message Constraints

Field Name Value
Command Add 0x00
Modify 0x01
ModifyStrict 0x02
Delete 0x03
DeleteStrict 0x04
Flag SendFlowRem 0x0001
CheckOverlap 0x0002
ResetCounts 0x0004
NoPacketCounts 0x0010
NoByteCounts 0x0020

References

OpenFlow Switch Specification 1.3.0, pages 54-56

Structure

This message begins with the standard header and is followed by cookie, which is an opaque field set by the controller, its mask, table id and command which specifies the type of flow table modification. This is followed by idle_timeout, hard_timeout and priority. Idle_timeout and hard_timeout represent number of seconds since packet inactivity and creation since expiration, respectively. Priority implies an order for matches that overlap with higher numbers representing higher priorities. Next in the FlowMod are buffer_id, out_port, out_group and flags. Buffer_id is the id of buffered packet that created a packet_in, make FlowMod and then reprocess the packet. Finally, after 2 byte padding, match and instructions are added in the end.

Message Structure

Name Bits Byte Ordering Constraints
cookie 64 MSBF != 0xFFFFFFFFFFFFFFFF
cookie_mask 64 MSBF none
table_id 8 - != 0xFF
command 8 - See below
idle_timeout 16 MSBF none
hard_timeout 16 MSBF none
priority 16 MSBF none
buffer_id 32 MSBF none
out_port 32 MSBF none
out_group 32 MSBF none
flags 16 MSBF See below
padding 16 - none
match 32 MSBF match restrictions
instruction[] 32 MSBF instruction restrictions

Message Constraints

Field Name Value
Command Add 0x00
Modify 0x01
ModifyStrict 0x02
Delete 0x03
DeleteStrict 0x04
Flag SendFlowRem 0x0001
CheckOverlap 0x0002
ResetCounts 0x0004
NoPacketCounts 0x0010
NoByteCounts 0x0020

References

OpenFlow Switch Specification 1.3.1, pages 64-66

Coming Soon
This content is under development.
Coming Soon
This content is under development.
Coming Soon
This content is under development.