CN110474845A - Flow entry eliminates method and relevant apparatus - Google Patents

Flow entry eliminates method and relevant apparatus Download PDF

Info

Publication number
CN110474845A
CN110474845A CN201910763816.2A CN201910763816A CN110474845A CN 110474845 A CN110474845 A CN 110474845A CN 201910763816 A CN201910763816 A CN 201910763816A CN 110474845 A CN110474845 A CN 110474845A
Authority
CN
China
Prior art keywords
flow entry
flow
flow table
matching
entry
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910763816.2A
Other languages
Chinese (zh)
Inventor
温振环
李佳
程喆
陆以勤
覃健诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Vcmy Technology Co Ltd
Original Assignee
Guangzhou Vcmy Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Vcmy Technology Co Ltd filed Critical Guangzhou Vcmy Technology Co Ltd
Priority to CN201910763816.2A priority Critical patent/CN110474845A/en
Publication of CN110474845A publication Critical patent/CN110474845A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • H04L49/252Store and forward routing

Abstract

The present embodiments relate to SDN technical field, a kind of flow entry provided eliminates method and relevant apparatus, which comprises receives the newly-increased flow entry that SDN controller is sent;Record field is matched for newly-increased flow entry is newly-increased, and the newly-increased flow entry after newly-increased matching record field is added in flow table;When the size of flow table is greater than preset threshold, the matching record field according to multiple flow entrys in flow table determines flow entry to be eliminated, and flow entry to be eliminated is deleted from flow table.The embodiment of the present invention is by increasing matching field newly for newly-increased flow entry, and when increasing the flow table size after newly-increased flow entry greater than preset threshold, it is determined after eliminating flow entry according to newly-increased matching field, flow entry to be eliminated is deleted from flow table, it controls the size of flow table in preset threshold, avoids flow table space spilling.

Description

Flow entry eliminates method and relevant apparatus
Technical field
The present invention relates to software defined network (SoftwareDefinedNetwork, SDN) technical fields, specifically, It is related to a kind of flow entry and eliminates method and relevant apparatus.
Background technique
In the prior art, the flow table in SDN switch plays a crucial role in SDN network, the stream in flow table The forwarding that list item is used to control and instruct SDN switch to carry out data packet.In order to support large-scale SDN network, in flow table Flow entry also sharply increases, and the memory space that flow table occupies is consequently increased.
Inventor has found under study for action, and since the memory size of SDN switch is limited, the probability that flow table space is overflowed occurs It is high, it greatly affected the efficiency of SDN switch processing data packet.
Summary of the invention
In view of this, the flow entry that is designed to provide of the embodiment of the present invention eliminates method and relevant apparatus, stream is avoided Table space overflows, and improves the efficiency of SDN switch processing data packet.
In a first aspect, the embodiment of the present invention provides a kind of superseded method of flow entry, it is applied to software defined network SDN and exchanges Machine, SDN switch and SDN controller communicate to connect, and SDN switch is previously stored with flow table, and flow table includes at least one flow table , each flow entry includes matching record field, which comprises receives the newly-increased flow entry that SDN controller is sent;For The newly-increased newly-increased matching record field of flow entry, and the newly-increased flow entry after newly-increased matching record field is added in flow table;When When the size of flow table is greater than preset threshold, the matching record field according to multiple flow entrys in flow table determines flow table to be eliminated , and flow entry to be eliminated is deleted from flow table.
Second aspect, the embodiment of the present invention provide a kind of superseded device of flow entry, are applied to software defined network SDN and exchange Machine, SDN switch and SDN controller communicate to connect, and SDN switch is previously stored with flow table, and flow table includes at least one flow table , each flow entry includes matching record field, described device receiving module, the first update module and superseded module, wherein Receiving module, for receiving the newly-increased flow entry of SDN controller transmission;First update module, for being increased newly for newly-increased flow entry Record field is matched, and the newly-increased flow entry after newly-increased matching record field is added in flow table;Module is eliminated, for when stream When the size of table is greater than preset threshold, the matching record field according to multiple flow entrys in flow table determines flow entry to be eliminated, And flow entry to be eliminated is deleted from flow table.
The third aspect, the embodiment of the present invention provide a kind of SDN switch, including processor and memory, the memory It is stored with the machine-executable instruction that can be executed by the processor, the machine-executable instruction can be performed in the processor To realize that above-mentioned flow entry eliminates method.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program, The computer program realizes that above-mentioned flow entry eliminates method when being executed by processor.
Flow entry provided in an embodiment of the present invention eliminates method and relevant apparatus, by matching word for newly-increased flow entry is newly-increased Section, and when increasing the flow table size after newly-increased flow entry greater than preset threshold, it determines according to newly-increased matching field wait eliminate stream After list item, flow entry to be eliminated is deleted from flow table, controls the size of flow table in preset threshold, avoid flow table It overflows in space.With the timeout mechanism used in the prior art, i.e., by setting flow entry effective period of time, automatically to be more than have The flow entry for imitating the failure of period is cleared up, and is only reduction of the probability that flow table space spilling occurs and is compared, the present invention is real It applies example a kind of flow entry is provided and eliminate method and relevant apparatus, can be to avoid flow table space spilling the problem of.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, preferred embodiment is cited below particularly, and cooperate Appended attached drawing, is described in detail below.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of range for those of ordinary skill in the art without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 shows application scenario diagram provided by the embodiment of the present invention.
Fig. 2 shows the flow charts that flow entry provided by the embodiment of the present invention eliminates method.
Fig. 3 is that Fig. 2 shows the flow charts of the sub-step of step S103.
Fig. 4 shows the flow chart of matching record field update method provided by the embodiment of the present invention.
Fig. 5 shows the block diagram that flow entry provided by the embodiment of the present invention eliminates device.
Fig. 6 shows the block diagram of SDN switch provided by the embodiment of the present invention.
Icon: 10-SDN interchanger;101- memory;102- communication interface;103- processor;104- bus;20-SDN Controller;30- host;200- flow entry eliminates device;201- receiving module;The first update module of 202-;203- eliminates module; The second update module of 204-.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention Middle attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only It is a part of the embodiment of the present invention, instead of all the embodiments.The present invention being usually described and illustrated herein in the accompanying drawings is real The component for applying example can be arranged and be designed with a variety of different configurations.Therefore, of the invention to what is provided in the accompanying drawings below The detailed description of embodiment is not intended to limit the range of claimed invention, but is merely representative of selected reality of the invention Apply example.Based on the embodiment of the present invention, those skilled in the art institute obtained without making creative work There are other embodiments, shall fall within the protection scope of the present invention.
Flow table is normally stored in three-state content addressing memory (the Ternary Content of SDN switch Addressable Memory, TCAM) in, since TCAM ten divides energy consumption and valuableness, to adapt to occur extensive stream in SDN network It is unpractical for measuring scene and increasing TCAM capacity to accommodate more flow entrys.The limited capacity of flow table becomes SDN switch The performance bottleneck for handling data packet, when there is the generation of many packet-in events, it is easy to flow table space overflow problem occur.
The problem of excessive caused flow table space of memory space is overflowed is occupied in order to alleviate flow table, it is usually sharp in the prior art With the timeout mechanism of OpenFlow agreement, which only comes into force whithin a period of time by the flow entry in flow table, and automatic The flow entry of old failure is cleaned up, to vacate memory space for new flow entry.When the core of the timeout mechanism is effective Between (timeout), user can specify an effective time for every flow entry, when controller issues flow entry to interchanger Setting.If time existing for certain flow entry or the time not being matched are more than presetting effective time, SDN switch The flow entry can actively be removed.Effective time is divided into hard overtime (hard timeout) and free time time-out (idle again timeout).Hard time-out, when the flow entry has been more than the hard time-out pre-seted there are the time, flow entry will by interchanger from It is removed in flow table, i.e. the absolute time that is removed from interchanger of flow entry.Idle time-out, within idle overtime this period, if There is no any datagram to be matched to the flow entry, then exchange opportunity actively removes the flow entry from flow table.I.e. flow entry from The relative time that switch device removes.
Hard time-out is inflexible, so controller can set idle time-out for flow entry rather than hard time-out under normal circumstances. Lesser free time time-out can vacate flow table space as early as possible to accommodate new flow entry, but also only be reduction of SDN flow table spilling Probability, especially under large numbers of scenes of packet-in data packet, timeout mechanism reduces the probability of SDN flow table spilling The effect of acquirement is extremely limited.
In view of this, the embodiment of the invention provides a kind of flow entrys to eliminate method and relevant apparatus, it can be to avoid flow table The problem of space is overflowed.It is described below by embodiment.
Fig. 1 is please referred to, Fig. 1 shows application scenario diagram provided by the embodiment of the present invention.In Fig. 1, SDN switch 10 with SDN controller 20 and host 30 communicate to connect, and only illustratively depict a host 30 in Fig. 1, do not represent one SDN switch 10 is only communicated to connect with host 30, in actual scene, SDN switch 10 can and multiple main frames 30 communication connections.SDN switch 10 receives the newly-increased flow entry that SDN controller 20 is sent, and is newly-increased of the newly-increased flow entry With after record field in addition flow table, when the size of flow table is greater than preset threshold, according to multiple flow entrys in flow table Flow entry to be eliminated is determined with record field, and flow entry to be eliminated is deleted from flow table.In addition, when SDN switch 10 connects When receiving the data packet of the transmission of host 30, flow table matching is carried out to the data packet according to each flow entry in flow table, works as matching When success, the matching record field of the flow entry of successful match is updated.
Referring to figure 2., Fig. 2 shows the flow chart that flow entry provided by the embodiment of the present invention eliminates method, this method The following steps are included:
Step S101 receives the newly-increased flow entry that SDN controller is sent.
In the present embodiment, the case where SDN controller 20 sends newly-increased flow entry to SDN switch 10, which may is that, works as SDN After interchanger 10 receives a data to be forwarded packet, when can not find occurrence in local flow table, it can be sent to SDN controller 20 One Packet-in message, SDN controller 20 are that the data to be forwarded packet generates a newly-increased flow entry, are sent to SDN exchange Machine 10 is handled data to be forwarded packet so that SDN switch 10 increases flow entry newly according to this;It is also possible to: SDN controller When 20 data packets for needing the port to SDN switch 10 to flow through carry out specially treated, also one can be issued to SDN switch 10 Newly-increased flow entry can also be other according to field so that SDN switch 10 carries out specially treated to the data packet for flowing through the port Scape requires to need the case where sending newly-increased flow entry to SDN switch 10.
Step S102, for the newly-increased matching record field of newly-increased flow entry, and by the new flow increasing after newly-increased matching record field List item is added in flow table.
In the present embodiment, the matching record field for increasing flow entry newly is used to record the match condition of the newly-increased flow entry, The matching temperature that the newly-increased flow entry can be determined according to the matching record field, it is preferential to select when carrying out superseded to flow entry Match lower grade flow entry carry out it is superseded, with reduce because flow entry be eliminated reduce SDN switch 10 handle data packet property Energy.
In the present embodiment, SDN switch 10 is previously stored with flow table, and each flow entry in flow table includes matching note Field is recorded, which increased newly when adding the flow entry to the flow table, when matching record field includes matching Between and matching times, wherein match time characterizes corresponding flow entry the last time by the time of successful match, matching times characterization Corresponding flow entry is by the number of successful match, wherein matching times can be flow entry from being added the flow table by successful match Number it is cumulative, be also possible to according to time attenuation parameter to from being added the flow table by the statistics of the number of successful match, It can also be that the flow entry is by the stream in the statistical value of the number of successful match or multiple preset time periods in preset time period List item not limits this by the mean value etc. of the number of successful match, the present invention.As a kind of specific embodiment, match time Occupy 16 bytes respectively with matching times, match time can be using the second as time granularity.
In the present embodiment, an initial value can be assigned to newly-increased matching record field when increasing matching record field newly, for example, Initial value with the time is current system time, and the initial value of matching times is preset value, which can be according to specific Application scenarios are set, it is ensured that newly-increased flow entry will not be when being just added flow table, and due to matching, temperature is low to be washed in a pan soon It eliminates, for example, preset value can be 5.
Step S103, the matching record when the size of flow table is greater than preset threshold, according to multiple flow entrys in flow table Field determines flow entry to be eliminated, and flow entry to be eliminated is deleted from flow table.
In the present embodiment, preset threshold is the size for the maximum memory space that flow table can be used, can be by user's root It is configured according to the needs of actual scene.After flow table is added in newly-increased flow entry, judge whether the size of flow table is greater than default threshold Value, when the size of flow table is greater than preset threshold, the matching record field according to multiple flow entrys in flow table determine one wait wash in a pan Flow entry is eliminated, which is deleted from flow table, if deleting the size of the flow table after eliminating flow entry still Greater than preset threshold, then a flow entry to be eliminated is determined again, and delete and be somebody's turn to do flow entry to be eliminated, until the size of flow table is less than Or it is equal to preset threshold.Thus, it is possible to guarantee after newly-increased flow entry is added, the size of flow table is always held at preset threshold Hereinafter, avoiding flow table space spilling.
Referring to figure 3., Fig. 3 is Fig. 2 shows the flow chart of the sub-step of step S103, and step S103 includes following sub-step It is rapid:
Sub-step S1031 obtains the size of current flow table.
Sub-step S1032, when the size of current flow table is greater than preset threshold, according to multiple streams in current flow table The matching record field of list item determines a flow entry to be eliminated, and a flow entry to be eliminated is deleted from current flow table It removes.
As an alternative embodiment, the matching record field according to multiple flow entrys in current flow table determines The method of one flow entry to be eliminated may is that
Firstly, choosing the target flow entry of preset quantity from current flow table.
In the present embodiment, preset quantity can be set according to actual needs, and preset quantity is bigger, determine wait eliminate Flow entry is more reasonable, but the computing resource of the SDN switch 10 consumed is also more, for the shadow of the performance of SDN switch 10 Sound is also bigger, conversely, the influence to the performance of SDN switch 10 is small, but the reasonability for the flow entry to be eliminated determined It can reduce.It can be according to actual needs, determine a suitable preset quantity, both to the influence of the performance of SDN switch 10 It is not too large, and make the reasonability for the flow entry to be eliminated determined within an acceptable range.
In the present embodiment, target flow entry can randomly select, and can also be added into flow table according to target flow entry Time order and function is chosen, for example, choosing the target flow entry for being added into the preset quantity of flow table earliest.
Secondly, calculating the matching temperature of each target flow entry according to the matching record field of each target flow entry.
In the present embodiment, the matching temperature of target flow entry is for characterizing the target flow entry from the last time by success The frequent degree being matched to current time is matched.
In the present embodiment, as a kind of specific implementation, the matching temperature of each target flow entry uses following public affairs Formula calculates:
Hot=match_counter- λ * (timenow-last_match_time)k
Wherein, hot is matching temperature, and match_counter is matching times, and λ is time attenuation coefficient, timenowTo work as Preceding time, last_match_time are match time, and k is damped expoential.
This formula introduces time attenuation coefficient λ and damped expoential k, has both considered historical time section to the shadow of matching temperature It rings, historical time section is suitably controlled matching temperature influence further through time attenuation coefficient and damped expoential, makes to succeed in one's scheme The matching temperature of the target flow entry of calculation is more reasonable, and the flow entry to be eliminated thereby determined that out is also more reasonable.
Third will match the minimum target flow entry of temperature and be determined as a flow entry to be eliminated.
In the present embodiment, matching temperature is minimum means the target flow entry from the last time is by successful match to working as The frequent degree that the preceding time is matched is also minimum, eliminates the minimum target flow entry of matching temperature to the performance of SDN switch 10 It influences also minimum.
Sub-step S1033 regard the flow table deleted after a flow entry to be eliminated as current flow table, in repetition again Step is stated, until the size of current flow table is less than or equal to preset threshold.
In the present embodiment, it regard the flow table after one flow entry to be eliminated of deletion as current flow table again, repeats The step of above-mentioned S1031~S1033, until the size of current flow table is less than or equal to preset threshold.
In the present embodiment, for example, sharing 5 flow entrys: 1~flow entry of flow entry 5, each flow table in initial flow table Item size is 100KB, preset quantity 3, preset threshold 550KB, and increasing flow entry newly is flow entry 6, size 100KB, Flow entry 6 is added to flow table, the size of flow table is 700KB, exceeds preset threshold 550KB, at this point, from 5 flow entrys 3 target flow entrys: flow entry 1, flow entry 4, flow entry 5 are selected, matching temperature is respectively 10,13,9, then flow entry 5 is Flow entry to be eliminated deletes flow entry 5 from flow table, at this point, flow table item size is 500KB, is less than preset threshold 550KB does not continue to then eliminate.
It should be noted that sub-step S1031~sub-step S1033 is a kind of implementation of step S103, according to It matches temperature and once eliminates a flow entry, until the size of flow table is less than or equal to preset threshold, certainly, step S103 It can be realized by way of once eliminating multiple flow entrys, can once eliminate multiple flow entrys can make the big slight of flow table In or equal to preset threshold, it can also repeatedly eliminate, eliminate multiple flow entrys every time, until the size of flow table is less than or waits In preset threshold.Determine that flow entry to be eliminated can also be according to the time of last time successful match, or from being added flow table The total degree of successful match.
In the present embodiment, in order to update the matching record field of flow entry in time, final for guaranteeing to calculate Reasonability with temperature, SDN switch 10 carry out flow table matching in the data packet for receiving the transmission of host 30, to the data packet, If successful match, need to be updated the matching record field of the flow entry of successful match, therefore, the embodiment of the present invention is also Including step S201~step S203.
Referring to figure 4., Fig. 4 shows the flow chart of matching record field update method provided by the embodiment of the present invention, Method includes the following steps:
Step S201, the data packet that receiving host is sent.
Step S202 successively carries out flow table matching to data packet according to each flow entry in flow table.
In the present embodiment, each flow entry includes multiple matching fields, also includes pair in the data packet that host 30 is sent The matching field answered, when the data packet that the value for multiple matching fields that any flow entry in flow table includes is sent with host 30 In corresponding matching field value it is consistent when, the flow entry and data packet matched success are determined, otherwise, to all streams in flow table List item successively matches data packet one by one, each flow entry with it is data packet matched failure when, then determine it fails to match.
Step S203 updates the matching record field of the flow entry of successful match when successful match.
In the present embodiment, matching times are updated first:
As a kind of specific embodiment, updating matching times can use following formula:
match_counterafter=match_counterbefore+1-λ*(timenow-last_match_time)k
Wherein, match_counterafterFor updated matching times, match_counterbeforeMatching before update Number, λ are number of decaying the time, timenowFor current time, last_match_time match time, k is damped expoential.
In the present embodiment, it is 2/3 that λ default value, which is 0.5, k default value,.
It should be noted that if match_counterafterCalculated value is less than 0, then by match_ counterafterIt is set to 0.
Secondly match time is updated:
As a kind of specific embodiment, the match time of the flow entry of successful match is updated using current time.
Compared with prior art, the embodiment of the present invention has the advantages that
Firstly, the embodiment of the present invention is by increasing matching field newly for newly-increased flow entry, and after increasing newly-increased flow entry When flow table size is greater than preset threshold, determined after eliminating flow entry according to newly-increased matching field, will flow entry be eliminated from stream It is deleted in table, controls the size of flow table in preset threshold, avoid flow table space spilling.
Secondly, the flow entry of preset quantity is selected from flow table every time, determined from the flow entry of preset quantity one to Superseded flow entry carries out superseded, has efficiently controlled the influence of the treatment process of superseded flow entry to the performance of SDN switch 10.
Third, flow entry is carried out according to the matching temperature of flow entry it is superseded so that matching the higher flow entry of temperature can The matching higher flow entry of temperature is avoided to be washed in a pan so that flow entry is superseded more reasonable with being maintained in flow table for long period The reduction of SDN switching performance caused by eliminating.
4th, when increasing matching field newly for newly-increased flow entry, to one reasonable initial value of newly-increased matching field assignment, keep away Exempt to occur newly-increased flow entry and flow table has just been added just because matching lower this unreasonable scene that is eliminated of temperature.
5th, it calculates the matching temperature of flow entry and introduces time attenuation coefficient and decaying when updating matching record field Index, so that the matching temperature of calculated flow entry is more reasonable, matching record field more effectively reflects making for flow entry With frequency, so that is retained in flow table is the matching higher flow entry of temperature.
The same invention thinking of method is eliminated based on above-mentioned flow entry, the embodiment of the invention also provides a kind of flow entrys Device is eliminated, referring to figure 5., Fig. 5 shows the box signal that flow entry provided by the embodiment of the present invention eliminates device 200 Figure.Flow entry eliminates device 200 and is applied to software defined network SDN switch 10, and SDN switch 10 and SDN controller 20 are logical Letter connection, SDN switch 10 are previously stored with flow table, and flow table includes at least one flow entry, and each flow entry includes matching Record field, flow entry eliminate device 200 and include receiving module 201, the first update module 202, eliminate module 203 and second more New module 204.
Receiving module 201, for receiving the newly-increased flow entry of SDN controller transmission.
First update module 202, for for the newly-increased matching record field of newly-increased flow entry, and by newly-increased matching record field Newly-increased flow entry afterwards is added in flow table.
Module 203 is eliminated, for when the size of flow table is greater than preset threshold, according to multiple flow entrys in flow table Flow entry to be eliminated is determined with record field, and flow entry to be eliminated is deleted from flow table.
As an implementation, it eliminates module 203 to be specifically used for: obtaining the size of current flow table;When current stream The size of table be greater than preset threshold when, the matching record field according to multiple flow entrys in current flow table determine one wait wash in a pan Flow entry is eliminated, and a flow entry to be eliminated is deleted from current flow table;Will delete a flow entry to be eliminated after Flow table is used as current flow table again, repeats the above steps, until the size of current flow table is less than or equal to preset threshold.
As a kind of specific embodiment, eliminates module 203 and determining a flow entry to be eliminated, be specifically used for from current Flow table in choose preset quantity target flow entry;Matching record field according to each target flow entry calculates each target The matching temperature of flow entry;The minimum target flow entry of temperature will be matched and be determined as a flow entry to be eliminated.
As a kind of specific embodiment, module 203 is eliminated in the matching record field meter according to each target flow entry When calculating the matching temperature of each target flow entry, it is calculated using the following equation:
Hot=match_counter- λ * (timenow-last_match_time)k
Wherein, hot is matching temperature, and match_counter is matching times, and λ is time attenuation coefficient, timenowTo work as Preceding time, last_match_time are match time, and k is damped expoential.
Second update module 204, the data packet sent for receiving host;It is successively right according to each flow entry in flow table Data packet carries out flow table matching;When successful match, the matching record field of the flow entry of successful match is updated.
As an implementation, matching record field of second update module 204 in the flow entry for updating successful match When, it is specifically used for: utilizes formula:
match_counterafter=match_counterbefore+1-λ*(timenow-last_match_time)k
Update matching times, wherein match_counterafterFor updated matching times, match_ counterbeforeMatching times before update, λ are number of decaying the time, timenowFor current time, last_match_time Match time, k are damped expoential;The match time of the flow entry of successful match is updated using current time.
Flow entry provided by the embodiment of the present invention is eliminated device 200 and for the specific hardware in equipment or can be installed on Software or firmware in equipment etc..Flow entry provided by the embodiment of the present invention eliminates device 200, realization principle and generation Technical effect is identical with preceding method embodiment, and to briefly describe, which does not refer to place, can refer to aforementioned Corresponding contents in embodiment of the method.It is apparent to those skilled in the art that for convenience and simplicity of description, it is preceding The system of description, the specific work process of device and unit are stated, the corresponding process during reference can be made to the above method embodiment, In This is repeated no more.
Fig. 6 is please referred to, Fig. 6 shows the block diagram of SDN switch 10 provided by the embodiment of the present invention.It is described SDN switch 10 includes memory 101, communication interface 102, processor 103 and bus 104, and the memory 101, communication connect Mouth 102 and processor 103 are connected by bus 104, and processor 103 is used to execute the executable module stored in memory 101, Such as computer program.
Wherein, memory 101 may include high-speed random access memory (RAM:Random Access Memory), It may further include non-labile memory (non-volatile memory), for example, at least a magnetic disk storage.By extremely A few communication interface 102 (can be wired or wireless) realizes the SDN switch 10 and SDN controller 20 or host 30 Between communication connection.
Bus 104 can be isa bus, pci bus or eisa bus etc..It is only indicated with a four-headed arrow in Fig. 6, but It is not offered as only a bus or a type of bus.
Wherein, memory 101 is for storing program, such as the superseded device 200 of flow entry shown in fig. 5.Flow entry is eliminated Device 200 includes that at least one can be stored in the memory 101 or solidify in the form of software or firmware (firmware) Software function module in the operating system (operating system, OS) of the SDN switch 10.The processor 103 after receiving and executing instruction, and executes described program to realize that the flow entry that the above embodiment of the present invention discloses eliminates method.
Processor 103 may be a kind of IC chip, the processing capacity with signal.It is above-mentioned during realization Each step of method can be completed by the integrated logic circuit of the hardware in processor 103 or the instruction of software form.On The processor 103 stated can be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), dedicated Integrated circuit (ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor Logical device, discrete hardware components.
The embodiment of the invention also includes a kind of computer readable storage mediums, are stored thereon with computer program, computer Program realizes that the flow entry applied to SDN switch 10 that above-described embodiment discloses eliminates method when being executed by processor 103.
In conclusion a kind of flow entry provided in an embodiment of the present invention eliminates method, it is applied to SDN switch, SDN exchange Machine and SDN controller communicate to connect, and SDN switch is previously stored with flow table, and flow table includes at least one flow entry, each flow table Xiang Jun includes matching record field, which comprises receives the newly-increased flow entry that SDN controller is sent;To increase flow entry newly Newly-increased matching record field, and the newly-increased flow entry after newly-increased matching record field is added in flow table;When the size of flow table When greater than preset threshold, the matching record field according to multiple flow entrys in flow table determines flow entry to be eliminated, and will be wait wash in a pan Flow entry is eliminated to delete from flow table.The embodiment of the present invention is increasing new flow increasing by increasing matching field newly for newly-increased flow entry When flow table size after list item is greater than preset threshold, determined after eliminating flow entry according to newly-increased matching field, it will be wait eliminate stream List item is deleted from flow table, controls the size of flow table in preset threshold, avoids flow table space spilling.
In embodiment provided by the present invention, it should be understood that disclosed device and method, it can be by others side Formula is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only one kind are patrolled Function division is collected, there may be another division manner in actual implementation, in another example, multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some communication interfaces, device or unit It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in embodiment provided by the invention can integrate in one processing unit, it can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing, in addition, term " the One ", " second ", " third " etc. are only used for distinguishing description, are not understood to indicate or imply relative importance.
Finally, it should be noted that embodiment described above, only a specific embodiment of the invention, to illustrate the present invention Technical solution, rather than its limitations, scope of protection of the present invention is not limited thereto, although with reference to the foregoing embodiments to this hair It is bright to be described in detail, those skilled in the art should understand that: anyone skilled in the art In the technical scope disclosed by the present invention, it can still modify to technical solution documented by previous embodiment or can be light It is readily conceivable that variation or equivalent replacement of some of the technical features;And these modifications, variation or replacement, do not make The essence of corresponding technical solution is detached from the spirit and scope of technical solution of the embodiment of the present invention.Should all it cover in protection of the invention Within the scope of.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. a kind of flow entry eliminates method, which is characterized in that be applied to software defined network SDN switch, the SDN switch It is communicated to connect with SDN controller, the SDN switch is previously stored with flow table, and the flow table includes at least one flow entry, often One flow entry includes matching record field, which comprises
Receive the newly-increased flow entry that the SDN controller is sent;
Record field is matched for the newly-increased flow entry is newly-increased, and the newly-increased flow entry after newly-increased matching record field is added to In the flow table;
When the size of the flow table is greater than preset threshold, the matching record field according to multiple flow entrys in the flow table is true Fixed flow entry to be eliminated, and flow entry to be eliminated is deleted from the flow table.
2. flow entry as described in claim 1 eliminates method, which is characterized in that described to be preset when the size of the flow table is greater than When threshold value, the matching record field according to multiple flow entrys in the flow table determines flow entry to be eliminated, and will be wait eliminate stream The step of list item is deleted from the flow table, comprising:
Obtain the size of current flow table;
When the size of the current flow table is greater than the preset threshold, according to multiple flow entrys in the current flow table Matching record field determine a flow entry to be eliminated, and by one flow entry to be eliminated from the current flow table It deletes;
It regard the flow table deleted after one flow entry to be eliminated as current flow table again, repeats the above steps, until The size of current flow table is less than or equal to the preset threshold.
3. flow entry as claimed in claim 2 eliminates method, which is characterized in that described according to more in the current flow table The step of matching record field of a flow entry determines a flow entry to be eliminated, comprising:
The target flow entry of preset quantity is chosen from the current flow table;
The matching temperature of each target flow entry is calculated according to the matching record field of each target flow entry;
The minimum target flow entry of temperature will be matched and be determined as one flow entry to be eliminated.
4. flow entry as claimed in claim 3 eliminates method, which is characterized in that the matching record field includes match time And matching times, that each target flow entry is calculated according to the matching record field of each target flow entry It is calculated using the following equation with temperature:
Hot=match_counter- λ * (timenow-last_match_time)k
Wherein, hot is matching temperature, and match_counter is matching times, and λ is time attenuation coefficient, timenowWhen being current Between, last_match_time is match time, and k is damped expoential.
5. flow entry as described in claim 1 eliminates method, which is characterized in that the SDN switch is connect with main-machine communication, The method also includes:
Receive the data packet that the host is sent;
Flow table matching successively is carried out to the data packet according to each flow entry in the flow table;
When successful match, the matching record field of the flow entry of successful match is updated.
6. flow entry as claimed in claim 5 eliminates method, which is characterized in that the matching record field includes match time And matching times, it is described update successful match flow entry matching record field the step of, comprising:
Utilize formula:
match_counterafter=match_counterbefore+1-λ*(timenow-last_match_time)k
Update matching times, wherein match_counterafterFor updated matching times, match_counterbeforeMore Matching times before new, λ are number of decaying the time, timenowFor current time, last_match_time match time, k is to decline Subtract index;
The match time of the flow entry of successful match is updated using current time.
7. a kind of flow entry eliminates device, which is characterized in that be applied to software defined network SDN switch, the SDN switch It is communicated to connect with SDN controller, the SDN switch is previously stored with flow table, and the flow table includes at least one flow entry, often One flow entry includes matching record field, and described device includes:
Receiving module, the newly-increased flow entry sent for receiving the SDN controller;
First update module, for matching record field for the newly-increased flow entry is newly-increased, and will be after newly-increased matching record field Newly-increased flow entry be added in the flow table;
Eliminate module, for when the size of the flow table be greater than preset threshold when, according to multiple flow entrys in the flow table It matches record field and determines flow entry to be eliminated, and flow entry to be eliminated is deleted from the flow table.
8. flow entry as claimed in claim 7 eliminates device, which is characterized in that the SDN switch is connect with main-machine communication, Described device further includes the second update module, and second update module is specifically used for:
Receive the data packet that the host is sent;
Flow table matching successively is carried out to the data packet according to each flow entry in the flow table;
When successful match, the matching record field of the flow entry of successful match is updated.
9. a kind of SDN switch, which is characterized in that including processor and memory, the memory is stored with can be described The machine-executable instruction can be performed to realize claim 1- in the machine-executable instruction that processor executes, the processor 6 any methods.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program Such as method of any of claims 1-6 is realized when being executed by processor.
CN201910763816.2A 2019-08-19 2019-08-19 Flow entry eliminates method and relevant apparatus Pending CN110474845A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910763816.2A CN110474845A (en) 2019-08-19 2019-08-19 Flow entry eliminates method and relevant apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910763816.2A CN110474845A (en) 2019-08-19 2019-08-19 Flow entry eliminates method and relevant apparatus

Publications (1)

Publication Number Publication Date
CN110474845A true CN110474845A (en) 2019-11-19

Family

ID=68511121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910763816.2A Pending CN110474845A (en) 2019-08-19 2019-08-19 Flow entry eliminates method and relevant apparatus

Country Status (1)

Country Link
CN (1) CN110474845A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111585903A (en) * 2020-04-13 2020-08-25 华南理工大学 OpenFlow flow table item self-adaptive timeout method and system
CN112838989A (en) * 2019-11-25 2021-05-25 中兴通讯股份有限公司 Data stream management method, network equipment and storage medium
CN114221849A (en) * 2020-09-18 2022-03-22 芯启源(南京)半导体科技有限公司 Method for realizing intelligent network card by combining FPGA with TCAM
CN117240811A (en) * 2023-08-30 2023-12-15 中科驭数(北京)科技有限公司 Data message processing method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219150A (en) * 2014-09-03 2014-12-17 杭州华三通信技术有限公司 Method and device for issuing flow tables
US8964751B2 (en) * 2013-03-11 2015-02-24 Dell Products L.P. System and method for storing flow entries in hardware tables
CN104639443A (en) * 2015-02-16 2015-05-20 杭州华三通信技术有限公司 Method and device for rapidly forwarding message
US20150249572A1 (en) * 2014-03-03 2015-09-03 Futurewei Technologies, Inc. Software-Defined Network Control Using Functional Objects
CN105224692A (en) * 2015-11-03 2016-01-06 武汉烽火网络有限责任公司 Support the system and method for the SDN multilevel flow table parallel search of polycaryon processor
WO2016053225A1 (en) * 2014-09-29 2016-04-07 Hewlett Packard Enterprise Development Lp Dynamic allocation of flow table capacity
WO2017000235A1 (en) * 2015-06-30 2017-01-05 华为技术有限公司 Flow table ageing method, switch and controller
CN108924047A (en) * 2018-06-20 2018-11-30 新华三技术有限公司 A kind of flow entry storage method, device, interchanger and computer-readable medium
CN109921996A (en) * 2018-12-29 2019-06-21 长沙理工大学 A kind of virtual flow stream searching method of high performance OpenFlow

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8964751B2 (en) * 2013-03-11 2015-02-24 Dell Products L.P. System and method for storing flow entries in hardware tables
US20150249572A1 (en) * 2014-03-03 2015-09-03 Futurewei Technologies, Inc. Software-Defined Network Control Using Functional Objects
CN104219150A (en) * 2014-09-03 2014-12-17 杭州华三通信技术有限公司 Method and device for issuing flow tables
WO2016053225A1 (en) * 2014-09-29 2016-04-07 Hewlett Packard Enterprise Development Lp Dynamic allocation of flow table capacity
CN104639443A (en) * 2015-02-16 2015-05-20 杭州华三通信技术有限公司 Method and device for rapidly forwarding message
WO2017000235A1 (en) * 2015-06-30 2017-01-05 华为技术有限公司 Flow table ageing method, switch and controller
CN105224692A (en) * 2015-11-03 2016-01-06 武汉烽火网络有限责任公司 Support the system and method for the SDN multilevel flow table parallel search of polycaryon processor
CN108924047A (en) * 2018-06-20 2018-11-30 新华三技术有限公司 A kind of flow entry storage method, device, interchanger and computer-readable medium
CN109921996A (en) * 2018-12-29 2019-06-21 长沙理工大学 A kind of virtual flow stream searching method of high performance OpenFlow

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112838989A (en) * 2019-11-25 2021-05-25 中兴通讯股份有限公司 Data stream management method, network equipment and storage medium
CN111585903A (en) * 2020-04-13 2020-08-25 华南理工大学 OpenFlow flow table item self-adaptive timeout method and system
CN111585903B (en) * 2020-04-13 2021-09-21 华南理工大学 OpenFlow flow table item self-adaptive timeout method and system
CN114221849A (en) * 2020-09-18 2022-03-22 芯启源(南京)半导体科技有限公司 Method for realizing intelligent network card by combining FPGA with TCAM
CN114221849B (en) * 2020-09-18 2024-03-19 芯启源(南京)半导体科技有限公司 Method for realizing intelligent network card by combining FPGA with TCAM
CN117240811A (en) * 2023-08-30 2023-12-15 中科驭数(北京)科技有限公司 Data message processing method and system

Similar Documents

Publication Publication Date Title
CN110474845A (en) Flow entry eliminates method and relevant apparatus
JP7039685B2 (en) Traffic measurement methods, devices, and systems
CN104601696B (en) Service processing method, service calling system, device and system
CN108965485A (en) Management method, device and the cloud platform of container resource
CN109451540B (en) Resource allocation method and equipment for network slices
CN101583160B (en) Device for realizing hierarchical quality of service business and method
US10348683B2 (en) Network packet filtering via media access control (MAC) address learning
CN104468401A (en) Message processing method and device
CN108595503A (en) Document handling method and server
CN107547364A (en) Route sending-down method, device and the network equipment
CN108924203B (en) Data copy self-adaptive distribution method, distributed computing system and related equipment
CN108304272B (en) Data IO request processing method and device
CN108738078A (en) A kind of transmission side data subtraction unit, equipment and readable storage medium storing program for executing
CN107113323B (en) Data storage method, device and system
CN109800074A (en) Task data concurrently executes method, apparatus and electronic equipment
CN110851275B (en) Load transfer method and device of routing node
CN108551485A (en) A kind of streaming medium content caching method, device and computer storage media
CN110213073A (en) Data flow variation, electronic equipment, calculate node and storage medium
TWI488473B (en) Auto configuration server and management method for customer premises equipments thereof
CN109670691A (en) Method, equipment and the customer service system distributed for customer service queue management and customer service
CN106161068B (en) Recovery prompting and distributing method for network resources and controller
CN109525497A (en) A kind of traffic packet method, data centre network system and controller
CN116915709B (en) Load balancing method and device, electronic equipment and storage medium
JP2020077088A (en) Access control method, access control device and data processing device
KR100745679B1 (en) Method and apparatus for packet scheduling using adaptation round robin

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191119