CN105490827B - A kind of method and device obtaining network state - Google Patents

A kind of method and device obtaining network state Download PDF

Info

Publication number
CN105490827B
CN105490827B CN201410474867.0A CN201410474867A CN105490827B CN 105490827 B CN105490827 B CN 105490827B CN 201410474867 A CN201410474867 A CN 201410474867A CN 105490827 B CN105490827 B CN 105490827B
Authority
CN
China
Prior art keywords
triggering
flow
data packet
ofs
network state
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.)
Active
Application number
CN201410474867.0A
Other languages
Chinese (zh)
Other versions
CN105490827A (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410474867.0A priority Critical patent/CN105490827B/en
Priority to PCT/CN2015/076075 priority patent/WO2016041341A1/en
Publication of CN105490827A publication Critical patent/CN105490827A/en
Application granted granted Critical
Publication of CN105490827B publication Critical patent/CN105490827B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks

Abstract

The embodiment of the invention discloses a kind of method and devices for obtaining network state, which comprises the data packet that open flow switch OFS will acquire is matched with the multilevel flow table comprising operational order and triggering table;The OFS is according to matched as a result, determining the corresponding operational order of the data packet;When the corresponding operational order of the data packet is directed toward the triggering table, the OFS compares item according to the triggering in the triggering table and carries out report condition judgement to the data packet;When the result of the judgement of acquisition meets preset triggering report condition, the OFS generates network state information according to the result of the judgement, and the network state information is sent to open flow controller OFC, so that OFC is got current network state information in real time and is monitored in real time to network, improves OFC to the susceptibility of network state, reaction speed and quality of network management.

Description

A kind of method and device obtaining network state
Technical field
The present invention relates to network communication technology field more particularly to a kind of method and devices for obtaining network state.
Background technique
SDN (software-defined network) network is a kind of new network framework that control is isolated with management, Its core technology OpenFlow is realized by separating the data forwarding layer and control layer of switching equipment in OpenFlow interchanger Upper forwarding data, control the forwarding of data on the controller, to preferably control network, the SDN based on OpenFlow is realized The separation of software and hardware and the virtualization of bottom hardware, and the upgrading of network protocol and exchanging policy only needs to change control Layer, provides good development platform for the innovation of core network and application, in addition, applying in the junction of internal network and outer net OpenFlow interchanger can enhance the safety of corporate intranet by changing path and the certain data flows of refusal of data flow Property.SDN is disposed higher layer policy by task equipment, and the network equipment carries out data forwarding under higher layer policy guidance, reduces network Equipment carrying, improves the flexibility of network design planning and management.
In the prior art, the controller in SDN network inquires the information such as flow table, port by issuing data packet, to obtain Take network state.
From the above it can be seen that the method that the prior art provides is not able to satisfy the needs that controller obtains network state in real time.
Summary of the invention
The embodiment of the invention provides a kind of method and devices for obtaining network state, open in the prior art for solving Stream controller can not obtain the problem of network state in real time.
First aspect present invention provides a kind of method for obtaining network state, which comprises
The data packet that open flow switch OFS will acquire is matched with multilevel flow table, is obtained matched as a result, described Multilevel flow table includes operational order and triggering table, and the triggering table includes that item is compared in triggering;
The OFS is according to described matched as a result, determining the corresponding operational order of the data packet;
When the corresponding operational order of the data packet is directed toward the triggering table, the OFS is according in the triggering table Triggering compares item and carries out report condition judgement to the data packet, obtains the result of judgement;
When the result of the judgement meets preset triggering report condition, the OFS is raw according to the result of the judgement The network state information is sent at network state information, and to open flow controller OFC.
In conjunction with first aspect present invention, in the first implementation of first aspect present invention, the open flow switch Before the data packet that OFS will acquire is matched with multilevel flow table further include:
It includes in flow table that the OFS, which receives flow table editor's message Flow-Mod, the Flow-Mod that the OFC is sent, Hold and item is compared in the triggering;
OFS multilevel flow table according to the flow table composition of content;
The OFS compares item according to the triggering and constructs the triggering table;
The triggering table is added to the multilevel flow table end by the OFS, and establishes the multilevel flow table and the touching The corresponding relationship delivered.
In conjunction with the first of first aspect present invention and first aspect implementation, second of first aspect present invention is real In existing mode, the OFS includes: according to the flow table composition of content multilevel flow table
The OFS divides the flow table content according to preset matching field, to obtain at least two subflow tables;
The OFS is according to preset order by the subflow table pack at the multilevel flow table.
In conjunction with the first to second implementation of first aspect present invention, first aspect, the of first aspect present invention It is described to be specifically included to the open flow controller OFC transmission network state information in three kinds of implementations:
The OFS constructs Packet-in data packet, and the network state information is added to the Packet-in number According to the extended field of packet;
The OFS sends the Packet-in data packet for adding the network state information to the OFC.
In conjunction with the third of first aspect present invention and first aspect implementation, the 4th kind of reality of first aspect present invention In existing mode, the matched result is a data packet matched flow entry in the multilevel flow table;
Before the construction Packet-in data packet further include:
The OFS judges whether to have constructed according to the operational order in the flow entry to match with the data packet Packet-in data packet;
The construction Packet-in data packet, and the network state information is added to the Packet-in data The extended field of packet specifically includes:
When not constructing the Packet-in data packet, then the OFS constructs Packet-in data packet, and will be described Network state information is added to the Packet-in data packet;
When the constructed Packet-in data packet, then the OFS construction reanson field is warning's Packet-in data packet, and the network state information is added to the Packet-in number that reanson field is warning According to packet.
In conjunction with first to fourth kind of implementation of first aspect present invention, first aspect, the of first aspect present invention In five kinds of implementations, the method also includes:
When the corresponding operational order of the data packet is directed toward the triggering table, the OFS updates current network state And counter corresponding with the flow entry in the data packet matched multilevel flow table.
Second aspect of the present invention provides a kind of method for obtaining network state, which comprises
Open flow controller OFC constructs flow table editor message Flow-Mod, and the Flow-Mod includes flow table content and touching Hair compares item, and the triggering compares item and refers to network state activation threshold value set, needs report network state for judging whether;
The OFC sends the Flow-Mod to open flow switch OFS, so that the OFS is according in the flow table Hold and item building multilevel flow table is compared in the triggering, and according to the multilevel flow table report network status information;
The OFC receives the network status messages that the OFS is sent.
In conjunction with second aspect of the present invention, in the first implementation of second aspect of the present invention, described in the OFC is received After the network status messages that OFS is sent further include:
The OFC updates triggering according to the network status messages and compares item;
The triggering of update is compared item and is added to the Flow-Mod by the OFC, to obtain the Flow-Mod updated;
The OFC sends the Flow-Mod of the update to the OFS, so that the OFS is according to the update Flow-Mod updates multilevel flow table.
Third aspect present invention provides a kind of open flow switch OFS, and the OFS includes:
First execution unit, the data packet for will acquire are matched with multilevel flow table, are obtained matched as a result, institute Stating multilevel flow table includes operational order and triggering table, and the triggering table includes that item is compared in triggering;
First determination unit, it is matched as a result, determining the data packet for being obtained according to first execution unit Corresponding operational order;
First judging unit is used for when the corresponding operational order of the data packet is directed toward the triggering table, the OFS root Compare item according to the triggering in the triggering table and report condition judgement is carried out to the data packet, obtains the result of judgement;
Second execution unit, for when the result of the judgement meets preset triggering report condition, the OFS according to The result of the judgement generates network state information;
First transmission unit, for sending the network state information to open flow controller OFC.
In conjunction with third aspect present invention, in the first implementation of third aspect present invention, which is characterized in that described OFS further include:
First receiving unit, the flow table editor's message Flow-Mod sent for receiving the OFC, the Flow-Mod packet It includes flow table content and item is compared in the triggering;
First configuration unit, for according to the flow table composition of content multilevel flow table;
Second configuration unit constructs the triggering table for comparing item according to the triggering;
Third execution unit for the triggering table to be added to the multilevel flow table end, and establishes the multilevel flow The corresponding relationship of table and the triggering table.
In conjunction with the first of third aspect present invention and the third aspect implementation, second of third aspect present invention is real In existing mode, first configuration unit is specifically included:
First configuration module, for dividing the flow table content according to preset matching field, to obtain at least Two sub- flow tables;
Second configuration module is used for the subflow table pack according to preset order into the multilevel flow table.
In conjunction with the first to second implementation of third aspect present invention and the third aspect, the of third aspect present invention In three kinds of implementations, the second execution unit, specifically for when the result of the judgement meets preset triggering report condition, Packet-in data packet is constructed, and the network state information is added to the extended field of the Packet-in data packet;
First transmission unit adds the Packet-in number of the network state information specifically for sending to the OFC According to packet.
In conjunction with third aspect present invention and the third aspect first to the third implementation, the of third aspect present invention In four kinds of implementations, the matched result is a data packet matched flow entry in the multilevel flow table;Institute State OFS further include:
Second judgment unit, for judging whether according to the operational order in the flow entry to match with the data packet Packet-in data packet is constructed;
Second execution unit described further further include:
Third configuration module, for constructing Packet-in data when not constructing the Packet-in data packet Packet, and the network state information is added to the Packet-in data packet;
4th configuration module, for when the constructed Packet-in data packet, then the OFS to construct reanson Field is the Packet-in data packet of warning, and the network state information is added to reanson field and is The Packet-in data packet of warning.
In conjunction with first to fourth kind of implementation of third aspect present invention and the third aspect, the of third aspect present invention In five kinds of implementations, the OFS further include:
Updating unit, for updating current net when the corresponding operational order of the data packet is directed toward the triggering table Network state and counter corresponding with the flow entry in the data packet matched multilevel flow table.
Fourth aspect present invention provides a kind of open flow controller OFC, and the OFC includes:
First configuration unit, for construct flow table editor's message Flow-Mod, the Flow-Mod include flow table content and Item is compared in triggering, and the triggering compares item and refers to network state activation threshold value set, needs report network shape for judging whether State;
First transmission unit, for sending the Flow-Mod to open flow switch OFS so that the OFS according to Item building multilevel flow table is compared in the flow table content and the triggering, and according to the multilevel flow table report network status information;
Receiving unit, the network state information sent for receiving the OFS.
In conjunction with fourth aspect present invention, in the first implementation of fourth aspect present invention, the OFC further include:
Updating unit compares item for updating triggering according to the network status messages;
Second configuration unit is added to the Flow-Mod for item to be compared in the triggering of update, to obtain update Flow-Mod;
Second transmission unit, for sending the Flow-Mod of the update to the OFS, so that the OFS is according to institute The Flow-Mod for stating update updates multilevel flow table.
According to the description of first aspect and the embodiment of the present invention of the third aspect, in the data packet and multilevel flow that will acquire When table is matched, the corresponding operational order of the data packet is determined, described in the corresponding operational order direction of the data packet When triggering table, the OFS compares item according to the triggering in the triggering table and carries out report condition judgement to the data packet, when sentencing Disconnected result is when meeting preset triggering report condition, generates network state information according to the result of the judgement, and to opening Release the controller OFC transmission network state information has so that OFC can get current network state information in real time Effect improves OFC to the susceptibility and reaction speed of network state, improves quality of network management.
According to the description of second aspect and the embodiment of the present invention of fourth aspect, touched by being added in the end of Flow-Mod Hair compares item and is extended to Flow-Mod, so that also having issued preset triggering report condition while issuing flow table, makes OFS can construct new multithread table structure according to Flow-Mod, and the judgement process that item is compared in execution triggering obtains current network Then status information timely reports network state information, realize the real time monitoring to network, improves the safety of network Property and stability.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will make below to required in the embodiment of the present invention Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of one embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 2 is a kind of another embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 3 is a kind of another embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 4 is a kind of another embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 5 is a kind of another embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 6 is a kind of another embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 7 is a kind of another embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 8 is a kind of another embodiment schematic diagram for the method for obtaining network state in the present embodiment;
Fig. 9 is a kind of one embodiment schematic diagram of open flow switch OFS in the present embodiment;
Figure 10 is a kind of another embodiment schematic diagram of open flow switch OFS in the present embodiment;
Figure 11 is a kind of another embodiment schematic diagram of open flow switch OFS in the present embodiment;
Figure 12 is a kind of another embodiment schematic diagram of open flow switch OFS in the present embodiment;
Figure 13 is a kind of one embodiment schematic diagram of open flow controller OFC in the present embodiment;
Figure 14 is a kind of another embodiment schematic diagram of open flow controller OFC in the present embodiment;
Figure 15 is a kind of Flow-Mod structural schematic diagram of extension in the present embodiment;
Figure 16 is a kind of entity apparatus schematic diagram of open flow switch OFS in the present embodiment;
Figure 17 is a kind of entity apparatus schematic diagram of open flow controller OFC in the present embodiment.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those skilled in the art are not having Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Description and claims of this specification and term " first ", " second ", " third " " in above-mentioned attached drawing Four " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein or describing Sequence other than appearance is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that covering is non-exclusive Include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to clearly arrange Those of out step or unit, but may include be not clearly listed or it is solid for these process, methods, product or equipment The other step or units having.
The embodiment of the invention provides a kind of method and devices for obtaining network state, control in the prior art for solving Server can not obtain the problem of network state in real time.It is described in detail below.
The embodiment of the present invention is applied to Openflow network, and Openflow network includes open flow controller (Openflow Controller, OFC), open flow switch (Openflow switch, OFS), it should be noted that herein operation include It jumps to subsequent a certain flow table to continue with, modify data packet set of actions corresponding with data packet is immediately performed etc., network Status information include flow entry matching status, data packet execute port load condition, loss/forwarding/receive the sum of data packet The similar situations such as amount or data packet TTR failure, as long as any network state being likely to occur in network is included, herein In be not construed as limiting.
Please refer to Fig. 1, a kind of method one embodiment for obtaining network state includes: in the embodiment of the present invention
101, the data packet that open flow switch OFS will acquire is matched with multilevel flow table;
OFS obtains the data packet in network, and parses to the data packet, and matched with multilevel flow table, obtains It is matched as a result, multilevel flow table include operational order and triggering table, triggering table include triggering compare item;
Wherein, it after data packet enters interchanger, will successively be matched since flow table 0, flow table can be in subsequent processing Bypass the immediate leadership from small to large in order and jump, but the smaller flow table of number cannot be jumped to forward from a certain flow table.Flow entry will be with excellent The sequence of first grade height is matched with data packet, after data packet is successfully matched to a flow entry, can update the stream first The statistical data (such as data packet number and total bytes that successful match occurs etc.) of the corresponding counter records of list item, then Corresponding operating is carried out according to the instruction in flow entry (such as to jump to subsequent a certain flow table and continue with, modify or immediately Execute corresponding set of actions of the data packet etc.).When data packet has been in the last one flow table, corresponding set of actions Everything instruction in (Action Set), which will be performed, (such as to be forwarded to certain Single port, a certain field of modification data packet, loses Abandon data packet etc.).
102, OFS is according to matched as a result, determining the corresponding operational order of data packet;
103, when the corresponding operational order of data packet is directed toward triggering table, it is right that OFS according to the triggering in triggering table compares item Data packet carries out report condition judgement;
The judgement process that item is compared in all triggerings in triggering table is executed to obtain after completing the judgement that item is compared in all triggerings Take the result of judgement;
104, when the result for determining judgement is to meet preset triggering report condition, OFS is generated according to the result of judgement Current network state information.
105, OFS sends network state information to open flow controller OFC.
In the embodiment of the present invention, the data packet that will acquire is matched with the multilevel flow table comprising triggering table, data packet pair When the operational order answered is directed toward triggering table, the judgement process that item is compared in the triggering in triggering table is executed, when the result judged is full Enough when preset triggering report condition, current network state information is generated;Network state information is sent to OFC, so that OFC Current network state information can be got in real time and network is monitored in real time, improve OFC to the quick of network state Sensitivity, reaction speed and quality of network management.
Referring to figure 2., in the embodiment of the present invention it is a kind of obtain network state method one embodiment include:
201, OFS receives flow table editor's message Flow-Mod that OFC is sent;
Flow-Mod includes that item is compared in flow table content and triggering;
OFS compares item construction triggering table according to flow table composition of content multilevel flow table, and according to triggering;
Wherein, specific configuration multilevel flow table implementation is as follows:
OFS divides flow table content according to preset matching field, to obtain at least two subflow tables;
OFS is according to preset order by subflow table pack at multilevel flow table.
202, triggering table is added to multilevel flow table end by OFS, and establishes the corresponding relationship of multilevel flow table Yu triggering table;
Flow-Mod is stored in multilevel flow table by the triggering table of multilevel flow table end for storing alarm information;
Herein, the corresponding relationship are as follows:
It is the triggering index being directed toward in triggering table by last operation setting of multilevel flow table, specific implementation is such as Under:
Corresponding operation is executed according to the operation in flow entry, when the last one subflow table of completion forwarding, and is determined last When any operation of flow entry is directed toward triggering index Trigger ID in triggering table in one sub- flow table, last height is executed All operations in flow entry in flow table;
The data packet is sent to triggering table, item is compared in the triggering that each Trigger ID corresponds to same operation type, It should be noted that herein presented multilevel flow table with triggering table corresponding relationship implementation with it is where like, not It repeats again.
203, the data packet that OFS will acquire is matched with multilevel flow table;
OFS obtains the data packet in network, and parses to the data packet, and matched with multilevel flow table, obtains It is matched as a result, the multilevel flow table include operational order and triggering table, the triggering table include triggering compare item.
204, OFS is according to matched as a result, determining the corresponding operational order of data packet.
205, when the corresponding operational order of data packet is directed toward triggering table, it is right that OFS according to the triggering in triggering table compares item Data packet carries out report condition judgement;
The judgement process that item is compared in all triggerings in triggering table is executed to obtain after completing the judgement that item is compared in all triggerings Take the result of judgement.
206, when the result for determining judgement is to meet preset triggering report condition, OFS is generated according to the result of judgement Current network state information;
Wherein, flow entry includes counter and overtime timer, and triggering is compared item and specifically included:
When being more than default value to the counting of matched data packet according to counter, determination meets tape in preset triggering Part;
The maximum idle time existing for the overtime timer is more than preset time threshold or maximum residual time lower than default In time threshold at least one when, determination meets preset triggering report condition, it should be noted that herein presented default Triggering compares item and can be 16 Hard_timeout, Flow table status 64 Packet Matches, Group 32 Packet Count of status, Flow entry status 32 Duration (seconds), Port status 64 64 Transmitted Packets, Port status Receive Overrun Errors etc. similar inspection , in this regard, being not construed as limiting herein.
207, OFS sends network state information to open flow controller OFC;
Network state information is sent to OFC to specifically include: construction Packet-in data packet, and by network state information It is added to the extended field of Packet-in data packet, and sends the Packet-in data packet of addition network state information to OFC.
In the embodiment of the present invention, the Flow-Mod message that item is compared in the default triggering in end that OFC is issued is obtained, and using pre- The end first constructed is provided with the multithread table structure of triggering table, so that determining in flow entry after being matched to corresponding flow entry Operation be directed toward triggering table in trigger index when, data packet is jumped into triggering table;Execution reports judgement process, so that network-like When state meets preset triggering report condition, current network state information is sent to OFC, enables OFC to current net Network state, which is made, timely and effectively to be handled and monitors in real time, improves OFC to the susceptibility of network state, reaction speed and net Network management quality.
Referring to figure 3., in the embodiment of the present invention it is a kind of obtain network state method one embodiment include:
301, the data packet that OFS will acquire is matched with multilevel flow table;
OFS obtains the data packet in network, and parses to the data packet, and by the data packet and multilevel flow after parsing Table is matched, and obtains matched as a result, multilevel flow table includes operational order and triggering table, and triggering table includes that item is compared in triggering, The corresponding triggering index of item is compared in triggering.
It should be noted that triggering table is arranged in multilevel flow table end under normal circumstances, but also can be set in multistage Any one of multiple subflow tables place in flow table, as long as specifically setting position is able to achieve the extension to multilevel flow table herein Function is not construed as limiting herein.
302, after completing multilevel flow table forwarding, data packet matched into multilevel flow table a flow entry, OFS is determined When triggering table is directed toward in last operation in flow entry, data packet is jumped to triggering table by OFS.
303, OFS executes the stream of the preset value of item compared with whether judgement network parameter relevant with data packet exceeds triggering Journey;
After completing triggering and comparing the judgement process of item, determine that the result of judgement is to meet preset triggering report condition When, the result that will exceed all judgements that preset value in item is compared in triggering is set as current network state information, wherein default The triggering that value is 0 compares item and does not execute deterministic process, and generates the result of a total judgement;
304, OFS judges whether to have constructed Packet- according to the operational order in the flow entry to match with subdata packet In data packet, if so, 305 are thened follow the steps, if it is not, thening follow the steps 306;
305, OFS constructs the Packet-in data packet that reanson field is warning;
Alarm type is added in the domain Reason of Packet-in data packet;
Item is compared in the triggering for meeting triggering report condition to be added in the domain Reason;
The trigger action item in all corresponding triggering table of operation in every flow entry comprising alarm type;
Network state information is added in the Packet-in data packet that reanson field is warning.
306, OFS constructs a Packet-in data packet;
After constructing a Packet-in data packet, network state information is added to Packet-in data packet.
307, the Packet-in data packet for adding network state information is sent to OFC by OFS;
Trigger action item corresponding with the operation in triggering index is executed, Packet-in data packet is sent to OFC.
In the embodiment of the present invention, in the embodiment of the present invention, the data packet that will acquire and the multilevel flow table comprising triggering table into Row matching when the corresponding operational order of data packet is directed toward triggering table, executes the judgement process that item is compared in the triggering in triggering table, when The result of judgement is to generate current network state information when meeting preset triggering report condition, and by network state information It is added in Packet-in data packet, and is sent to OFC, so that OFC can gets current network state information in real time It is monitored in real time with to network, improves OFC to the susceptibility of network state, reaction speed and quality of network management.
Referring to figure 4., in the embodiment of the present invention it is a kind of obtain network state method one embodiment include:
401, OFS receives flow table editor's message Flow-Mod that OFC is sent;
Flow-Mod includes that item is compared in flow table content and triggering;
OFS compares item construction triggering table according to flow table composition of content multilevel flow table, and according to triggering;
Wherein, specific configuration multilevel flow table implementation is as follows:
OFS divides flow table content according to preset matching field, to obtain at least two subflow tables;
OFS is according to preset order by subflow table pack at multilevel flow table.
402, triggering table is added to multilevel flow table end by OFS, and establishes the corresponding relationship of multilevel flow table Yu triggering table;
It should be noted that triggering table is arranged in multilevel flow table end under normal circumstances, but also can be set in multistage Any one of multiple subflow tables place in flow table, as long as specifically setting position is able to achieve the extension to multilevel flow table herein Function is not construed as limiting herein.
Flow-Mod is stored in multilevel flow table by the triggering table of multilevel flow table end for storing alarm information;
Flow-Mod is stored in multilevel flow table and is specifically included:
Multilevel flow table is split as at least two subflow tables according to matching field feature, and by Flow-Mod split to Few two sub-blocks, so that at least two sub-blocks are respectively stored in corresponding subflow table;
Herein, the corresponding relationship are as follows: by last operation setting of multilevel flow table be directed toward triggering table in triggering Index, specific implementation are as follows:
Corresponding operation is executed according to the operation in the flow entry, when the last one subflow table of completion forwarding, and is determined When any operation of flow entry is directed toward triggering index Trigger ID in triggering table in the last one subflow table, last is executed All operations in flow entry in a sub- flow table;
The data packet is sent to triggering table, item is compared in the triggering that each Trigger ID corresponds to same operation type, It should be noted that herein presented multilevel flow table with triggering table corresponding relationship implementation with it is where like, not It repeats again;
The data packet that multilevel flow table 403, OFS will acquire is matched with multilevel flow table;
OFS obtains the data packet in network, and parses to the data packet, and matched with multilevel flow table, obtains It is matched as a result, multilevel flow table include operational order and triggering table, triggering table include triggering compare item.
Wherein, it after data packet enters interchanger, will successively be matched since flow table 0, flow table can be in subsequent processing Bypass the immediate leadership from small to large in order and jump, but the smaller flow table of number cannot be jumped to forward from a certain flow table.Flow entry will be with excellent The sequence of first grade height is matched with data packet, after data packet is successfully matched to a flow entry, can update the stream first The statistical data (such as data packet number and total bytes that successful match occurs etc.) of the corresponding counter records of list item, then Corresponding operating is carried out according to the instruction in flow entry (such as to jump to subsequent a certain flow table and continue with, modify or immediately Execute corresponding set of actions of the data packet etc.).When data packet has been in the last one flow table, corresponding set of actions Everything instruction in (Action Set), which will be performed, (such as to be forwarded to certain Single port, a certain field of modification data packet, loses Abandon data packet etc.).
404, after completing multilevel flow table forwarding, data packet matched into multilevel flow table a flow entry determines the stream When triggering table is directed toward in last operation in list item, which is sent to triggering table by OFS.
405, OFS executes the stream of the preset value of item compared with whether judgement network parameter relevant with data packet exceeds triggering Journey;
After completing triggering and comparing the judgement process of item, determine that the result of judgement is to meet preset triggering report condition When, the result that will exceed all judgements that preset value in item is compared in triggering is set as current network state information, wherein default The triggering that value is 0 compares item and does not execute deterministic process.
406, whether OFS has constructed Packet-in number according to the operation judges in the flow entry to match with subdata packet According to packet, if so, 407 are thened follow the steps, if it is not, thening follow the steps 408;
407, OFS constructs the Packet-in data packet that a reason field is warning;
Alarm type is added in the domain Reason of Packet-in data packet;
Item is compared in the triggering for meeting triggering report condition to be added in the domain Reason;
The trigger action item in all corresponding triggering table of operation in every flow entry comprising alarm type;
Network state information is added in the Packet-in data packet that reanson field is warning.
408, OFS constructs a Packet-in data packet;
After constructing a Packet-in data packet, network state information is added to the Packet-in data packet.
409, the Packet-in data packet for adding network state information is sent to OFC by OFS;
Trigger action item corresponding at least one operation at least one triggering index is executed, by Packet-in data Packet is sent to OFC.
In the embodiment of the present invention, in the embodiment of the present invention, the Flow- that item is compared in the default triggering in end that OFC is issued is obtained Mod message, and it is provided with using the end constructed in advance the multithread table structure of triggering table, so that being matched to corresponding flow entry Afterwards, when determining that triggering index in triggering table is directed toward in the operation in flow entry, data packet is jumped into triggering table;Execution reports judgement Current network state information when so that network state meeting preset triggering report condition, is sent to OFC by process, so that OFC can make timely and effectively processing and monitoring in real time to current network state, improve OFC to the quick of network state Sensitivity, reaction speed and quality of network management.
Referring to figure 5., in the embodiment of the present invention it is a kind of obtain network state method one embodiment include:
501, OFS receives flow table editor's message Flow-Mod that OFC is sent;
Flow-Mod includes that item is compared in flow table content and triggering;
OFS compares item construction triggering table according to flow table composition of content multilevel flow table, and according to triggering;
Wherein, specific configuration multilevel flow table implementation is as follows:
OFS divides flow table content according to preset matching field, to obtain at least two subflow tables;
OFS is according to preset order by subflow table pack at multilevel flow table.
502, triggering table is added to multilevel flow table end by OFS, and establishes the corresponding relationship of multilevel flow table Yu triggering table;
Herein, the corresponding relationship are as follows: by last operation setting of multilevel flow table be directed toward triggering table in triggering Index, specific implementation are as follows:
Corresponding operation is executed according to the operation in the flow entry, when the last one subflow table of completion forwarding, and is determined When any operation of flow entry is directed toward triggering index Trigger ID in triggering table in the last one subflow table, last is executed All operations in flow entry in a sub- flow table;
The data packet is sent to triggering table, item is compared in the triggering that each Trigger ID corresponds to same operation type, It should be noted that herein presented multilevel flow table with triggering table corresponding relationship implementation with it is where like, not It repeats again;
It should be noted that triggering table is arranged in multilevel flow table end under normal circumstances, but also can be set in multistage Any one of multiple subflow tables place in flow table, as long as specifically setting position is able to achieve the extension to multilevel flow table herein Function is not construed as limiting herein.
Flow-Mod is stored in multilevel flow table by the triggering table of multilevel flow table end for storing alarm information;
Flow-Mod is stored in multilevel flow table and is specifically included:
Multilevel flow table is split as at least two subflow tables according to matching field feature, Flow-Mod is split at least Two sub-blocks, at least two sub-blocks are respectively stored in corresponding subflow table;
It is the triggering index being directed toward in triggering table by last operation setting of multilevel flow table.
503, the data packet that OFS will acquire is matched with multilevel flow table;
OFS obtains the data packet in network, and parses to the data packet, and matched with multilevel flow table, obtains It is matched as a result, multilevel flow table include operational order and triggering table, triggering table include triggering compare item.
Wherein, it after data packet enters interchanger, will successively be matched since flow table 0, flow table can be in subsequent processing Bypass the immediate leadership from small to large in order and jump, but the smaller flow table of number cannot be jumped to forward from a certain flow table.Flow entry will be with excellent The sequence of first grade height is matched with data packet, after data packet is successfully matched to a flow entry, can update the stream first The statistical data of the corresponding counter records of list item.
504, after completing multilevel flow table forwarding, data packet matched into multilevel flow table a flow entry, OFS is determined When triggering table is directed toward in last operation in flow entry, data packet is jumped to triggering table by OFS;
Successively data packet is matched with the flow entry in subflow table;
When this it is data packet matched to a flow entry when, update the statistical data of counter records corresponding with flow entry, Such as counter information, this is not construed as limiting herein, wherein at least two subdata packets are according to the flow entry being matched to Flow entry priority matched from high to low with flow entry;
It is operated according to the operation in flow entry, when completion forwards the last one subflow table, and last determining height When triggering index Trigger ID in triggering table is directed toward in last operation of flow entry in flow table, the last one subflow table is executed In flow entry in all operations;
Data packet is jumped into triggering table, item is compared in the triggering that each Trigger ID corresponds to same operation type.
505, the knot of the judgement of the preset value of item compared with whether OFS exceeds triggering according to network parameter relevant with data packet Fruit judges whether to meet preset triggering report condition, if so, 506 are thened follow the steps, if it is not, then terminating;
It executes all triggerings in triggering table and indexes the corresponding judgement process for triggering and comparing item;
After completing the judgement that item is compared in all triggerings, the result of judgement is obtained
506, the result that OFS will exceed all judgements that preset value in item is compared in triggering is set as network state information;
Wherein, flow entry includes counter and overtime timer, and triggering is compared item and specifically included:
When being more than default value to the counting of matched data packet according to counter, determination meets tape in preset triggering Part;
The maximum idle time existing for the overtime timer is more than preset time threshold or maximum residual time lower than default In time threshold at least one when, determination meets preset triggering report condition, it should be noted that herein presented default Triggering compares item and can be 16 Hard_timeout, Flow table status 64 Packet Matches, Group 32 Packet Count of status, Flow entry status 32 Duration (seconds), Port status 64 64 Transmitted Packets, Port status Receive Overrun Errors etc. similar inspection , in this regard, being not construed as limiting herein.
Execute the process of the preset value of item compared with whether judgement network parameter relevant with data packet exceeds triggering;
After completing triggering and comparing the judgement process of item, determine that the result of judgement is to meet preset triggering report condition When, the result that will exceed all judgements that preset value in item is compared in triggering is set as current network state information, wherein default The triggering that value is 0 compares item and does not execute deterministic process.
507, network state information is sent to OFC by OFS;
Trigger action item corresponding with the operation in triggering index is executed, and Packet-in data packet is sent to OFC.
In the embodiment of the present invention, the Flow-Mod message that item is compared in the default triggering in end that OFC is issued is obtained, and using pre- The end first constructed is provided with the multithread table structure of triggering table, so that determining in flow entry after being matched to corresponding flow entry Operation be directed toward triggering table in trigger index when, send data packets to triggering table;Execution reports judgement process, so that network-like When state meets preset triggering report condition, current network state information is sent to OFC, enables OFC to current net Network state, which is made, timely and effectively to be handled and monitors in real time, improves OFC to the susceptibility of network state, reaction speed and net Network management quality.
For ease of understanding, the embodiment of the present invention is described in detail with a concrete application scene below, referring to Fig. 6, The embodiment of the present invention it is a kind of obtain network state another embodiment of method include:
601, OFS receives flow table editor's message Flow-Mod that OFC is sent;
Flow-Mod includes that item is compared in flow table content and triggering;
OFS compares item construction triggering table according to flow table composition of content multilevel flow table, and according to triggering;
Wherein, specific configuration multilevel flow table implementation is as follows:
OFS divides flow table content according to preset matching field, to obtain n sub- flow tables;
OFS is according to preset order by subflow table pack at n grades of flow tables.
The part Trigger-extension in n grades of flow tables is the expansion in the embodiment of the present invention to Flow-Mod I.e. item is compared in triggering, as shown in Figure 15 in Figure of description:
602, OFS is in n grades of flow table end addition triggering tables;
Triggering table is added to n grades of flow table ends by OFS, and establishes the corresponding relationship of n grades of flow tables and triggering table, the n grades of stream The expansion of table is identical with Trigger-extension described in step 601, and details are not described herein again, n grades of flow table ends Triggering table for storing alarm information, Flow-Mod is stored in multilevel flow table;
The corresponding relationship are as follows:
It is that the triggering being directed toward in triggering table indexes Trigger ID by last operation setting of multilevel flow table, it is specific real Existing mode is as follows:
Corresponding operation is executed according to the operation in flow entry, when the last one subflow table of completion forwarding, and is determined last When any operation of flow entry is directed toward triggering index Trigger ID in triggering table in one sub- flow table, last height is executed All operations in flow entry in flow table;
Flow-Mod is stored in multilevel flow table and is specifically included:
N grades of flow tables are split as at least two subflow tables according to preset matching field feature, and Flow-Mod is carried out At least two sub-blocks are split, at least two sub-blocks are respectively stored in corresponding subflow table;
It is the triggering index being directed toward in triggering table by last operation setting of multilevel flow table.
603, the data packet that OFS will acquire is matched with n grades of flow tables;
Wherein, it after data packet enters interchanger, will successively be matched since flow table 0, flow table can be in subsequent processing Bypass the immediate leadership from small to large in order and jump, but the smaller flow table of number cannot be jumped to forward from a certain flow table.Flow entry will be with excellent The sequence of first grade height is matched with data packet, after data packet is successfully matched to a flow entry, can update the stream first The statistical data of the corresponding counter records of list item.
When this it is data packet matched to a flow entry when, update the statistical data of counter records corresponding with flow entry, Such as counter information, this is not construed as limiting herein, wherein at least two subdata packets are according to the flow entry being matched to Flow entry priority matched from high to low with flow entry;
Wherein, it is matched especially by the matching domain of flow entry with data packet.
604, when the flow entry in data packet matched to n grades flow tables, OFS determines last behaviour in Flow entry1 When making action direction Trigger ID 2, OFS sends data packets to Trigger Table;
It is operated according to the operation in flow entry, when completion forwards the last one flow table n, and flow table in determining flow table n When the triggering that at least one operation of item is directed toward in triggering table indexes Trigger ID, the flow table in the last one subflow table is executed All operations in;
Triggering table is sent data packets to, item is compared in the triggering that each Trigger ID corresponds to same operation type.
After the data packet has executed Flow table 1, Flow table 2 ... Flow table n, data are parsed Last operation setting of Flow table n is to turn in triggering table by the Trigger-extension in packet Trigger ID, shown in table specific as follows:
605, OFS executes the stream of the preset value of item compared with whether judgement network parameter relevant with data packet exceeds triggering Journey;
In completing the judgement process that item is compared in triggering, status64 Transmitted Packets marks of Port should The data traffic that port receives is more than preset value, it is determined that the result of judgement is to meet preset triggering report condition, therefore should The result for the judgement that item is compared in item triggering is set as current network state information.
606, OFS judges whether to have constructed Packet-in data packet according to the flow entry to match with subdata packet, if It is then to carry out step 607, if it is not, then carrying out step 608;
607, OFS constructs the Packet-in data packet that a reason field is warning;
Alarm type is added in the domain Reason of Packet-in data packet;
Item is compared in satisfaction triggering to be added in the domain Reason;
When determining that the value for triggering and comparing and at least comparing item in the presence of a triggering in item is more than preset threshold, by Packet Domain is added to Packet-in data packet end;
The trigger action item in all corresponding triggering table of operation in every flow entry comprising alarm type.
608, OFS adds triggering table in Packet-in data packet end;
When being included in the judgement process for executing triggering report condition in the triggering table, item is compared in the triggering more than preset threshold Numerical value.
609, network state information is added in Packet-in data packet by OFS;
610, the Packet-in data packet for adding network state information is sent to OFC by OFS;
Trigger action item corresponding at least one operation at least one triggering index is executed, by Packet-in data Packet is sent to OFC.
In the embodiment of the present invention, in the embodiment of the present invention, the Flow- that item is compared in the default triggering in end that OFC is issued is obtained Mod message, and it is provided with using the end constructed in advance the multithread table structure of triggering table, so that being matched to corresponding flow entry Afterwards, when determining that triggering index in triggering table is directed toward in the operation in flow entry, data packet is jumped into triggering table;Execution reports judgement Current network state information when so that network state meeting preset triggering report condition, is sent to OFC by process, so that OFC, which can make current network state, timely and effectively to be handled and monitors in real time, improves OFC to the sensitivity of network state Degree, reaction speed and quality of network management.
The method for obtaining network state a kind of in the embodiment of the present invention is carried out with the angle of open flow switch OFS above Description, is below described in detail the embodiment of the present invention with the angle of open flow controller OFC, referring to Fig. 7, its In, triggering table is stored in OFC, and triggering table is used to store the stream that all flow tables in item and open flow switch OFS are compared in triggering The information of list item, a kind of another embodiment for the method obtaining network state includes: in the embodiment of the present invention
701, open flow controller OFC constructs flow table editor message Flow-Mod;
Flow-Mod includes flow table content and item is compared in triggering, and triggering compares item and refers to network state activation threshold value set, For judging whether to need report network state;
Flow-Mod is extended by comparing item in the addition triggering of the end of Flow-Mod, so that issuing flow table Preset triggering report condition has also been issued simultaneously;
Wherein, which compares item for end being provided with the more of the triggering table when the data packet that will acquire of OFS Grade flow table is matched, and data packet matched the last item flow entry in the multilevel flow table, is determined in flow entry When the triggering table is directed toward in last operation, the data packet is sent to the triggering table, so that described in OFS execution All triggering indexes are corresponding in triggering table triggers the judgement process for comparing item, when the result of judgement is to meet preset touching When sending out report condition, current network state information is generated according to the result of judgement.
702, OFC sends Flow-Mod to open flow switch OFS;
The Flow-Mod is sent to OFS so that OFS according in the Flow-Mod flow table content and triggering compare a structure Multilevel flow table is built, and adds the triggering table in multilevel flow table end, item is compared into the triggering of the end Flow-Mod and is stored in multistage Triggering table in flow table, and be that the triggering being directed toward in the triggering table indexes by last operation setting of multilevel flow table, with When the data packet that will acquire OFS is matched with the multilevel flow table, data packet is jumped into triggering table, thereby executing preset The judgement for triggering report condition, to obtain network state information, and is reported;
703, OFC receives the network state information that OFS is sent.
After the network state information for receiving OFS transmission, OFC can be according to the network state information currently obtained to net The monitoring of network implementation can carry out effectively or timely handling, such as modification firewall etc..
In the embodiment of the present invention, Flow-Mod is extended by comparing item in the addition triggering of the end of Flow-Mod, So that also having issued preset triggering report condition while issuing flow table, construct OFS newly according to Flow-Mod Multithread table structure, the judgement process that item is compared in execution triggering obtain current network state information, then timely will be network-like State information reporting realizes the real time monitoring to network, improves the safety and stability of network.
Referring to Fig. 8, a kind of another embodiment of method for obtaining network state includes: in the embodiment of the present invention
801, open flow controller OFC constructs flow table editor message Flow-Mod;
Flow-Mod includes flow table content and item is compared in triggering, and triggering compares item and refers to network state activation threshold value set, For judging whether to need report network state;
Flow-Mod is extended by comparing item in the addition triggering of the end of Flow-Mod, so that issuing flow table Preset triggering report condition has also been issued simultaneously;
Wherein, which compares item for end being provided with the more of the triggering table when the data packet that will acquire of OFS Grade flow table is matched, and data packet matched the last item flow entry in the multilevel flow table, is determined in flow entry When the triggering table is directed toward in last operation, the data packet is sent to the triggering table, so that described in OFS execution All triggering indexes are corresponding in triggering table triggers the judgement process for comparing item, when the result of judgement is to meet preset touching When sending out report condition, current network state information is generated according to the result of judgement.
802, OFC sends Flow-Mod to open flow switch OFS;
The Flow-Mod is sent to OFS so that OFS according in the Flow-Mod flow table content and triggering compare a structure Multilevel flow table is built, and adds the triggering table in multilevel flow table end, item is compared into the triggering of the end Flow-Mod and is stored in multistage Triggering table in flow table, and be that the triggering being directed toward in the triggering table indexes by last operation setting of multilevel flow table, with When the data packet that will acquire OFS is matched with the multilevel flow table, data packet is jumped into triggering table, thereby executing preset The judgement for triggering report condition, to obtain network state information, and is reported;
803, OFC receives the network state information that OFS is sent.
After the network state information for receiving OFS transmission, OFC can be according to the network state information currently obtained to net The monitoring of network implementation can carry out effectively or timely handling, such as modification firewall etc..
804, network state activation threshold value set is issued to OFS by OFC;
Network state activation threshold value set is issued to the OFS, is fallen into a trap so that OFS updates flow entry according to comparison result The statistical data of number device record, and the network state activation threshold value set is compared;
805, OFC updates Flow-Mod according to network state information;
OFC updates triggering according to the network status messages and compares item, and item is compared in the triggering of update and is added to Flow- Mod, to obtain the Flow-Mod updated;
OFC sends the Flow-Mod updated to OFS, so that OFS updates multilevel flow table according to the Flow-Mod of update.
Wherein, OFC according to the network status messages updates triggering to compare a specific implementation as follows:
According to the information and updated flow entry of current network state and equipment, the triggering needed is selected from triggering table Compare item, and item is compared into remaining triggering and sets 0;
The end that item is added to the Flow-Mod is compared into the triggering of selection, so that Flow-Mod updates.
In the embodiment of the present invention, Flow-Mod is extended by comparing item in the addition triggering of the end of Flow-Mod, So that also having issued preset triggering report condition while issuing flow table, construct OFS newly according to Flow-Mod Multithread table structure, the judgement process that item is compared in execution triggering obtain current network state information, then timely will be network-like State information reporting, and triggering table is updated according to the network state information received, so as to update the Flow- issued as needed Mod realizes the real time monitoring to network, improves the safety and stability of network.
The method obtained above to a kind of network state of the embodiment of the present invention has carried out for example, below with tool face angle Degree is illustrated open flow switch OFS a kind of in the embodiment of the present invention, referring to Fig. 9, one kind is opened in the embodiment of the present invention The one embodiment for releasing interchanger includes:
First execution unit 901, the data packet for will acquire are matched with multilevel flow table, obtain matched knot Fruit, the multilevel flow table include operational order and triggering table, and the triggering table includes that item is compared in triggering;
First determination unit 902, for described matched as a result, determining the corresponding operational order of the data packet;
First judging unit 903 is used for when the corresponding operational order of the data packet is directed toward the triggering table, described OFS compares item according to the triggering in the triggering table and carries out report condition judgement to the data packet, obtains the result of judgement;
Second execution unit 904, for when the result of the judgement meets preset triggering report condition, the OFS Network state information is generated according to the result of the judgement;
First transmission unit 905, for sending the network state information to open flow controller OFC.
In the embodiment of the present invention, the first execution unit 901 matches data packet with the multilevel flow table comprising triggering table, When the corresponding operational order of data packet is directed toward triggering table, sentencing for item is compared in the triggering that the first judging unit 903 executes in triggering table Cutout journey generates current network state information when the result of judgement is to meet preset triggering report condition;First sends Network state information is sent to OFC by unit 905, so that OFC can get current network state information and in real time to net Network is monitored in real time, is improved OFC to the susceptibility and reaction speed of network state, is improved quality of network management.
Referring to Fig. 10, a kind of another embodiment of open flow switch includes: in the embodiment of the present invention
First execution unit 1001, the data packet for will acquire are matched with multilevel flow table, obtain matched knot Fruit, the multilevel flow table include operational order and triggering table, and triggering table includes that item is compared in triggering;
First determination unit 1002 is used for according to matched as a result, determining the corresponding operational order of data packet;
First judging unit 1003, for triggering in table when the corresponding operational order of data packet is directed toward the triggering table Triggering compare item to data packet carry out report condition judgement, obtain the result of judgement;
Second execution unit 1004, when meeting preset triggering report condition for the result when judgement, according to judgement As a result network state information is generated;
First transmission unit 1005, for sending network state information to open flow controller OFC.
Optionally, the OFS further include:
First receiving unit 1006, for receiving the flow table editor message Flow-Mod of OFC transmission, the Flow-Mod packet It includes flow table content and item is compared in triggering;
First configuration unit 1007, for according to flow table composition of content multilevel flow table;
Second configuration unit 1008, for comparing item construction triggering table according to triggering;
Third execution unit 1009 for triggering table to be added to multilevel flow table end, and establishes multilevel flow table and triggering The corresponding relationship of table.
Wherein, the first configuration unit 1007 specifically includes:
First configuration module 10071, for dividing the flow table content according to preset matching field, to obtain At least two subflow tables;
Second configuration module 10072 is used for the subflow table pack according to preset order into multilevel flow table.
In the embodiment of the present invention, the first execution unit 1001 is by data packet and includes the multilevel flow table progress for triggering table Match, when the corresponding operational order of data packet is directed toward triggering table, item is compared in the triggering that the first judging unit 1003 executes in triggering table Judgement process, the result for meeting the judgement of preset triggering report condition generates current network by the second execution unit 1004 Status information;Network state information is sent to OFC by the first transmission unit 1005 so that OFC can get in real time it is current Network state information and network is monitored in real time, improves OFC to the susceptibility and reaction speed of network state, improve Quality of network management.
Please refer to Figure 11, a kind of another embodiment of open flow switch includes: in the embodiment of the present invention
First execution unit 1101, the data packet for will acquire are matched with multilevel flow table, obtain matched knot Fruit, multilevel flow table include operational order and triggering table, and triggering table includes that item is compared in triggering;
First determination unit 1102 is used for according to matched as a result, determining the corresponding operational order of data packet;
First judging unit 1103 is used for when the corresponding operational order of data packet is directed toward triggering table, according in triggering table Triggering compare item to data packet carry out report condition judgement, obtain the result of judgement;
Second execution unit 1104, when meeting preset triggering report condition for the result when judgement, according to judgement As a result network state information is generated;
First transmission unit 1105, for sending network state information to open flow controller OFC.
Optionally, the OFS further include:
First receiving unit 1106, for receiving the flow table editor message Flow-Mod of OFC transmission, the Flow-Mod packet It includes flow table content and item is compared in triggering;
First configuration unit 1107, for according to flow table composition of content multilevel flow table;
Second configuration unit 1108, for comparing item construction triggering table according to triggering;
Third execution unit 1109 for triggering table to be added to multilevel flow table end, and establishes multilevel flow table and triggering The corresponding relationship of table.
Optionally, matched result is a data packet matched flow entry in the multilevel flow table;
The OFS further include:
Second judgment unit 1110, for according to the operational order in the flow entry to match with the data packet, judgement Whether Packet-in data packet has been constructed;
Further, the second execution unit 1104 further include:
Third configuration module 11041, for constructing Packet-in number when not constructing the Packet-in data packet It is added to the Packet-in data packet according to packet, and by the network state information;
4th configuration module 11042, for when the constructed Packet-in data packet, then the OFS to be constructed Reanson field is the Packet-in data packet of warning, and the network state information is added to reanson field and is The Packet-in data packet of warning.
In the embodiment of the present invention, the first execution unit 1101 is by data packet and includes the multilevel flow table progress for triggering table Match, third execution unit 1109 receives Flow-Mod construction multilevel flow table according to the first receiving unit 1106 and establishes multistage The corresponding relationship of flow table and triggering table, so that the first judging unit 1103 is directed toward triggering table in the corresponding operational order of data packet When, the judgement process that item is compared in the triggering in triggering table is executed, the 4th configuration module 11042 construction reanson field is The Packet-in data packet of warning, and it is warning's that the network state information, which is added to reanson field, Packet-in data packet guarantees that reporting for network state can also be completed under data packet abnormal conditions;First transmission unit Packet-in data packet comprising network state information is sent to OFC by 1105 so that OFC can get in real time it is current Network state information and network is monitored in real time, improves OFC to the susceptibility and reaction speed of network state, improve Quality of network management.
Please refer to Figure 12, a kind of another embodiment of open flow switch includes: in the embodiment of the present invention
First execution unit 1201, the data packet for will acquire are matched with multilevel flow table, obtain matched knot Fruit, multilevel flow table include operational order and triggering table, and triggering table includes that item is compared in triggering;
First determination unit 1202 is used for according to matched as a result, determining the corresponding operational order of data packet;
First judging unit 1203 is used for when the corresponding operational order of data packet is directed toward triggering table, according in triggering table Triggering compare item to data packet carry out report condition judgement, obtain the result of judgement;
Second execution unit 1204, when meeting preset triggering report condition for the result when judgement, according to judgement As a result network state information is generated;
First transmission unit 1205, for sending network state information to open flow controller OFC.
Wherein, the second execution unit 1204 meets preset triggering report condition specifically for the result when the judgement When, Packet-in data packet is constructed, and the network state information is added to the extension word of the Packet-in data packet Section;
First transmission unit 1205 adds the Packet- of the network state information specifically for sending to the OFC In data packet.
Optionally, the OFS further include:
First receiving unit 1206, for receiving the flow table editor message Flow-Mod of OFC transmission, the Flow-Mod packet It includes flow table content and item is compared in triggering;
First configuration unit 1207, for according to flow table composition of content multilevel flow table;
Second configuration unit 1208, for comparing item construction triggering table according to triggering;
Third execution unit 1209 for triggering table to be added to multilevel flow table end, and establishes multilevel flow table and triggering The corresponding relationship of table.
Optionally, the OFS further include:
Updating unit 1210, for updating current net when the corresponding operational order of data packet is directed toward the triggering table Network state and counter corresponding with the flow entry in data packet matched multilevel flow table.
In the embodiment of the present invention, the first execution unit 1201 is by data packet and includes the multilevel flow table progress for triggering table Match, third execution unit 1209 receives Flow-Mod construction multilevel flow table according to the first receiving unit 1206 and establishes multistage The corresponding relationship of flow table and triggering table, so that the first judging unit 1203 is directed toward triggering table in the corresponding operational order of data packet When, updating unit 1210 updates current network state and meter corresponding with the flow entry in data packet matched multilevel flow table Number device, and execute the triggering in triggering table and compare the judgement process of item, and the judgement of preset triggering report condition will be met As a result current network state information is generated;First transmission unit 1205 will include network state information Packet-in data packet It is sent to OFC, so that OFC can get current network state information in real time and monitor in real time to network, is improved OFC improves quality of network management to the susceptibility and reaction speed of network state.
Please refer to Figure 13, a kind of one embodiment of open flow controller OFC includes: in the embodiment of the present invention
First configuration unit 1301, for construct flow table editor's message Flow-Mod, Flow-Mod include flow table content and Item is compared in triggering, which compares item and refer to network state activation threshold value set, needs report network state for judging whether;
First transmission unit 1302, for sending Flow-Mod to open flow switch OFS, so that OFS is according to flow table Item building multilevel flow table is compared in content and triggering, and according to multilevel flow table report network status information;
Receiving unit 1303, for receiving the network state information of OFS transmission.
In the embodiment of the present invention, the building of the first configuration unit 1301 includes the Flow- that item is compared in flow table content and triggering Mod is handed down to OFS by the first transmission unit 1302, so that OFS is carried out by data packet and the multilevel flow table comprising triggering table Matching, and corresponding operational order is directed toward when triggering table, is compared item to triggering and is judged, and reports preset triggering is met The result of the judgement of condition generates network state information, and receiving unit 1303 receives the network state information that OFS is sent, thus root According to getting current network state information and monitoring in real time to network, OFC is improved to the susceptibility of network state, anti- Answer speed and quality of network management.
Please refer to Figure 14, a kind of one embodiment of open flow controller OFC includes: in the embodiment of the present invention
First configuration unit 1401, for construct flow table editor's message Flow-Mod, Flow-Mod include flow table content and Item is compared in triggering, which compares item and refer to network state activation threshold value set, needs report network state for judging whether;
First transmission unit 1402, for sending Flow-Mod to open flow switch OFS, so that OFS is according to flow table Item building multilevel flow table is compared in content and triggering, and according to multilevel flow table report network status information;
Receiving unit 1403, for receiving the network state information of OFS transmission.
Optionally, in the embodiment of the present invention, OFC further include:
Updating unit 1404 compares item for updating triggering according to network status messages;
Second configuration unit 1405 is added to Flow-Mod for item to be compared in the triggering of update, to obtain update Flow-Mod;
Second transmission unit 1406, for sending the Flow-Mod updated to OFS, so that Flow- of the OFS according to update Mod updates multilevel flow table.
In the embodiment of the present invention, the building of the first configuration unit 1401 includes the Flow- that item is compared in flow table content and triggering Mod is handed down to OFS by the first transmission unit 1402, so that OFS is carried out by data packet and the multilevel flow table comprising triggering table Matching, and corresponding operational order is directed toward when triggering table, is compared item to triggering and is judged, and reports preset triggering is met The result of the judgement of condition generates network state information, and receiving unit 1403 receives the network state information that OFS is sent, thus root According to getting current network state information and monitoring in real time to network, OFC is improved to the susceptibility of network state, anti- Speed and quality of network management are answered, in addition, updating unit 1404, which updates triggering according to network status messages, compares item, so that the The Flow-Mod that second configuration unit 1405 updates is sent to OFS by two transmission units 1406, so that OFS is according to update Flow-Mod updates multilevel flow table, so that more flexible to the monitoring of network state and equipment and accurate.
Supplementary explanation in the embodiment of the present invention, is selected the field that data packet and multilevel flow table are extended as shown in figure 15 Item is that item is compared in default triggering appeared in this paper, and when specific operation, the Field Options of these extensions are optional as follows:
8 flag: it is matched if identifying the flow entry, uploaded state information.
16 Hard_timeout: mark is matched to the remaining time when flow entry, if being less than preset value, reports shape State message;This is not detected then for full 0.
64 Packet Matches of Flow table status: the data packet that mark is matched to the flow table is more than default It is worth, then uploaded state message;This is not detected then for full 0.
64 Received Packets of Flow entry status: mark is matched to the data packet of the flow entry and is more than Preset value, then uploaded state information;This is not detected then for full 0.
Status64 Received Packets of Port: identifying the data traffic that the port receives is more than preset value, then Uploaded state message;This is not detected then for full 0.
Status64 Transmitted Packets of Port: it is more than default for identifying the data traffic of the port transmission It is worth, then uploaded state message;This is not detected then for full 0.
Status64 Receive Drops of Port: identify the port discarding data traffic be more than preset value, then on Report status message;This is not detected then for full 0.
Status64 Transmit Packets of Queue: identifying the data traffic that the queue receives is more than preset value, Then uploaded state message;This is not detected then for full 0.
32 Packet Count of Group status: identifying data traffic that this group of table receives is more than preset value, then on Report status message;This is not detected then for full 0.
Therefore the above-mentioned every Field Options enumerated are only a part of optional condition, and complete optional condition includes such as Under:
64 Packet Lookups of Flow table status: indicating to find the data packet number of current flow table, More than preset value, then uploaded state message, preset value are that full 0 is to detect this.
64 Packet Matches of Flow table status: indicating the data packet number for being matched to current flow table, More than preset value, then uploaded state message, preset value are that full 0 is to detect this.
64 Received Packets of Flow entry status: the number-of-packet that current flow entry receives is indicated Amount, is more than preset value then uploaded state message, and preset value is that full 0 is to detect this.
64 Received Bytes of Flow entry status: the data packet bit number that current flow entry receives is indicated Amount, is more than preset value then uploaded state message, and preset value is that full 0 is to detect this.
32 Duration (seconds) of Flow entry status: indicating the duration (second) of current flow entry, More than preset value, then uploaded state message, preset value are that full 0 is to detect this.
32 Duration (nanoseconds) of Flow entry status: the duration of current flow entry is indicated (nanosecond), is more than preset value then uploaded state message, and preset value is that full 0 is to detect this.
8 port number of Port status: indicating the port number that this flow table is related to, according to port number from Identical number of parameters is selected in following 11 kinds of Field Options.
1,64 Received Packets of Port status: indicating the data packet number that port receives, and is more than default Then uploaded state message, preset value do not check this when being 0 to value.
2, it 64 Transmitted Packets of Port status: indicates the data packet number that port transmission is crossed, is more than Then uploaded state message, preset value do not check this when being 0 to preset value.
3,64 Received Bytes of Port status: indicating the data packet amount of bits that port receives, and is more than pre- If then uploaded state message, preset value do not check this when being 0 to value.
4,64 Transmitted Bytes of Port status: indicating the data packet amount of bits that port transmission is crossed, and surpasses Preset value then uploaded state message is crossed, preset value does not check this when being 0.
5,64 Receive Drops of Port status: indicating that port receives the data packet number of discarding, is more than default Then uploaded state message, preset value do not check this when being 0 to value.
6,64 Transmitted Drops of Port status: indicating the packet discard amount of bits of port transmission, More than preset value, then uploaded state message, preset value do not check this when being 0.
7,64 Receive Errors of Port status: the number of errors that port receives is indicated, then more than preset value Uploaded state message, preset value do not check this when being 0.
8,64 Transmitted Errors of Port status: indicating the number of errors of port transmission, is more than default Then uploaded state message, preset value do not check this when being 0 to value.
9,64 Receive Frame Alignment Errors of Port status: port frame alignment error number is indicated Amount, is more than preset value then uploaded state message, and preset value does not check this when being 0.
10, it 64 Receive Overrun Errors of Port status: indicates port hypervelocity number of errors, is more than pre- If then uploaded state message, preset value do not check this when being 0 to value.
11,64 Receive CRC Errors of Port status: indicating port crc error quantity, is more than preset value Then uploaded state message, preset value do not check this when being 0.
12,64 Collisions of Port status: port collision quantity is indicated, then uploaded state disappears more than preset value Breath, preset value do not check this when being 0.
13, it 32 Duration (seconds) of Port status: indicates the port time, then reports shape more than preset value State message, preset value do not check this when being 0.
14,32 Duration (nanoseconds) of Port status: indicating port time (nanosecond), is more than default Then uploaded state message, preset value do not check this when being 0 to value.
8 queue number of Queue status: the number of queues that this flow table is related to is indicated, according to port number Identical number of parameters is selected from following 5 kinds of Field Options.
1,64 Transmit Packets of queue status: it is more than pre- for identifying the data packet number that the queue receives If value, then uploaded state message;This is not detected then for full 0.
2,64 Transmit Bytes of queue status: it is more than pre- for identifying the number of data bits that the queue receives If value, then uploaded state message;This is not detected then for full 0.
3,64 Transmit Overrun Errors of queue status: identifying queue hypervelocity transmission quantity is more than Preset value, then uploaded state message;This is not detected then for full 0.
4, it 32 Duration (seconds) of queue status: indicates Queue time, then reports shape more than preset value State message, preset value do not check this when being 0.
5,32 Duration (nanoseconds) of queue status: indicating Queue time (nanosecond), is more than default Then uploaded state message, preset value do not check this when being 0 to value.
32 Reference Count of Group status (flow entries): relevant flow entry is currently organized in expression Quantity, is more than preset value then uploaded state message, and preset value does not check this when being 0.
64 Packet Count of Group status: it indicates current group data packet number, then reports shape more than preset value State message, preset value do not check this when being 0.
64 Byte Count of Group status: current group amount of bits is indicated, then uploaded state disappears more than preset value Breath, preset value do not check this when being 0.
32 Duration (seconds) of Group status: it indicates the current group time, then reports shape more than preset value State message, preset value do not check this when being 0.
32 Duration (nanoseconds) of Group status: indicating current group time (nanosecond), is more than default Then uploaded state message, preset value do not check this when being 0 to value.
64 Packet Count of Group Bucket status, indicate current bucket data packet number, are more than pre- If then uploaded state message, preset value do not check this when being 0 to value.
64 Byte Count of Group Bucket status, indicate current bucket amount of bits, are more than preset value Then uploaded state message, preset value do not check this when being 0.
Figure 16 is please referred to, Figure 16 is another structural schematic diagram of open flow switch OFS provided in an embodiment of the present invention, In, it may include at least one processor 1601 (such as CPU, Central Processing Unit), at least one network interface Or other communication interfaces, memory 1602, reception device 1603, sending device 1604 and at least one communication bus are used for Realize the connection communication between these devices.The processor 1601 is for executing the executable module stored in memory, example Such as computer program.The memory 1602 may include high-speed random access memory (RAM, Random Access Memory), it is also possible to further include non-labile memory (non-volatile memory), a for example, at least disk is deposited Reservoir.The system gateway and at least one other network element are realized by least one network interface (can be wired or wireless) Between communication connection, internet, wide area network, local network, Metropolitan Area Network (MAN) etc. can be used.
As shown in figure 16, in some embodiments, program instruction is stored in memory 1602, program instruction can be by Processor 1601 executes, and processor 1601 specifically executes following steps:
The data packet that will acquire is matched with multilevel flow table, obtains matched as a result, multilevel flow table includes that operation refers to It enables and triggering table, triggering table includes that item is compared in triggering;
According to matched as a result, determining the corresponding operational order of data packet;
When the corresponding operational order of data packet is directed toward the triggering table, item is compared to data packet according to the triggering in triggering table Report condition judgement is carried out, the result of judgement is obtained;
When the result of judgement meets preset triggering report condition, network state information is generated according to the result of judgement, And network state information is sent to open flow controller OFC.
In some embodiments, following steps can also be performed in processor 1601:
Receiving flow table editor's message Flow-Mod, Flow-Mod that OFC is sent includes that item is compared in flow table content and triggering;
According to flow table composition of content multilevel flow table;
Compare item construction triggering table according to triggering;
Triggering table is added to multilevel flow table end, and establishes the corresponding relationship of multilevel flow table Yu triggering table.
In some embodiments, following steps can also be performed in processor 1601:
Flow table content is divided according to preset matching field, to obtain at least two subflow tables;
According to preset order by subflow table pack at multilevel flow table.
In some embodiments, following steps can also be performed in processor 1601:
Packet-in data packet is constructed, and network state information is added to the extended field of Packet-in data packet;
The Packet-in data packet of addition network state information is sent to OFC.
In some embodiments, following steps can also be performed in processor 1601:
According to the operational order in the flow entry to match with data packet, judge whether to have constructed Packet-in data Packet;
When not having to construct Packet-in data packet, then Packet-in data packet is constructed, and network state information is added It is added to Packet-in data packet;
When constructed Packet-in data packet, then the Packet-in number that reanson field is warning is constructed It is added to the Packet-in data packet that reanson field is warning according to packet, and by network state information.
In some embodiments, following steps can also be performed in processor 1601:
When the corresponding operational order of data packet is directed toward triggering table, update current network state and with it is data packet matched Multilevel flow table in the corresponding counter of flow entry.
Figure 17 is please referred to, Figure 17 is another structural schematic diagram of open flow controller OFC provided in an embodiment of the present invention, In, it may include at least one processor 1701 (such as CPU, Central Processing Unit), at least one network interface Or other communication interfaces, memory 1702, reception device 1703, sending device 1704 and at least one communication bus are used for Realize the connection communication between these devices.The processor 1701 is for executing the executable module stored in memory, example Such as computer program.The memory 1702 may include high-speed random access memory (RAM, Random Access Memory), it is also possible to further include non-labile memory (non-volatile memory), a for example, at least disk is deposited Reservoir.The system gateway and at least one other network element are realized by least one network interface (can be wired or wireless) Between communication connection, internet, wide area network, local network, Metropolitan Area Network (MAN) etc. can be used.
As shown in figure 17, in some embodiments, program instruction is stored in memory 1702, program instruction can be by Processor 1701 executes, and processor 1701 specifically executes following steps:
Building flow table editor message Flow-Mod, Flow-Mod include flow table content and item is compared in triggering, and item is compared in triggering Refer to network state activation threshold value set, needs report network state for judging whether;
Flow-Mod is sent to open flow switch OFS, so that OFS compares item building multistage according to flow table content and triggering Flow table, and according to multilevel flow table report network status information;
Receive the network status messages that OFS is sent.
In some embodiments, following steps can also be performed in the processor 1701:
Triggering, which is updated, according to network status messages compares item;
Item is compared into the triggering of update and is added to Flow-Mod, to obtain the Flow-Mod updated;
The Flow-Mod updated is sent to OFS, so that OFS updates multilevel flow table according to the Flow-Mod of update.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit Divide, only a kind of logical function partition, there may be another division manner in actual implementation, for example, at least two units or Component can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point is shown The mutual coupling, direct-coupling or communication connection shown or discussed can be through some interfaces, between device or unit Coupling or communication connection are connect, 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 at least In two network units.Some or all of unit therein can be selected to realize this embodiment scheme according to the actual needs Purpose.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
A kind of method and device of moving object detection provided by the present invention is described in detail above, for this The those skilled in the art in field, thought according to an embodiment of the present invention, have change in specific embodiments and applications Become place, in conclusion the contents of this specification are not to be construed as limiting the invention.

Claims (16)

1. a kind of method for obtaining network state, which is characterized in that the described method includes:
The data packet that open flow switch OFS will acquire is matched with multilevel flow table, is obtained matched as a result, the multistage Flow table includes operational order and triggering table, and the triggering table includes that item is compared in triggering, and it is network state touching that item is compared in the triggering The set of threshold value is sent out, the network state activation threshold value is for judging whether to need report network state;
The OFS is according to described matched as a result, determining the corresponding operational order of the data packet;
When the corresponding operational order of the data packet is directed toward the triggering table, the OFS is according to the triggering in the triggering table Compare item and report condition judgement is carried out to the relevant network parameter of the data packet, obtains the result of judgement;
When the result of the judgement meets preset triggering report condition, the OFS works as according to the generation of the result of the judgement Preceding network state information, and the current network state information, the current network are sent to open flow controller OFC Status information includes the relevant network parameter of the data packet.
2. the method according to claim 1, wherein the data packet that the open flow switch OFS will acquire Before being matched with multilevel flow table further include:
It includes flow table content and institute that the OFS, which receives flow table editor's message Flow-Mod, the Flow-Mod that the OFC is sent, It states triggering and compares item;
OFS multilevel flow table according to the flow table composition of content;
The OFS compares item according to the triggering and constructs the triggering table;
The triggering table is added to the multilevel flow table end by the OFS, and establishes the multilevel flow table and the triggering table Corresponding relationship.
3. according to the method described in claim 2, it is characterized in that, the OFS is according to the flow table composition of content multilevel flow table Include:
The OFS divides the flow table content according to preset matching field, to obtain at least two subflow tables;
The OFS is according to preset order by the subflow table pack at the multilevel flow table.
4. method according to any one of claims 1 to 3, which is characterized in that described to described in open flow controller OFC transmission Current network state information specifically includes:
The OFS constructs Packet-in data packet, and the current network state information is added to the Packet-in The extended field of data packet;
The OFS sends the Packet-in data packet for adding the current network state information to the OFC.
5. according to the method described in claim 4, it is characterized in that, the matched result is described data packet matched to described A flow entry in multilevel flow table;
Before the construction Packet-in data packet further include:
The OFS judges whether to have constructed Packet-in according to the operational order in the flow entry to match with the data packet Data packet;
The construction Packet-in data packet, and the current network state information is added to the Packet-in data The extended field of packet specifically includes:
When not constructing the Packet-in data packet, then the OFS constructs Packet-in data packet, and will be described current Network state information be added to the Packet-in data packet;
When the constructed Packet-in data packet, then the OFS construction reanson field is warning's Packet-in data packet, and the current network state information is added to the Packet- that reanson field is warning In data packet.
6. method according to any one of claims 1 to 3, which is characterized in that the method also includes:
When the corresponding operational order of the data packet is directed toward the triggering table, the OFS update current network state and Counter corresponding with the flow entry in the data packet matched multilevel flow table.
7. a kind of method for obtaining network state, which is characterized in that the described method includes:
Open flow controller OFC constructs flow table editor message Flow-Mod, and the Flow-Mod includes flow table content and triggering ratio Compared with item, the triggering compares item and refers to network state activation threshold value set, and the network state activation threshold value is for judging whether Need report network state;
The OFC sends the Flow-Mod to open flow switch OFS so that the OFS according to the flow table content and Item building multilevel flow table is compared in the triggering, and current network state information is reported according to the multilevel flow table;The multistage The end of flow table is the triggering table for comparing item construction according to the triggering, and it is the OFS that item is compared in the triggering in the triggering table Report condition judgement is carried out to the relevant network parameter of data packet and obtains the foundation of the result of judgement;
The OFC receives the current network state information that the OFS is sent;The current network state information includes The relevant network parameter of the data packet.
8. the method for claim 7, which is characterized in that the OFC receives the current network state that the OFS is sent After information further include:
The OFC updates triggering according to the current network state information and compares item;
The triggering of update is compared item and is added to the Flow-Mod by the OFC, to obtain the Flow-Mod updated;
The OFC sends the Flow-Mod of the update to the OFS, so that Flow- of the OFS according to the update Mod updates multilevel flow table.
9. a kind of open flow switch OFS, which is characterized in that the OFS includes:
First execution unit, the data packet for will acquire are matched with multilevel flow table, are obtained matched as a result, described more Grade flow table includes operational order and triggering table, and the triggering table includes that item is compared in triggering, and it is network state that item is compared in the triggering The set of activation threshold value, the network state activation threshold value is for judging whether to need report network state;
First determination unit, it is matched as a result, determining that the data packet is corresponding for being obtained according to first execution unit Operational order;
First judging unit, for when the corresponding operational order of the data packet is directed toward the triggering table, the OFS to be according to institute It states the triggering in triggering table and compares item to the progress report condition judgement of the data packet relevant network parameter, obtain the knot of judgement Fruit;
Second execution unit, for when the result of the judgement meets preset triggering report condition, the OFS to be according to The result of judgement generates current network state information;
First transmission unit, for sending the current network state information, the current net to open flow controller OFC Network status information includes the relevant network parameter of the data packet.
10. OFS according to claim 9, which is characterized in that the OFS further include:
First receiving unit includes stream for receiving flow table editor's message Flow-Mod, the Flow-Mod that the OFC is sent Item is compared in table content and the triggering;
First configuration unit is used for the multilevel flow table according to the flow table composition of content;
Second configuration unit constructs the triggering table for comparing item according to the triggering;
Third execution unit, for the triggering table to be added to the multilevel flow table end, and establish the multilevel flow table with The corresponding relationship of the triggering table.
11. OFS according to claim 10, which is characterized in that first configuration unit specifically includes:
First configuration module, for dividing the flow table content according to preset matching field, to obtain at least two Subflow table;
Second configuration module is used for the subflow table pack according to preset order into the multilevel flow table.
12. according to any OFS of claim 9 to 11, which is characterized in that
Second execution unit, specifically for constructing when the result of the judgement meets preset triggering report condition Packet-in data packet, and the current network state information is added to the extension word of the Packet-in data packet Section;
First transmission unit adds the Packet- of the current network state information specifically for sending to the OFC In data packet.
13. OFS according to claim 12, which is characterized in that the matched result is described data packet matched to institute State a flow entry in multilevel flow table;
The OFS further include:
Second judgment unit, for judging whether structure according to the operational order in the flow entry to match with the data packet Make Packet-in data packet;
Second execution unit described further further include:
Third configuration module, for when not constructing the Packet-in data packet, constructing Packet-in data packet, and will The current network state information is added to the Packet-in data packet;
4th configuration module, for when the constructed Packet-in data packet, then the OFS to construct reanson field For the Packet-in data packet of warning, and the current network state information is added to reanson field and is The Packet-in data packet of warning.
14. OFS according to claim 13, which is characterized in that the OFS further include:
Updating unit, it is current network-like for updating when the corresponding operational order of the data packet is directed toward the triggering table State and counter corresponding with the flow entry in the data packet matched multilevel flow table.
15. a kind of open flow controller OFC characterized by comprising
First configuration unit includes flow table content and triggering for constructing flow table editor's message Flow-Mod, the Flow-Mod Compare item, the triggering compares item and refers to network state activation threshold value set, and the network state activation threshold value is for judgement It is no to need report network state;
First transmission unit, for sending the Flow-Mod to open flow switch OFS, so that the OFS is according to Item building multilevel flow table is compared in flow table content and the triggering, and reports current network state to believe according to the multilevel flow table Breath;The end of the multilevel flow table is the triggering table for comparing item construction according to the triggering, and the triggering in the triggering table is compared Item is that the OFS carries out report condition judgement to the relevant network parameter of data packet and obtains the foundation of the result of judgement;
Receiving unit, the current network state information sent for receiving the OFS;The current network state letter Breath includes the relevant network parameter of the data packet.
16. OFC according to claim 15, which is characterized in that the OFC further include:
Updating unit compares item for updating triggering according to the current network state information;
Second configuration unit is added to the Flow-Mod for item to be compared in the triggering of update, to obtain the Flow- updated Mod;
Second transmission unit, for sending the Flow-Mod of the update to the OFS so that the OFS according to it is described more New Flow-Mod updates multilevel flow table.
CN201410474867.0A 2014-09-17 2014-09-17 A kind of method and device obtaining network state Active CN105490827B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410474867.0A CN105490827B (en) 2014-09-17 2014-09-17 A kind of method and device obtaining network state
PCT/CN2015/076075 WO2016041341A1 (en) 2014-09-17 2015-04-08 Method and device for acquiring network state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410474867.0A CN105490827B (en) 2014-09-17 2014-09-17 A kind of method and device obtaining network state

Publications (2)

Publication Number Publication Date
CN105490827A CN105490827A (en) 2016-04-13
CN105490827B true CN105490827B (en) 2018-12-04

Family

ID=55532508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410474867.0A Active CN105490827B (en) 2014-09-17 2014-09-17 A kind of method and device obtaining network state

Country Status (2)

Country Link
CN (1) CN105490827B (en)
WO (1) WO2016041341A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156078B (en) * 2016-12-02 2021-05-07 中国移动通信有限公司研究院 Flow table construction method and system
CN108833293B (en) * 2018-06-20 2021-01-26 北京邮电大学 Data center congestion control method and device based on Software Defined Network (SDN)
CN109525495B (en) * 2018-12-24 2022-03-11 广东浪潮大数据研究有限公司 Data processing device and method and FPGA board card
CN113645137B (en) * 2021-08-02 2022-05-31 清华大学 Software defined network multi-level flow table compression method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957603A (en) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 Multilevel flow table-based Openflow message forwarding method and system
CN103401783A (en) * 2013-07-26 2013-11-20 盛科网络(苏州)有限公司 Method and device for realizing Openflow multistage flow table
CN103747026A (en) * 2013-10-29 2014-04-23 盛科网络(苏州)有限公司 Alarm method and alarm device of openflow flow table

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103907318B (en) * 2012-10-29 2017-04-12 华为技术有限公司 Method and device for refreshing flow table
CN103856417B (en) * 2012-11-30 2018-01-23 中兴通讯股份有限公司 software defined network message forwarding method and system
CN104022910B (en) * 2014-06-25 2018-01-09 新华三技术有限公司 A kind of parameter consultation method and its device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102957603A (en) * 2012-11-09 2013-03-06 盛科网络(苏州)有限公司 Multilevel flow table-based Openflow message forwarding method and system
CN103401783A (en) * 2013-07-26 2013-11-20 盛科网络(苏州)有限公司 Method and device for realizing Openflow multistage flow table
CN103747026A (en) * 2013-10-29 2014-04-23 盛科网络(苏州)有限公司 Alarm method and alarm device of openflow flow table

Also Published As

Publication number Publication date
CN105490827A (en) 2016-04-13
WO2016041341A1 (en) 2016-03-24

Similar Documents

Publication Publication Date Title
CN105052083B (en) For handling the method and network node of management plane flow
CN105490827B (en) A kind of method and device obtaining network state
EP2883334B1 (en) Techniques for flooding optimization for link state protocols in a network topology
US9813351B2 (en) Method and apparatus for adaptive packet aggregation
EP3817298A1 (en) Data message detection method, device and system
CN108123824A (en) A kind of network fault detecting method and device
CN102868553B (en) Fault Locating Method and relevant device
JP2010050857A (en) Route control apparatus and packet discarding method
CN106789264B (en) A kind of method and apparatus that link aggregation group channel is switched fast
CN104160665B (en) Network system, controller and load-distribution method
US9935832B2 (en) Automated placement of measurement endpoint nodes in a network
CN110505154A (en) A kind of interchanger moving method based on improved Dijkstra's algorithm
CN105991338A (en) Network operation and maintenance management method and device
CN109660624A (en) Planing method, server and the storage medium of content distributing network resource
CN108156004A (en) SDN controllers and switch management method
EP2614619B1 (en) A framework of an efficient congestion exposure audit function
CN113452576B (en) Method and device for monitoring network environment, storage medium and electronic device
EP2858302B1 (en) Connectivity check method of service stream link, related apparatus and system
CN109964450B (en) Method and device for determining shared risk link group
CN110071843A (en) A kind of Fault Locating Method and device based on flow path analysis
KR101595160B1 (en) Methods for managing transaction in software defined networking network
CN106534399A (en) Virtual switch matrix (VSM) splitting detection methods and apparatuses
CN101414937A (en) Method and apparatus for switching tunnel
CN107210969A (en) A kind of data processing method and relevant device based on software defined network
CN108809765A (en) Network quality test method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant