## 4 Proposed Scheme  
In this section, we introduce a new flow entry replacement method considering the traffic characteristics, called the SFF scheme. Controversial flow replacement schemes such as FIFO, LRU and LFU do not consider traffic pattern when replacing flow entries. On the contrary, the SFF scheme takes into account the traffic characteristics. It classifies the flow into short flow and long flow with matching periods of the flow entry. The short flow is a flow entry generated by packets that occur temporarily for intermittent services like the web. In general, it matches only for a short time and does not match after a certain period of time. Therefore, the short flow can be deleted quickly after it is not used for some time. On the other hand, the long flow has recurring packets and matches repeatedly with a period. Multimedia services are one example of the long flow and it should stay in the flow table until the services end to prevent overhead from happening such as deleting or regenerating the flow entry. The proposed SFF scheme reflects the flow characteristics to manage the table. In the SFF scheme, the ones with the short flow are chosen as the candidates for replacement prior to others when a flow entry needs to be replaced due to flow table overflow. The entries of the long flow are excluded from the first replacement candidates and given the opportunity to stay longer in the flow table. The SFF scheme uses a matching period of the flow entry to figure out the flow characteristics. Figure 4 shows the process of identifying the flow characteristics based on the flow matching period. In the figure, the matching period represents the inter-arrival time of two successive packets that the same flow has. \(T\) represent the time difference between the current and the last packet arrived. In the SFF scheme, when the initial packet arrives to generate a new flow entry, the characteristics of that flow are assigned as the short flow. If the short flow entry matches with the second arriving packet before being deleted from the flow table, this entry changes into the long flow. The time between the first and second packets becomes the matching period, \(t\), of that flow and Maximum Waiting Time (MWT) of that flow is established as \(\alpha\cdot t\) where \(\alpha\) is the weighting factor. The entry that changed into the long flow is kept as the long flow if the interval between the arrival times of the two packets is smaller  
Figure 3: An example of inefficient flow entry replacements. than the MWT. The long entry flow should be stayed a bit more in the flow table even though the packet corresponding to the long flow entry does not arrive after the MWT passes since the long flow entry has the possibility of receiving the packet again. When a packet belonging to the long flow entry does not arrive within the MWT, the entry is changed into the short flow. If the entry that changed into the short flow matches a packet again before being deleted from the flow table, a new matching period will be generated with the inter-arrival time of packets and the entry is changed into the long flow again. The characteristics of the flow entries are figured out in this manner and each of them has a different matching period and different MMTs. If the flow table overflow occurs, the flow entry replacement scheme is applied only to the entries identified as short flow among those in the flow table. If there is no short flow, the flow entry replacement scheme selects and deletes an entry among the long flow entries. Figure 5 is the pseudo code of the SFF scheme. When a packet is entered to the switch, it searches the flow entry matching with the packet in the flow table (line 6). If the matched flow entry is existed, the switch sets the MWT of the entry as the product of \(\alpha\) and matching period between the last updated and the current times (line 8). After that, the switch sets the type of the entry as the long flow (line 9).