Timeouts in a flow entry are used to determine when a flow entry should be removed from the OpenFlow table. Timeouts in a flow entry could either be an idle timeout or a hard timeout. The idle timeout is a fixed value attached to a flow entry, which tells the switch to remove the entry if no packet hits the flow for a certain time. The hard timeout is a fixed value in which the flow is removed from the device irrespective of whether a packet hits a flow or not. If the timeout is nonzero, the switch takes note of the time of arrival of the flow entry in the scenario; it is required to be deleted in the future.
The hard and idle timeout ranges from the value from 0 to 65535. A syslog is always generated when a flow gets deleted due to either a hard or idle timeout.
The following table shows the behavior of a nonzero and zero idle and hard time outgoing:
Idle timeout |
Hard timeout |
Action |
Nonzero value |
Zero value |
The flow compulsorily expires after the seconds set as the timeout elapses with no received traffic. |
Zero value |
Nonzero value |
The flow entry is deleted once the hard timeout elapses, with or without a packet hitting the flow entry. |
Nonzero value |
Nonzero value |
The flow entry will get deleted once the earlier idle timeout with no traffic or hard timeout seconds hits. |
Zero value |
Zero value |
The flow entry is considered a permanent flow, which does not make it time out. Only a modification message, OFPFC_DELETE, removes it from the flow table. |