WO2017070965A1 - 一种基于软件定义网络的数据处理方法及相关设备 - Google Patents

一种基于软件定义网络的数据处理方法及相关设备 Download PDF

Info

Publication number
WO2017070965A1
WO2017070965A1 PCT/CN2015/093497 CN2015093497W WO2017070965A1 WO 2017070965 A1 WO2017070965 A1 WO 2017070965A1 CN 2015093497 W CN2015093497 W CN 2015093497W WO 2017070965 A1 WO2017070965 A1 WO 2017070965A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
security device
flow table
table information
data stream
Prior art date
Application number
PCT/CN2015/093497
Other languages
English (en)
French (fr)
Inventor
徐通
董平
郑涛
孙嘉楠
陈璟
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2015/093497 priority Critical patent/WO2017070965A1/zh
Priority to CN201580031739.1A priority patent/CN107210969B/zh
Publication of WO2017070965A1 publication Critical patent/WO2017070965A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data processing method and related device based on a software-defined network.
  • SDN Software Defined Network
  • SDN is a new type of network architecture that realizes flexible control of network data traffic by separating the control plane of the network device from the data plane. It is the innovation of core network and application. Provide a good platform.
  • security devices include simple packet filtering firewalls and complex stream cleaning devices with deep report resolution.
  • filtering rules There are a lot of filtering rules in the security device in the network.
  • each packet is filtered according to the filtering rule to implement security protection.
  • the sequence check table is executed according to the filtering rule to determine whether the packet passes. With the continuous increase of network bandwidth, the high-speed data stream brought by the high-speed data stream has higher and higher performance requirements.
  • the current solution is to build a parallel or hierarchical security system by simply increasing the number of security devices in the network and deploying various functional security devices.
  • Each security device has its own protection strengths and inherent disadvantages, including, for example, usually located in the network.
  • the increase in the number of security devices in this mode leads to an increase in system cost, and increases the management pressure of the security devices on the system, and requires each security device to have a software interface for communicating with each other, which is difficult to implement and has poor scalability.
  • the embodiment of the invention provides a data processing method and related device based on a software-defined network, which can improve the performance of the network security device based on the software-defined network, reduce the system cost, reduce the management pressure on the security device in the system, and can be extended. Strong.
  • an embodiment of the present invention provides a data processing method based on a software-defined network, including:
  • the method before the acquiring the data flow flow table information of the target switch connected to the first security device in the current software-defined network, the method further includes: :
  • the step of acquiring data flow table information of the target switch connected to the first security device in the current software-defined network is performed.
  • the detecting the current service pressure value of the first security device includes:
  • the target switch includes a first switch that is connected to the first security device by using the first port, and a second switch that is connected to the first security device by the second port; and the amount of data that flows from the target switch to the first security device in the preset time window, including:
  • the data flow table information of the target switch connected to the first security device in the current software-defined network is obtained in the four possible implementation manners, including:
  • the target switch Receiving, by the target switch, the first flow table information and the second flow table information returned by the flow table information query instruction, where the first flow table information indicates a data flow flowing into the first security device, The data flow flowing out of the first security device is indicated in the second flow table information.
  • the parsing the data flow flow table information of the target switch, and generating the parsing result including the parsing including:
  • the marking the third data stream as a preset processing manner includes:
  • the definition network further includes a second security device and a third switch connected to the second security device; the method further includes:
  • the method before the acquiring the data flow flow table information corresponding to the third switch, the method further includes: :
  • the step of acquiring the data flow table information corresponding to the third switch is performed.
  • an embodiment of the present invention further provides a data processing apparatus, including:
  • An acquiring module configured to acquire data flow flow table information of a target switch connected to the first security device in the current software-defined network, where the data flow flow table information includes the information transmitted between the first security device and the target switch Information of the data stream;
  • a generating module configured to parse the data flow flow table information of the target switch acquired by the obtaining module, and generate a first data processing rule that includes the parsed analysis result
  • a sending module configured to send the first data processing rule generated by the generating module to the target switch, so that the target switch processes the received data stream according to the first data processing rule.
  • the device further includes:
  • a pressure detecting module configured to detect a current service pressure value of the first security device
  • a determining module configured to determine whether the current service pressure value detected by the pressure detecting module is higher than a preset pressure threshold corresponding to the first safety device, and when the determination result is higher than the pressure threshold
  • the obtaining module is configured to obtain data flow table information of the target switch connected to the first security device in the current software-defined network.
  • the pressure detection module includes:
  • An information acquiring unit configured to acquire an amount of data flowing from the target switch to the first security device within a preset time window
  • a calculating unit configured to calculate, according to the amount of data flowing into the first security device in the preset time window acquired by the information acquiring unit, an average amount of data flowing into the first security device per unit time, and calculate The average amount of data is used as a current traffic pressure value of the first security device.
  • the target switch includes a first connection that is connected to the first security device by using the first port. And a second switch that is connected to the first security device by using the second port; the information acquiring unit is specifically configured to:
  • the obtaining module includes:
  • An instruction sending unit configured to send a flow table information query instruction to a target switch connected to the first security device in the current software definition network
  • An information receiving unit configured to receive first flow table information and second flow table information returned by the target switch in response to the flow table information query instruction, where the first flow table information indicates that the first security device flows into the first security device a data stream, where the data flow flowing out of the first security device is indicated in the second flow table information.
  • the generating module includes:
  • the parsing unit is configured to parse the first flow table information and the second flow table information, and parse the data flow indicated by the first flow table information to have a corresponding data flow indicated by the second flow table information a third data stream flowing out of data and a fourth data stream having no corresponding outgoing data;
  • a marking unit configured to mark the third data stream as a preset processing manner, where the preset processing manner includes encapsulation or bypass or flow table matching domain refinement processing;
  • the marking unit is further configured to mark the fourth data stream as discarded;
  • a rule generating unit configured to generate a first data processing rule that includes the tagged result of the tag, and use the generated first data processing rule as the first data processing rule corresponding to the first security device.
  • the marking unit is further configured to compare the data stream indicated by the third data stream and the second flow table information, and determine that the inflow data corresponding to the third data stream completely matches the outflow data. a data stream and a sixth data stream in which the inflow data and the outflow data are partially matched; marking the fifth data stream as encapsulation or detour; marking the sixth data stream as a flow table matching domain refinement to alert.
  • the controller in the software-defined network when receiving a request for the same data stream as the sixth data stream type, increases the flow table matching domain entry for the data stream.
  • the software The definition network further includes a second security device and a third switch connected to the second security device;
  • the acquiring module is further configured to acquire data flow flow table information corresponding to the third switch;
  • the generating module is further configured to parse the data flow flow table information corresponding to the third switch acquired by the acquiring module, and generate a second data processing rule that includes the parsed analysis result;
  • the sending module is further configured to send the second data processing rule generated by the generating module to the target switch, so that the target switch processes the received data stream according to the second data processing rule.
  • the pressure detecting module is further configured to re-detect the current service pressure value of the first security device according to a preset time interval;
  • the determining module is further configured to determine whether the current service pressure value of the first security device that is re-detected by the pressure detecting module is higher than a preset pressure threshold corresponding to the first security device, and determine When the result is higher than the pressure threshold corresponding to the first security device, the acquiring module is notified Obtaining data flow flow table information of the third switch connected to the second security device in the current software defined network.
  • an embodiment of the present invention further provides a computer storage medium, where the computer storage medium stores a program, where the program includes some or all of the software-defined network-based data processing method of the first aspect. step.
  • the embodiment of the present invention further provides a network device, including: a communication interface, a memory, and a processor, where the processor is respectively connected to the communication interface and the memory;
  • the memory is used to store driver software
  • the processor reads the driver software from the memory and executes it under the action of the driver software:
  • the processor reads the driver software from the memory and performs the acquiring the current software-defined network by using the driver software Before the data flow table information of the target switch connected to the first security device, the following steps are also performed:
  • the step of acquiring data flow table information of the target switch connected to the first security device in the current software-defined network is performed.
  • the processor reads the driver software from the memory and performs the detecting the current service pressure value of the first security device under the action of the driver software, and specifically performs the following steps:
  • the target switch includes a first switch that is connected to the first security device by using the first port, and a second switch connected to the first security device; the processor reads the driver software from the memory and performs the acquisition in a preset time window under the action of the driver software The amount of data that the target switch flows into the first security device is performed by performing the following steps:
  • the processor reads the driver software from the memory and performs the acquiring, by the driver software, the target switch in the current software-defined network that is connected to the first security device.
  • Data flow table information perform the following steps:
  • the processor reads the driver software from the memory and is under the function of the driver software Performing the parsing of the data flow flow table information of the target switch, and generating a first data processing rule that includes the parsed analysis result, and performing the following steps:
  • the processor reads the driver software from the memory and performs the marking of the third data stream as a preset processing mode by using the driver software, and specifically performs the following steps:
  • the software-defined network further includes a second security device and a third switch connected to the second security device; the processor reads the driver software from the memory and further functions by the driver software Used to perform the following steps:
  • the The memory reads the driver software and is further used to perform the following steps under the action of the driver software:
  • the step of acquiring the data flow table information corresponding to the third switch is performed.
  • the data flow flow table information corresponding to the switch connected to the security device in the current SDN is obtained, and the data flow flow table information is parsed, and the data processing rule corresponding to the analysis result is generated. Therefore, the data processing rule can be sent to the switch connected to the security device, so that the switch processes the received data stream according to the data processing rule, thereby avoiding a large number of filtering rules when facing a large traffic or a network attack. Data congestion caused by long table lookup time, reduced system cost, and high scalability, enabling network security device performance to be improved based on software-defined networks. Moreover, the data processing rule can be dynamically changed according to the change of the data flow table information, which facilitates the management of the security device.
  • FIG. 1 is a schematic diagram of a software defined network system according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a data processing method based on a software-defined network according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another data processing method based on a software-defined network according to an embodiment of the present invention.
  • FIG. 4 is an application scenario diagram of a data processing method based on a software-defined network according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • the technical solution of the embodiment of the present invention may be specifically applied to a software-defined network SDN, and specifically relates to a data processing solution based on a software-defined network.
  • the software-defined network SDN separates the traditional network into a control layer and a data forwarding layer, and the controller in the control layer is responsible for directing the software-defined network switch located in the data forwarding layer to perform data processing according to user requirements.
  • the software-defined network can not only control the forwarding of data streams through the controller, but also perform functions such as discarding, rewriting, and the like that are more flexible than traditional routing devices.
  • the software defines the emergence of the network for security device performance The upgrade has created a new foundation for the network environment.
  • FIG. 1 is a structural diagram of an SDN system according to an embodiment of the present invention.
  • the SDN includes a controller, a plurality of switches (two shown in FIG. 1), and a security device.
  • the security device may be a firewall (such as a packet filtering firewall), a data filtering device, a stream cleaning device, a virus scanning device, or an intrusion detection protection system.
  • the controller communicates with each switch through a control link (shown by a broken line in the figure), including request packets generated by the transport switch, and query and response information between the transport controller and the switch.
  • the switches can also communicate via a communication link (shown by a solid line in the figure).
  • FIG. 2 is a schematic flowchart of a data processing method based on a software-defined network according to an embodiment of the present invention. Specifically, as shown in FIG. 2, the method in the embodiment of the present invention may include the following steps:
  • S101 Obtain data flow flow table information of a target switch that is connected to the first security device in the current software-defined network.
  • the method in the embodiment of the present invention may be specifically applied to a software-defined network SDN, where the SDN includes a controller, a first security device, and at least one switch, and the technical solution of the embodiment of the present invention may be specifically Executed in the controller of the SDN network.
  • the first security device may be a firewall, a data filtering device, or another security device in the current software-defined network SDN, which is not limited by the embodiment of the present invention.
  • the target switch may include all switches directly connected to the first security device, so that flow table information on all switches connected thereto may be obtained.
  • the flow table information record includes information about a data flow transmitted between the first security device and a switch connected thereto, that is, the target switch, such as data flow information flowing from the target switch to the first security device or from the first security. The data flow information that the device flows out to the target switch, and so on.
  • S102 Parse the data flow table information of the target switch, and generate a first data processing rule that includes the parsed analysis result.
  • the data flow of the switch connected to the first security device is obtained.
  • the controller can parse the data flow table information to obtain the parsed analysis result, and generate a data processing rule corresponding to the analysis result, for example, the controller can record the inflow of the data flow table information.
  • the first security device and the data flow information flowing out of the first security device perform data matching, and generate a data processing rule corresponding to the first security device, that is, a first data processing rule, according to the result of the matching.
  • S103 The first data processing rule is sent to the target switch, so that the target switch processes the received data stream according to the first data processing rule.
  • the controller may send the data processing rule to the target switch connected to the first security device, so that the target switch receives the data according to the data processing rule.
  • the data stream performs processing operations, including discarding the data stream, encapsulating or bypassing the data stream, performing further flow table matching domain refinement on the data stream, etc., thereby reducing the data processing pressure of the security device and avoiding Data congestion caused by excessive time on the table when facing large traffic or network attacks.
  • the current service pressure of the first security device may be further detected, and the pressure of the first security device is excessive, for example
  • a certain preset pressure threshold is exceeded, the data flow table information of the target switch connected to the first security device is acquired and a data processing rule is generated to perform data flow processing. Therefore, when the data traffic is low and the processor is within the processing capability of the firewall, the sequential processing table is still performed according to the original processing rule to achieve more accurate data processing to ensure the performance of the firewall and avoid the low data volume. Possible problems with the performance of the security device.
  • the data flow flow table information corresponding to the switch connected to the security device in the current SDN is obtained, and the data flow flow table information is parsed to generate a data processing rule corresponding to the analysis result, thereby
  • the data processing rule can be sent to the switch connected to the security device, so that the switch can process the received data stream according to the data processing rule when receiving the data flow, thereby avoiding the current large traffic volume or Due to the large number of filtering rules in the network attack, the data congestion caused by the long table lookup time is reduced, the system cost is reduced, and the scalability is strong, which enables the network security device performance to be improved based on the software-defined network.
  • the data processing rule can be rooted Dynamically changing according to changes in the data flow table information, which facilitates the management of security devices.
  • FIG. 3 is a schematic flowchart diagram of another data processing method based on a software-defined network according to an embodiment of the present invention. Specifically, as shown in FIG. 3, the method in the embodiment of the present invention may include the following steps:
  • the current service pressure value of the first security device may be an average amount of data flowing into the first security device within a preset time window.
  • the detecting the current service pressure value of the first security device may be: acquiring the amount of data flowing from the target switch to the first security device in a preset time window; according to the preset time window The amount of data flowing into the first security device calculates an average amount of data flowing into the first security device per unit time (for example, dividing the amount of data flowing into the first security device within the preset time window by the preset time window The time is obtained to obtain the average amount of data), and the calculated average data amount is used as the current business pressure value of the first security device.
  • the target switch may include a first switch connected to the first security device through a first port and a second switch connected to the first security device through a second port; the acquiring a preset time window
  • the amount of data flowing from the target switch to the first security device may be specifically: separately counting the amount of data flowing into the first security device through the first port in a preset time window and passing the second The amount of data flowing into the first security device by the port; the sum of the amount of data flowing into the first security device through the first port and the amount of data flowing into the first security device through the second port The amount of data flowing from the target switch to the first security device within a preset time window.
  • the switch port connected to the first security device such as the first port and the second port, may be determined in advance according to the network topology of the SDN.
  • the controller in the SDN can obtain the topology information or the network deployment record of the current SDN, that is, the SDN of the first security device, and determine a security device such as a firewall according to the acquired topology information or the network deployment record.
  • the port information includes a port number directly connected between the switch and the security device, and the first security device is bound to the directly connected port number, so that the data transmitted between the security device and the switch is obtained based on the port number. Flow information.
  • the SDN of the embodiment of the present invention includes a controller, a switch 1 (ie, a target switch such as a first switch), a switch 2 (ie, a target switch such as a second switch), and a switch 1 and a switch. 2 connected firewall (ie the first security device).
  • Each switch includes at least one physical port (hereinafter referred to as a port).
  • a port it is assumed that the switch 1 is directly connected to the firewall through the port A (ie, the first port), and the switch 2 passes through the port B (ie, the second port).
  • the controller communicates with each switch through a control link (shown by dashed lines and double-headed arrows in the figure), including request packets generated by the transport switch, and query and response information between the transport controller and the switch, etc. .
  • Each switch can communicate through a communication link (shown by a solid line in the figure), such as transmitting a user data stream in the current network.
  • the switch that is connected to the first security device, that is, the firewall is the switch 1 and the switch 2, and the corresponding direct ports are port A and port B, respectively.
  • the controller may determine the current service pressure value according to the amount of data flowing into the first security device according to the preset time window. Specifically, if the preset time window is t, the controller may send a query instruction, such as a Port Statistics command, to the target switch directly connected to the first security device, such as a firewall, every time t, and set the destination address carried by the command. For the target switch address, set the port_no field to the direct connection port number of the first security device and the target switch.
  • a query instruction such as a Port Statistics command
  • the controller can send a Port Statistics command to Switch 1 and Switch 2 directly connected to the firewall, and set the port_no field to port number A and port number B, respectively, and listen to the response fed back by the target switch.
  • Information extracting information of the tx_bytes field in the response information of the feedback. Comparing the data traffic flowing from the target switch to the first security device at the previous time t, calculating the amount of data entering the firewall, that is, the first security device, by the port in the current time window t, for example, according to the target switch, that is, the switch 1 and the switch.
  • the service pressure of the firewall can be calculated, for example, the current time window t flows from the switch 1 and the switch 2 into the firewall, that is, through the direct connection port A and The data amount of the direct connection port B entering the firewall is accumulated and divided by the time t to obtain the average data amount per unit time in the time window t, and the average data amount is used as the current business pressure value of the firewall.
  • S202 Determine whether the current service pressure value is higher than a preset pressure threshold corresponding to the first security device.
  • the first security device may be configured with a pressure threshold in advance (specifically, all the security devices in the SDN are preset to obtain corresponding pressure thresholds), for example, according to the performance of the first security device.
  • the network topology of the SDN and the network deployment record are configured to obtain the pressure threshold T1.
  • the controller may compare the current service pressure value with a preset pressure threshold corresponding to the first security device (such as T1 above) to determine the security device. Whether it is in the service pressure overload state, that is, whether the current service pressure value is higher than the pressure threshold, and when the pressure threshold is higher than the pressure threshold, step S203 is performed; otherwise, the first safety device is reacquired according to the preset time interval, such as t
  • the service pressure value continues to monitor whether the first security device is in a service stress overload state, and when the service pressure value of the first security device is higher than the pressure threshold, that is, in a service pressure overload state, step S203 is performed.
  • the foregoing information may be stored in a preset device information configuration table, so as to facilitate timely acquisition of information during subsequent use.
  • the preset device information configuration table can be as shown in Table 1 below.
  • S203 Obtain data flow flow table information of a target switch connected to the first security device in the current software-defined network.
  • the obtaining the data flow flow table information of the target switch that is connected to the first security device in the current software-defined network may be specifically: sending the flow table information to the target switch connected to the first security device in the current software-defined network. a first flow table information and a second flow table information returned by the target switch in response to the flow table information query instruction, wherein the first flow table information indicates a data flow flowing into the first security device And the second flow table information indicates a data flow flowing out of the first security device.
  • the controller when detecting that the first security device is in a service stress overload state as shown in FIG. 4, the controller can send a flow to the directly connected switches (switch 1 and switch 2) of the firewall.
  • the table information query instruction queries the first flow table information including the data flow information directly flowing into the firewall by the switch 1 and the switch 2, and the second flow table including the data flow information directly flowing from the firewall to the switch 1 and the switch 2 information.
  • the controller may send a flow table information query instruction such as a Multipart Message query instruction to the switch 1 and the switch 2 directly connected to the firewall, and use the Individual Flow Statistics information, and set the out_port field to port A and port B respectively, and the remaining fields.
  • the information can be arbitrarily matched, so that the first flow table information including the data flow information directly flowing into the firewall by the switch 1 and the switch 2 is obtained. Further, the controller may also send a Multipart Message query instruction to the switch 1 and the switch 2 directly connected to the firewall, and use the Individual Flow Statistics information, and set the ofp_match field to the source port A and the source port B respectively, and the remaining fields may be arbitrarily matched. So that the query obtains second flow table information including data flow information directly flowing from the firewall to the switch 1 and the switch 2.
  • S204 Parse the data flow table information of the target switch, and generate a first data processing rule that includes the parsed analysis result.
  • the parsing the data flow table information of the target switch, and generating the first data processing rule that includes the parsed parsing result may be specifically: the first flow table information and the second The flow table information is parsed, and the data stream indicated by the first flow table information is parsed to have a third data flow corresponding to the outgoing data in the data flow indicated by the second flow table information, and the corresponding data flows out a fourth data stream of data; marking the third data stream as a preset processing manner, where the preset processing manner includes encapsulation or bypass or flow table matching domain refinement processing; marking the fourth data stream as Discarding; generating a first data processing rule including the tagged result of the tag, and using the generated first data processing rule as the first data processing rule corresponding to the first security device.
  • the marking the third data stream as a preset processing manner may be: comparing the data flow indicated by the third data stream and the second flow table information to determine a location a fifth data stream in which the inflow data corresponding to the third data stream completely matches the outflow data and a sixth data stream in which the inflow data and the outflow data portion are matched; marking the fifth data stream as encapsulation or detour;
  • the sixth data stream is marked as a flow table matching domain refinement to remind the controller in the software-defined network to increase the flow of the data stream when receiving the request for the same data stream as the sixth data stream type.
  • the table matches the domain item.
  • the controller can use the matching domain field in the flow table information obtained by the query to directly flow into the firewall (the first security device).
  • the data stream that is, the data stream indicated by the first flow table information is divided into a third data stream having corresponding outflow data and a fourth data stream having no corresponding outflow data, and the fourth data stream having no corresponding outflow data may be marked.
  • the third data stream with corresponding outgoing data is marked as a preset processing manner, such as encapsulation or bypass or flow table matching domain refinement processing.
  • the fourth data stream that does not have corresponding outflow data can be understood as a data stream that is included in the inflow data stream corresponding to the first flow table information but not included in the outflow data stream corresponding to the second flow table information, and has a corresponding
  • the third data stream that flows out of the data can be understood as the inflow data stream corresponding to the first flow table information, and the outflow data stream corresponding to the second flow table information also includes (all matching or partially matched) data streams.
  • the flow table information obtained by the query further includes a packet_count field, where the third data stream is included in the inflow data stream corresponding to the first flow table information, and the data included in the outflow data stream corresponding to the second flow table information.
  • the controller may further further divide the third data stream into the fifth data that exactly matches the inflow data and the outflow data by parsing the first flow table information obtained by the query and the packet_count field in the counter in the second flow table information.
  • the flow that is, the inflow data stream corresponding to the first flow table information is included, the outflow data stream corresponding to the second flow table information is also included and all matched), and the inflow data and the outflow data are partially matched.
  • the sixth data stream (that is, the inflow data stream corresponding to the first flow table information includes, but only partially matches, the outflow data stream corresponding to the second flow table information), wherein the inflow data and the outflow data corresponding to the fifth data stream
  • the number of data packets indicated by the packet_count field is the same, and the number of data packets indicated by the packet_count field of the incoming data corresponding to the sixth data stream is greater than the number of data packets indicated by the packet_count field of the corresponding outgoing data.
  • the fifth data stream can then be marked as encapsulation or detour, and the sixth data stream can be marked as a flow table matching domain refinement. Thereby, a data processing rule including a first data processing rule including a tag result for each type of data stream can be generated.
  • S205 The first data processing rule is sent to the target switch, so that the target switch processes the received data stream according to the first data processing rule.
  • the controller may send the first data processing rule to the target switch connected to the first security device, so that the target switch receives the data stream.
  • the received data stream can be processed in accordance with the first data processing rule.
  • the first data processing rule may be notified to the target switch by sending a flow table. For example, in conjunction with FIG.
  • the controller may notify the firewall that the direct connection switch 1 and the switch 2 of the first security device directly discard the fourth data stream marked as discarded;
  • the software-defined network may further include a second security device and a third switch connected to the second security device; and the controller may further acquire a data flow corresponding to the third switch.
  • the second data processing rule that includes the parsed parsing result is sent, and the second data processing rule is sent to the target switch, so that the second data processing rule is sent to the target switch.
  • the target switch processes the received data stream according to the second data processing rule.
  • the SDN can also be configured with a subsequent security device that is the first security device, that is, the second security device.
  • the controller may further determine, according to the topology information of the SDN, address information of a switch connected to the second security device, that is, a third switch (that is, all switches directly connected to the second security device), and determine the first A port on which the third switch is connected to the second security device.
  • the SDN further includes a second security device, such as a data filtering device, and a switch 3 and a switch 4 (the switch 3 and the switch 4 are the third switch) directly connected to the data filtering device.
  • the switch 3 is directly connected to the data filtering device through the port C
  • the switch 4 is directly connected to the data filtering device through the port D.
  • the controller can obtain the data flow table information corresponding to the switch 3 and the switch 4 by acquiring the data flow table information corresponding to the switch 3 and the switch 4, thereby generating a second data process including the parsed analysis result. rule.
  • the method for generating the second data processing rule corresponding to the second security device may be specifically referred to the foregoing method for generating the first data processing rule, and details are not described herein again.
  • the controller may re-detect the current service pressure value of the first security device according to a preset time interval, and determine re-detection. Whether the current service pressure value of the first security device is higher than a preset pressure threshold corresponding to the first security device, and when the determination result is higher than the pressure threshold corresponding to the first security device, The step of acquiring the data flow table information corresponding to the third switch is performed.
  • the first data processing rule is generated and sent to the target switch for data processing, if the preset time interval is detected after 5 minutes, the first security device is still in a stress overload state, Obtaining data flow flow table information corresponding to the third switch connected to the second security device, generating a second data processing rule and sending the data to the target switch, so that the target switch can further receive the receivable data according to the second data processing rule
  • the stream is pre-processed to further alleviate the data filtering pressure of the first security device.
  • the target switch may be notified that the second switch is no longer processed according to the second data processing rule and/or the first data processing. Rules for data processing.
  • the information about the directly connected switch of the first security device, such as a firewall, the direct port information, and the pressure threshold, such as T1, and the corresponding second security device, such as the data connection device, are obtained.
  • the foregoing information may be stored in a preset device information configuration table, so as to facilitate timely acquisition of the information.
  • the preset device information configuration table may be as shown in Table 2 below.
  • the controller may still send the second data processing rule to the target switch connected to the first security device (such as switch 1 and switch in FIG. 4). 2), in the target switch, when receiving the data stream, the received data stream can be processed according to the second data processing rule.
  • the second data processing rule may be notified to the target switch by sending a flow table.
  • the second data processing rule includes: discarding the data stream, encapsulating or bypassing the data stream, performing further flow table matching domain refinement on the data stream, and the like, and specifically refer to the related description of the first data processing rule. I will not repeat them here. Therefore, the switch connected to the security device can further pre-process the received data stream by using the second data processing rule, so as to reduce the data filtering pressure of the security device such as a firewall.
  • the current service pressure value of the security device is obtained to determine whether the security device is in a service stress overload state, and the switch corresponding to the security device in the current SDN is obtained when the service is in the overload state.
  • the data flow flow table information is parsed, and the data processing rule corresponding to the analysis result is generated, and the data processing rule is sent to the switch connected to the security device, so that the switch is in the
  • the received data stream can be processed according to the data processing rule, thereby avoiding the data congestion problem caused by the excessively long time of the filtering rule due to the large number of filtering rules when facing large traffic or network attacks, and reducing System cost and scalability.
  • the data is made When the traffic is low and the service pressure is within the scope of the security device processing capability, the data processing can be performed according to the precise data filtering method of the original sequential lookup table, thereby improving the system security. Moreover, the data processing rule can be dynamically changed according to the data flow table information, so that the management of the security device is facilitated, and the security pressure of the security device is not increased when the security performance is improved.
  • FIG. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention.
  • the data processing apparatus in the embodiment of the present invention may include an obtaining module 11, a generating module 12, and a sending. Module 13. among them,
  • the obtaining module 11 is configured to obtain data flow flow table information of a target switch connected to the first security device in the current software-defined network, where the data flow flow table information includes the first security device and the target switch Information about the data stream transmitted between.
  • the software-defined network SDN includes a controller, a first security device, and at least one switch.
  • the device in the embodiment of the present invention may be specifically configured in a network device of an SDN, such as a control set in the SDN network. In the device.
  • the first security device may be a firewall, a data filtering device, or another security device in the current software-defined network SDN, which is not limited by the embodiment of the present invention.
  • the target switch may include all switches directly connected to the first security device, so that the obtaining module 11 can obtain flow table information on all switches connected thereto.
  • the flow table information record includes information about a data flow transmitted between the first security device and a switch connected thereto, that is, the target switch, such as data flow information flowing from the target switch to the first security device or from the first security. The data flow information that the device flows out to the target switch, and so on.
  • the generating module 12 is configured to parse the data flow flow table information of the target switch acquired by the obtaining module 11 and generate a first data processing rule that includes the parsed analysis result.
  • the data flow table information may be parsed by the generating module 12 to obtain the parsed analysis result, and Generating a data processing rule corresponding to the parsing result, for example, the generating module 12 may perform data matching on the data stream information flowing into the first security device and out of the first security device recorded in the data flow table information, and according to the matching The result is generated with the first security device pair
  • the data processing rule should be the first data processing rule.
  • the sending module 13 is configured to send the first data processing rule generated by the generating module 12 to the target switch, so that the target switch performs the received data stream according to the first data processing rule. deal with.
  • the data processing rule may be sent by the sending module 13 to the target switch connected to the first security device, so that the target switch follows the target switch.
  • the data processing rule performs a processing operation on the received data stream (or may also be directly sent to the first security device, so that the first security device performs a processing operation on the received data stream according to the data processing rule), the processing Operations include discarding data streams, encapsulating or bypassing data streams, further stream table matching domain refinement of data streams, etc., thereby reducing the data processing pressure of security devices and avoiding current large traffic or cyber attacks. Data congestion caused by too long table lookup time.
  • the data flow flow table information corresponding to the switch connected to the security device in the current SDN is obtained, and the data flow flow table information is parsed to generate a data processing rule corresponding to the analysis result, thereby
  • the data processing rule can be sent to the switch connected to the security device, so that the switch can process the received data stream according to the data processing rule when receiving the data flow, thereby avoiding the current large traffic volume or Due to the large number of filtering rules in the network attack, the data congestion caused by the long table lookup time is reduced, the system cost is reduced, and the scalability is strong, which enables the network security device performance to be improved based on the software-defined network.
  • the data processing rule can be dynamically changed according to the change of the data flow table information, which facilitates the management of the security device.
  • FIG. 6 is a schematic structural diagram of another data processing apparatus according to an embodiment of the present invention.
  • the apparatus in the embodiment of the present invention may include the foregoing embodiment in FIG. 5 .
  • the device may further include:
  • the pressure detecting module 14 is configured to detect a current service pressure value of the first security device
  • the determining module 15 is configured to determine whether the current service pressure value detected by the pressure detecting module 14 is higher than a preset pressure threshold corresponding to the first safety device, and the determination result is higher than And the obtaining, by the obtaining module 11, the data flow table information of the target switch connected to the first security device in the current software-defined network.
  • the current service pressure of the first security device may be further detected by the pressure detecting module 14, and the first security is performed. If the pressure of the device is too large, for example, the determining module 15 determines that the current service pressure of the first security device exceeds a certain preset pressure threshold, and then notifies the acquiring module 11 to acquire the target switch connected to the first security device.
  • the data stream flows table information, and the data processing rule is generated by the generating module 12 for data stream processing. Therefore, when the data traffic is low and the processor is within the processing capability of the firewall, the sequential processing table is still performed according to the original processing rule to achieve more accurate data processing to ensure the performance of the firewall and avoid the low data volume. Possible problems with the performance of the security device.
  • the controller may store a pressure threshold configured for the first security device in advance (each of the security devices in the SDN corresponds to a pressure threshold), such as according to the performance and location of the first security device.
  • the network topology of the SDN is configured to obtain a pressure threshold corresponding to the first security device.
  • the pressure detecting module 14 may specifically include (not shown):
  • the information acquiring unit 141 is configured to acquire an amount of data flowing from the target switch to the first security device within a preset time window;
  • the calculating unit 142 is configured to calculate, according to the data amount flowing into the first security device in the preset time window acquired by the information acquiring unit 141, an average amount of data flowing into the first security device per unit time, and The calculated average data amount is used as a current service pressure value of the first security device.
  • the target switch may include a first switch connected to the first security device by using a first port, and a second switch connected to the first security device by using a second port.
  • the information acquisition unit 141 can be specifically configured to:
  • the current service pressure value of the first security device may refer to an average data amount flowing into the first security device within a preset time window.
  • the switch port, such as the first port and the second port, connected to the first security device may be determined in advance according to the network topology of the SDN.
  • the pressure detecting module 14 may determine the current service pressure value according to the amount of data flowing into the first security device according to a preset time window. For example, if the preset time window is t, the information obtaining unit 141 can send a query instruction, such as a Port Statistics command, to the target switch directly connected to the first security device, such as a firewall, every time t, and the destination address carried by the command. Set the destination switch address and set the port_no field to the direct connection port number of the first security device and the target switch. As shown in FIG.
  • a query instruction such as a Port Statistics command
  • the information obtaining unit 141 can respectively send a Port Statistics command to the switch 1 (target switch) and the switch 2 (target switch) directly connected to the firewall (the first security device), and set the port_no field to the port respectively. No. A (first port) and port number B (second port), and listen to the response information fed back by the target switch, and extract the information of the tx_bytes field in the feedback response information.
  • the information obtaining unit 141 can calculate the amount of data entering the firewall, that is, the first security device, by the port in the current time window t, for example, according to the target.
  • the switch that is, the response information fed back by the switch 1 and the switch 2, extracts the information of the tx_bytes field, and obtains the amount of data flowing into the firewall at the current t time, and compares the amount of data flowing into the firewall by the port A and the port B at the previous t time, respectively.
  • the amount of data corresponding to the information of the extracted tx_bytes field is subtracted from the amount of data sent by the port A and the port B at the previous t time, thereby obtaining the amount of data that the target switch flows into the firewall in the current time window t.
  • the calculating unit 142 can calculate the service pressure of the firewall, for example, by flowing the switch 1 and the switch 2 into the firewall in the current time window t.
  • the data amount of the port A and the direct port B entering the firewall are accumulated and divided by the time t to obtain the average data amount per unit time in the time window t, and the average data amount is used as the current service pressure value of the firewall.
  • the destination switch address may be based on the topology or network of the SDN.
  • the deployment record is determined to be obtained.
  • the acquiring module 11 may specifically include:
  • the instruction sending unit 111 is configured to send a flow table information query instruction to the target switch connected to the first security device in the current software definition network;
  • the information receiving unit 112 is configured to receive the first flow table information and the second flow table information that are returned by the target switch in response to the flow table information query instruction, where the first flow table information indicates that the first security is inflow A data flow of the device, where the data flow flowing out of the first security device is indicated in the second flow table information.
  • the command sending unit 111 can directly connect to the firewall (switch 1 and switch). 2) Sending a flow table information query instruction to query first flow table information including data flow information directly flowing into the firewall by the switch 1 and the switch 2, and data flow information including the flow directly from the firewall to the switch 1 and the switch 2 The second flow table information.
  • the command sending unit 111 can send a flow table information query instruction, such as a Multipart Message query command, to the switch 1 and the switch 2 directly connected to the firewall, and use the Individual Flow Statistics information, and set the out_port field to port A and port B, respectively.
  • the remaining fields can be arbitrarily matched, and the flow table information returned by the switch 1 and the switch 2, that is, the first flow table information including the data flow information directly flowing into the firewall by the switch 1 and the switch 2, can be received by the information receiving unit 112. Further, the command sending unit 111 may also send a Multipart Message query command to the switch 1 and the switch 2 directly connected to the firewall, and use the Individual Flow Statistics information, and set the ofp_match field to the source port A and the source port B respectively, and the remaining fields may be If it is arbitrarily matched, the flow table information returned by the switch 1 and the switch 2, that is, the second flow table information including the data flow information directly flowing out to the switch 1 and the switch 2 by the firewall, may be received by the information receiving unit 112.
  • the generating module 12 may specifically include:
  • the parsing unit 121 is configured to parse the first flow table information and the second flow table information, and the data stream indicated by the first flow table information is parsed and has a data flow indicated by the second flow table information. Corresponding to a third data stream that flows out data and a fourth data stream that does not have corresponding outflow data;
  • the marking unit 122 is configured to mark the third data stream as a preset processing manner, where the preset processing manner includes encapsulation or bypass or flow table matching domain refinement processing;
  • the marking unit 122 is further configured to mark the fourth data stream as discarded;
  • the rule generating unit 123 is configured to generate a first data processing rule that includes the tag result of the tag, and use the generated first data processing rule as the first data processing rule corresponding to the first security device.
  • the marking unit 122 is further configured to compare the data flow indicated by the third data stream and the second flow table information, and determine that the inflow data and the outflow data corresponding to the third data stream are completely a matching fifth data stream and a sixth data stream in which the inflow data and the outflow data are partially matched; marking the fifth data stream as encapsulation or detour; marking the sixth data stream as a flow table matching domain refinement, To remind the controller in the software-defined network to increase the flow table matching domain entry for the data stream when receiving the request for the same data stream as the sixth data stream type.
  • the parsing unit 121 can directly use the matching domain field in the flow table information obtained by the query to directly flow into the firewall.
  • the data stream indicated by the first flow table information that is, the data stream indicated by the first flow table information is divided into a third data stream having corresponding outflow data and a fourth data stream having no corresponding outflow data, and may not be corresponding by the marking unit 122.
  • the fourth data stream flowing out of the data is marked as discardable, and the third data stream having the corresponding outgoing data is marked as a preset processing manner, such as encapsulation or bypass or flow table matching domain refinement processing.
  • the fourth data stream that does not have corresponding outflow data can be understood as a data stream that is included in the inflow data stream corresponding to the first flow table information but not included in the outflow data stream corresponding to the second flow table information, and has a corresponding
  • the third data stream that flows out of the data can be understood as the inflow data stream corresponding to the first flow table information, and the outflow data stream corresponding to the second flow table information also includes (all matching or partially matched) data streams.
  • the flow table information obtained by the query further includes a packet_count field, where the third data stream is included in the inflow data stream corresponding to the first flow table information, and the data included in the outflow data stream corresponding to the second flow table information.
  • the marking unit 122 may further divide the third data stream into a fifth matching of the inflow data and the outflow data by parsing the first flow table information obtained by the query and the packet_count field in the counter in the second flow table information.
  • Data flow The inflow data stream corresponding to the information includes: the outflow data stream corresponding to the second flow table information also includes all matches) and the sixth data stream in which the inflow data and the outflow data portion are matched (ie, the inflow data stream corresponding to the first flow table information)
  • the inflow data stream corresponding to the second flow table information includes but only partially matched, wherein the inflow data corresponding to the fifth data stream and the packet_count field of the outflow data indicate the same number of data packets, and the sixth data stream
  • the number of packets indicated by the packet_count field of the corresponding incoming data is greater than the number of packets indicated by the packet_count field of its corresponding outgoing data.
  • the fifth data stream can then be marked as encapsulation or detour, and the sixth data stream can be marked as a flow table matching domain refinement.
  • the rule generation unit 123 can thus generate a data processing rule including a tag result for each type of data stream, that is, a first data processing rule.
  • the sending data is sent to the target switch connected to the first security device by the sending module 13 to make the target switch.
  • the received data stream can be processed in accordance with the first data processing rule upon receipt of the data stream.
  • the first data processing rule may be notified to the target switch by sending a flow table. For example, in conjunction with FIG.
  • the sending module 13 may notify the firewall that the direct connection switch 1 and the switch 2 of the first security device directly discard the fourth data stream marked as discarded;
  • the manner of the table notifies the switch 1 and the switch 2 directly connected to the firewall to perform data stream encapsulation, decapsulation processing, and data flow routing bypass processing on the fifth data stream marked as encapsulation or bypass; and adopting the flow table
  • the mode informs that the switch 1 and the switch 2 directly connected to the firewall add the matching domain content of the related data stream to the sixth data stream marked as the flow table matching domain refinement, and the like. Therefore, the received data stream can be preprocessed by the switch to effectively reduce the data filtering pressure of security devices such as firewalls.
  • the software-defined network may further include a second security device and a third switch connected to the second security device;
  • the obtaining module 11 is further configured to acquire data flow flow table information corresponding to the third switch;
  • the generating module 12 is further configured to parse the data flow flow table information corresponding to the third switch acquired by the obtaining module 11 and generate a second data processing rule that includes the parsed analysis result;
  • the sending module 13 is further configured to send the generated by the generating module 12 to the target switch.
  • the second data processing rule is configured to cause the target switch to process the received data stream according to the second data processing rule.
  • the SDN can also be configured with a subsequent security device that is the first security device, that is, the second security device.
  • the controller may further determine, according to the topology information of the SDN, address information of a switch connected to the second security device, that is, a third switch (that is, all switches directly connected to the second security device), and determine the first A port on which the third switch is connected to the second security device.
  • the SDN further includes a second security device, such as a data filtering device, and a switch 3 and a switch 4 (the switch 3 and the switch 4 are the third switch) directly connected to the data filtering device.
  • the switch 3 is directly connected to the data filtering device through the port C
  • the switch 4 is directly connected to the data filtering device through the port D.
  • the controller can obtain the data flow table information corresponding to the switch 3 and the switch 4 through the obtaining module 11 (including the flow table information and the recorded data flow information recorded by the switch 3 and the switch 4 directly flowing into the data filtering device.
  • the flow table information of the data flow information flowing directly from the data filtering device to the switch 1 and the switch 2 is analyzed, and the data flow table information corresponding to the switch 3 and the switch 4 is parsed, so that the generating module 12 generates the solution including the parsing.
  • the second data processing rule that parses the result.
  • the method for generating the second data processing rule corresponding to the second security device may be specifically referred to the foregoing method for generating the first data processing rule, and details are not described herein again.
  • the pressure detecting module 14 is further configured to re-detect the current service pressure value of the first security device according to a preset time interval;
  • the determining module 15 is further configured to determine whether the current service pressure value of the first security device that is re-detected by the pressure detecting module 14 is higher than a preset pressure threshold corresponding to the first security device, and When the result of the determination is higher than the pressure threshold corresponding to the first security device, the acquiring module 11 is notified to obtain the data flow table information of the third switch connected to the second security device in the current software-defined network.
  • the generating module 12 can still send the second data processing rule to the target switch connected to the first security device by using the sending module 13 (such as the switch in FIG. 4). 1 and switch 2), so that the target switch receives the data stream
  • the received data stream can be processed in accordance with the second data processing rule.
  • the second data processing rule may be notified to the target switch by sending a flow table.
  • the second data processing rule includes: discarding the data stream, encapsulating or bypassing the data stream, performing further flow table matching domain refinement on the data stream, and the like, and specifically refer to the related description of the first data processing rule. I will not repeat them here. Therefore, the switch connected to the security device can further pre-process the received data stream by using the second data processing rule, so as to reduce the data filtering pressure of the security device such as a firewall.
  • the current service pressure value of the security device is obtained to determine whether the security device is in a service stress overload state, and the switch corresponding to the security device in the current SDN is obtained when the service is in the overload state.
  • the data flow flow table information is parsed, and the data processing rule corresponding to the analysis result is generated, and the data processing rule is sent to the switch connected to the security device, so that the switch is in the
  • the received data stream can be processed according to the data processing rule, thereby avoiding the data congestion problem caused by the excessively long time of the filtering rule due to the large number of filtering rules when facing large traffic or network attacks, and reducing System cost and scalability.
  • the data processing can be performed according to the precise data filtering method of the original sequential lookup table, thereby improving the system. safety.
  • the data processing rule can be dynamically changed according to the data flow table information, so that the management of the security device is facilitated, and the security pressure of the security device is not increased when the security performance is improved.
  • FIG. 7 is a schematic structural diagram of a network device according to an embodiment of the present invention.
  • the network device can be applied to a software-defined network SDN, and can be specifically a controller in the SDN.
  • the network device in the embodiment of the present invention includes: a communication interface 300, a memory 200, and a processor 100, and the processor 100 is respectively connected to the communication interface 300 and the memory 200.
  • the memory 200 may be a high speed RAM memory or a non-volatile memory such as at least one disk memory.
  • the communication interface 300, the memory 200, and the processor 100 may be connected to each other through a bus, or may be connected by other means. In the present embodiment, a bus connection will be described. among them,
  • the memory 200 is configured to store driver software
  • the processor 100 reads the driver software from the memory 200 and executes it under the action of the driver software:
  • the processor 100 reads the driver software from the memory 200 and performs the acquiring, by the driver software, the data flow of the target switch connected to the first security device in the current software-defined network. Before the flow table information is used, it is also used to perform the following steps:
  • the step of acquiring data flow table information of the target switch connected to the first security device in the current software-defined network is performed.
  • the processor 100 reads the driver software from the memory 200 and performs the detecting the current service pressure value of the first security device by using the driver software, and specifically performing the following steps:
  • the target switch includes a first switch connected to the first security device by using a first port, and a second switch connected to the first security device by using a second port;
  • the processor Read the driver software from the memory 200 and execute the data amount of the first security device from the target switch within the preset time window by using the driver software, and perform the following steps. :
  • the processor 100 reads the driver software from the memory 200 and performs the acquiring, by the driver software, the data flow of the target switch connected to the first security device in the current software-defined network.
  • Flow table information perform the following steps:
  • the processor 100 reads the driver software from the memory 200 and performs the parsing of the data flow table information of the target switch under the action of the driver software, and generates and includes the parsing
  • the first data processing rule of the parsing result the specific steps are as follows:
  • the processor 100 reads the driver software from the memory 200 and performs the marking of the third data stream as a preset processing mode by using the driver software, and specifically performs the following steps. :
  • the software-defined network further includes a second security device and a third switch connected to the second security device; the processor 100 reads the driver software from the memory 200 and is in the The driver software is also used to perform the following steps:
  • the data flow flow table information corresponding to the switch connected to the security device in the current SDN is obtained, and the data flow flow table information is parsed, and the data processing rule corresponding to the analysis result is generated. Therefore, the data processing rule can be sent to the switch connected to the security device, so that the switch processes the received data stream according to the data processing rule, thereby avoiding a large number of filtering rules when facing a large traffic or a network attack. Data congestion caused by long table lookup time, reduced system cost, and high scalability, enabling network security device performance to be improved based on software-defined networks. Moreover, the data processing rule can be dynamically changed according to the change of the data flow table information, which facilitates the management of the security device.
  • the disclosed apparatus and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Abstract

一种基于软件定义网络的数据处理方法及相关设备,属于通信技术领域。其中,所述方法包括:获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则;向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。采用本发明实施例,能够降低系统成本,减轻对系统中的安全设备的管理压力,且可扩展性强。

Description

一种基于软件定义网络的数据处理方法及相关设备 技术领域
本发明涉及通信技术领域,尤其涉及一种基于软件定义网络的数据处理方法及相关设备。
背景技术
软件定义网络(Software Defined Network,简称“SDN”)是一种通过将网络设备控制面与数据面分离开来,从而实现网络数据流量的灵活控制的新型网络架构,其为核心网络及应用的创新提供了良好的平台。为了保证网络和信息的安全,网络中往往部署有大量的安全设备,这些大量的安全设备既包括简单的包过滤防火墙,也包括复杂的具有深度报解析功能的流清洗设备等等。网络中的安全设备中设置有非常多的过滤规则,其一般是按照过滤规则对每个数据包进行过滤来实现安全防护,具体是按照该过滤规则执行顺序查表来决定该数据包是否通过。而随着网络带宽的不断增加,其带来的高速数据流对网络安全设备的性能要求也越来越高,而目前安全设备往往无法应对该高速数据流,比如安全设备在面临大业务量或网络攻击时常常会因过滤规则繁多查表时间过长而导致数据拥塞问题。由此,如何提高网络安全设备性能以应对高速数据流成为亟需解决的难题。
目前的解决方式是通过简单的增加网络中安全设备的数量,部署各种功能的安全设备来构建平行或层次式的安全系统,各安全设备具有各自防护的强项和固有缺点,包括如通常位于网络边界的防火墙、负责迷惑攻击者的“蜜罐”、实时执行防病毒功能的病毒扫描设备以及入侵检测防护系统等等,从而通过各安全设备协同工作来提升网络安全性能。然而,该方式下安全设备数量的增加则导致增加了系统成本,且加重了系统对各安全设备的管理压力,而且要求各安全设备具有互相通信的软件接口,实现难度大且可扩展性差。
发明内容
本发明实施例提供了一种基于软件定义网络的数据处理方法及相关设备,能够基于软件定义网络提升网络安全设备性能,并降低系统成本,减轻对系统中的安全设备的管理压力,且可扩展性强。
第一方面,本发明实施例提供了一种基于软件定义网络的数据处理方法,包括:
获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;
解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则;
向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
结合第一方面,在第一方面的第一种可能的实现方式中,在所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息之前,所述方法还包括:
检测所述第一安全设备的当前业务压力值;
判断所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值;
若高于所述压力阈值,则执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息的步骤。
结合第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述检测所述第一安全设备的当前业务压力值,包括:
获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
根据所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
结合第一方面的第二种可能的实现方式,在第一方面的第三种可能的实现方式中,所述目标交换机包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量,包括:
分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
结合第一方面,或者第一方面的第一种可能的实现方式,或者第一方面的第二种可能的实现方式,或者第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,包括:
向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
结合第一方面的第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则,包括:
对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
将所述第四数据流标记为丢弃;
生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
结合第一方面的第五种可能的实现方式,在第一方面的第六种可能的实现方式中,所述将所述第三数据流标记为预设处理方式,包括:
将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;
将所述第五数据流标记为封装或绕行;
将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
结合第一方面,或者第一方面的第一种可能的实现方式,或者第一方面的第二种可能的实现方式,或者第一方面的第三种可能的实现方式,或者第一方面的第四种可能的实现方式,或者第一方面的第五种可能的实现方式,或者第一方面的第六种可能的实现方式,在第一方面的第七种可能的实现方式中,所述软件定义网络中还包括第二安全设备和与所述第二安全设备相连接的第三交换机;所述方法还包括:
获取所述第三交换机对应的数据流流表信息;
解析所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
向所述目标交换机下发所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
结合第一方面的第七种可能的实现方式,在第一方面的第八种可能的实现方式中,在所述获取所述第三交换机对应的数据流流表信息之前,所述方法还包括:
按照预设时间间隔重新检测所述第一安全设备的当前业务压力值;
判断重新检测到的所述第一安全设备的当前业务压力值是否高于预置的 与所述第一安全设备对应的压力阈值;
若判断结果为高于所述第一安全设备对应的压力阈值,则执行所述获取所述第三交换机对应的数据流流表信息的步骤。
第二方面,本发明实施例还提供了一种数据处理装置,包括:
获取模块,用于获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;
生成模块,用于解析所述获取模块获取的所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则;
发送模块,用于向所述目标交换机下发所述生成模块生成的所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
结合第二方面,在第二方面的第一种可能的实现方式中,所述装置还包括:
压力检测模块,用于检测所述第一安全设备的当前业务压力值;
判断模块,用于判断所述压力检测模块检测到的所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值,并在判断结果为高于所述压力阈值时,通知所述获取模块获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息。
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述压力检测模块包括:
信息获取单元,用于获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
计算单元,用于根据所述信息获取单元获取的所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
结合第二方面的第二种可能的实现方式,在第二方面的第三种可能的实现方式中,所述目标交换机包括通过第一端口与所述第一安全设备连接的第一交 换机和通过第二端口与所述第一安全设备连接的第二交换机;所述信息获取单元具体用于:
分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
结合第二方面,或者第二方面的第一种可能的实现方式,或者第二方面的第二种可能的实现方式,或者第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述获取模块包括:
指令发送单元,用于向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
信息接收单元,用于接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
结合第二方面的第四种可能的实现方式,在第二方面的第五种可能的实现方式中,所述生成模块包括:
解析单元,用于对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
标记单元,用于将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
所述标记单元,还用于将所述第四数据流标记为丢弃;
规则生成单元,用于生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
结合第二方面的第五种可能的实现方式,在第二方面的第六种可能的实现方式中,
所述标记单元,还用于将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;将所述第五数据流标记为封装或绕行;将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
结合第二方面,或者第二方面的第一种可能的实现方式,或者第二方面的第二种可能的实现方式,或者第二方面的第三种可能的实现方式,或者第二方面的第四种可能的实现方式,或者第二方面的第五种可能的实现方式,或者第二方面的第六种可能的实现方式,在第二方面的第七种可能的实现方式中,所述软件定义网络中还包括第二安全设备和与所述第二安全设备相连接的第三交换机;
所述获取模块,还用于获取所述第三交换机对应的数据流流表信息;
所述生成模块,还用于解析所述获取模块获取的所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
所述发送模块,还用于向所述目标交换机下发所述生成模块生成的所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
结合第二方面的第七种可能的实现方式,在第二方面的第八种可能的实现方式中,
所述压力检测模块,还用于按照预设时间间隔重新检测所述第一安全设备的当前业务压力值;
所述判断模块,还用于判断所述压力检测模块重新检测到的所述第一安全设备的当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值,并在判断结果为高于所述第一安全设备对应的压力阈值时,通知所述获取模块 获取当前软件定义网络中与第二安全设备连接的第三交换机的数据流流表信息。
第三方面,本发明实施例还提供了一种计算机存储介质,所述计算机存储介质存储有程序,所述程序执行时包括上述第一方面的基于软件定义网络的数据处理方法的部分或全部的步骤。
第四方面,本发明实施例还提供了一种网络设备,包括:通信接口、存储器和处理器,所述处理器分别与所述通信接口及所述存储器连接;其中,
所述存储器用于存储驱动软件;
所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行:
获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;
解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则;
通过所述通信接口向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
结合第四方面,在第四方面的第一种可能的实现方式中,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息之前,还用于执行以下步骤:
检测所述第一安全设备的当前业务压力值;
判断所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值;
若高于所述压力阈值,则执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息的步骤。
结合第四方面的第一种可能的实现方式,在第四方面的第二种可能的实现 方式中,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述检测所述第一安全设备的当前业务压力值,具体执行以下步骤:
获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
根据所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
结合第四方面的第二种可能的实现方式,在第四方面的第三种可能的实现方式中,所述目标交换机包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量,具体执行以下步骤:
分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
结合第四方面,或者第四方面的第一种可能的实现方式,或者第四方面的第二种可能的实现方式,或者第四方面的第三种可能的实现方式,在第四方面的第四种可能的实现方式中,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,具体执行以下步骤:
通过所述通信接口向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
通过所述通信接口接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
结合第四方面的第四种可能的实现方式,在第四方面的第五种可能的实现方式中,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则,具体执行以下步骤:
对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
将所述第四数据流标记为丢弃;
生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
结合第四方面的第五种可能的实现方式,在第四方面的第六种可能的实现方式中,
所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述将所述第三数据流标记为预设处理方式,具体执行以下步骤:
将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;
将所述第五数据流标记为封装或绕行;
将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
结合第四方面,或者第四方面的第一种可能的实现方式,或者第四方面的第二种可能的实现方式,或者第四方面的第三种可能的实现方式,或者第四方面的第四种可能的实现方式,或者第四方面的第五种可能的实现方式,或者第四方面的第六种可能的实现方式,在第四方面的第七种可能的实现方式中,所 述软件定义网络中还包括第二安全设备和与所述第二安全设备相连接的第三交换机;所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下还用于执行以下步骤:
获取所述第三交换机对应的数据流流表信息;
解析所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
通过所述通信接口向所述目标交换机下发所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
结合第四方面的第七种可能的实现方式,在第四方面的第八种可能的实现方式中,在所述获取所述第三交换机对应的数据流流表信息之前,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下还用于执行以下步骤:
按照预设时间间隔重新检测所述第一安全设备的当前业务压力值;
判断重新检测到的所述第一安全设备的当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值;
若判断结果为高于所述第一安全设备对应的压力阈值,则执行所述获取所述第三交换机对应的数据流流表信息的步骤。
在本发明实施例中,可通过获取当前SDN中与安全设备连接的交换机对应的数据流流表信息,以及对该数据流流表信息进行解析,生成得到与该解析结果对应的数据处理规则,从而能够通过向与该安全设备连接的交换机下发该数据处理规则以使交换机按照该数据处理规则对接收的数据流进行处理,从而避免了目前面临大业务量或网络攻击时由于过滤规则繁多而查表时间过长所导致的数据拥塞问题,并降低了系统成本,可扩展性强,使得能够基于软件定义网络提升网络安全设备性能。而且,该数据处理规则可根据数据流流表信息的改变而动态改变,这就便于了安全设备的管理。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的一种软件定义网络系统示意图;
图2是本发明实施例提供的一种基于软件定义网络的数据处理方法的流程示意图;
图3是本发明实施例提供的另一种基于软件定义网络的数据处理方法的流程示意图;
图4是本发明实施例提供的一种基于软件定义网络的数据处理方法的应用场景图;
图5是本发明实施例提供的一种数据处理装置的结构示意图;
图6是本发明实施例提供的另一种数据处理装置的结构示意图;
图7是本发明实施例提供的一种网络设备的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
应理解,本发明实施例的技术方案可具体应用于软件定义网络SDN中,具体涉及基于软件定义网络的数据处理方案。其中,软件定义网络SDN将传统的网络分离为控制层和数据转发层,控制层中的控制器负责指挥位于数据转发层中的软件定义网络交换机根据用户需求进行数据处理。此外,软件定义网络不仅可以通过控制器控制数据流的转发,也可以执行例如丢弃、改写等更加灵活的传统路由设备无法实现的功能。该软件定义网络的出现给安全设备性能 的提升创造了新的网络环境基础。
下面对软件定义网络SDN的具体架构进行示意性说明。请参见图1,图1是本发明实施例提供的一种SDN系统架构图。具体的,如图1所示,该SDN中包括控制器、多个交换机(图1中示出2个)以及安全设备。其中,该安全设备可以是防火墙(如包过滤防火墙)、数据过滤设备、流清洗设备、病毒扫描设备或入侵检测防护系统等等。控制器和各交换机之间通过控制链路(如图中虚线所示)进行通信,包括传输交换机产生的请求数据包,以及传输控制器和交换机之间的查询与应答信息等等。此外,该各交换机之间也可通过通信链路(如图中实线所示)进行通信。
请参见图2,是本发明实施例的一种基于软件定义网络的数据处理方法的流程示意图,具体的,如图2所示,本发明实施例的所述方法可以包括以下步骤:
S101:获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息。
需要说明的是,本发明实施例的所述方法可具体应用于软件定义网络SDN中,所述SDN包括控制器、第一安全设备和至少一个交换机,且本发明实施例的技术方案可具体在SDN网络的控制器中执行。
具体的,所述第一安全设备可以为该当前软件定义网络SDN中的防火墙、数据过滤设备或其他安全设备,本发明实施例不做限定。所述目标交换机可包括与所述第一安全设备直接连接的所有交换机,从而可获取得到与其连接的所有交换机上的流表信息。其中,该流表信息记录包括该第一安全设备和与其连接的交换机即目标交换机之间传输的数据流的信息,如从目标交换机流入该第一安全设备的数据流信息或从该第一安全设备流出至该目标交换机的数据流信息等等。
S102:解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则。
具体实施例中,在获取得到与第一安全设备连接的交换机的数据流流表信 息之后,控制器即可通过对该数据流流表信息进行解析,得到解析的解析结果,并生成与该解析结果对应的数据处理规则,比如控制器可对数据流流表信息中记录的流入该第一安全设备和流出该第一安全设备的数据流信息进行数据匹配,并根据该匹配的结果生成与该第一安全设备对应的数据处理规则,即第一数据处理规则。
S103:向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
具体的,在得到该第一安全设备对应的数据处理规则之后,控制器即可将该数据处理规则发送给与该第一安全设备连接的目标交换机,使得该目标交换机按照该数据处理规则对接收的数据流进行处理操作,该处理操作包括丢弃数据流、对数据流进行封装或绕行、对数据流进行进一步的流表匹配域细化等等,从而减轻了安全设备的数据处理压力,避免了目前面临大业务量或网络攻击时由于表时间过长所导致的数据拥塞问题。
可选的,在获取与第一安全设备连接的目标交换机的数据流流表信息之前,还可进一步检测该第一安全设备的当前业务压力,并在该第一安全设备的压力过大,比如超过某一预设的压力阈值时,再触发该获取与第一安全设备连接的目标交换机的数据流流表信息并生成数据处理规则进行数据流处理的流程。从而可在数据流量较低、处于防火墙处理能力范围之内时,仍按照原有的处理规则执行顺序查表以实现更为精确的数据处理,以确保防火墙性能,避免了在低数据量时有可能降低安全设备性能的问题。
在本发明实施例中,可通过获取当前SDN中与安全设备连接的交换机对应的数据流流表信息,以及对该数据流流表信息进行解析,生成与该解析结果对应的数据处理规则,从而能够通过向与该安全设备连接的交换机下发该数据处理规则,以使交换机在接收到数据流时能够按照该数据处理规则对接收的数据流进行处理,由此避免了目前面临大业务量或网络攻击时由于过滤规则繁多而查表时间过长所导致的数据拥塞问题,并降低了系统成本,可扩展性强,使得能够基于软件定义网络提升网络安全设备性能。而且,该数据处理规则可根 据数据流流表信息的改变而动态改变,这就便于了对安全设备的管理。
请参见图3,图3是本发明实施例提供的另一种基于软件定义网络的数据处理方法的流程示意图。具体的,如图3所示,本发明实施例的所述方法可以包括以下步骤:
S201:检测第一安全设备的当前业务压力值。
可选的,该第一安全设备的当前业务压力值可以是指预设时间窗内流入该第一安全设备的平均数据量。则所述检测所述第一安全设备的当前业务压力值,可以具体为:获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;根据所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量(比如将该预设时间窗内流入第一安全设备的数据量除以该预设时间窗对应的时间获取得到该平均数据量),并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
进一步的,所述目标交换机可包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量,可以具体为:分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。其中,该与第一安全设备连接的交换机端口如第一端口和第二端口可预先根据该SDN的网络拓扑结构确定得到。
具体的,该SDN中的控制器可通过获取当前SDN即该第一安全设备所在SDN的拓扑结构信息或网络部署记录,并根据该获取的拓扑结构信息或网络部署记录确定出防火墙等安全设备、与该安全设备连接的交换机的地址信息,以及确定出该交换机中与安全设备连接的端口信息等等。其中,该端口信息包括交换机与安全设备直接连接的端口号,并可将第一安全设备与其直连的端口号进行绑定,以便于基于该端口号获取该安全设备与交换机之间传输的数据流 信息。
请一并参见图4,是本发明实施例提供的一种基于软件定义网络的数据处理方法的应用场景图。具体的,如图4所示,本发明实施例的SDN中包括控制器、交换机1(即目标交换机如第一交换机)、交换机2(即目标交换机如第二交换机)以及与该交换机1和交换机2连接的防火墙(即第一安全设备)。其中,每个交换机包括至少一个物理端口(以下简称端口),在本发明实施例中,假设交换机1通过端口A(即第一端口)与防火墙直接连接,交换机2通过端口B(即第二端口)与防火墙直接连接。该控制器和各交换机之间通过控制链路(如图中虚线及双向箭头所示)进行通信,包括传输交换机产生的请求数据包,以及传输控制器和交换机之间的查询与应答信息等等。各交换机之间可通过通信链路(如图中实线所示)进行通信,比如传输当前网络中的用户数据流。则在本发明实施例中,可获取得到与第一安全设备即防火墙连接的交换机为交换机1和交换机2,其对应的直连端口分别为端口A和端口B。
具体实施例中,在需要获取第一安全设备的当前业务压力值时,控制器可根据预设时间窗统计的流入该第一安全设备的数据量来确定该当前业务压力值。具体的,假设该预设时间窗为t,则控制器可每隔时间t向与第一安全设备如防火墙直连的目标交换机发送查询指令如Port Statistics指令,并将该指令携带的目的地址设为该目标交换机地址,将port_no字段设为第一安全设备与该目标交换机的直连端口号。请一并参见图4,则控制器可向与防火墙直连的交换机1和交换机2分别发送Port Statistics指令,将port_no字段分别设为端口号A和端口号B,并监听由目标交换机反馈的应答信息,提取反馈的应答信息中tx_bytes字段的信息。通过对比前一个t时刻由该从目标交换机流入该第一安全设备的数据流量,计算当前时间窗t内由该端口进入防火墙即第一安全设备的数据量,比如根据目标交换机即交换机1和交换机2反馈的应答信息,提取记录tx_bytes字段的信息,得到当前t时刻流入防火墙的数据量,并分别对比前一个t时刻由端口A和端口B流入防火墙的数据量,将当前提取的tx_bytes字段的信息对应的数据量减去该前一个t时刻由端口A和端口B发送 的数据量,从而获取得到本次时间窗t内目标交换机流入防火墙的数据量。进一步的,根据该本次时间窗t内目标交换机流入防火墙的数据量即可计算该防火墙的业务压力,如将本次时间窗t内由交换机1和交换机2流入防火墙即通过直连端口A和直连端口B进入防火墙的数据量相累加后除以该时间t得到该时间窗t内单位时间的平均数据量,并可将该平均数据量作为防火墙的当前业务压力值。
S202:判断所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值。
具体实施例中,可预先为该第一安全设备配置一个压力阈值(具体可为该SDN中的所有安全设备分别预置得到其对应的压力阈值),比如根据该第一安全设备的性能、所在SDN的网络拓扑及网络部署记录等信息,配置得到该压力阈值为T1。
在获取得到第一安全设备的当前业务压力值之后,控制器即可将该当前业务压力值与预置的与该第一安全设备对应的压力阈值(如上述的T1)进行比较,判断安全设备是否处于业务压力过载状态,即判断该当前业务压力值是否高于该压力阈值,并在高于该压力阈值时,执行步骤S203;否则,按照预设的时间间隔如t重新获取第一安全设备的业务压力值,继续监测该第一安全设备是否处于业务压力过载状态,直至第一安全设备的业务压力值高于该压力阈值即处于业务压力过载状态时执行步骤S203。
可选的,在获取得到与安全设备直连的交换机信息、端口信息以及压力阈值等信息之后,可将上述信息存储于预置的设备信息配置表中,以便于后续使用时信息的及时获取。例如,该预置的设备信息配置表可以如下表一所示。
表一
Figure PCTCN2015093497-appb-000001
S203:获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息。
具体的,所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,可以具体为:向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
举例来说,如图4所示,当检测到第一安全设备如图4中的防火墙处于业务压力过载状态时,控制器即可向该防火墙的直连交换机(交换机1和交换机2)发送流表信息查询指令,查询包括由该交换机1和交换机2直接流入该防火墙的数据流信息的第一流表信息和包括由该防火墙直接流出至该交换机1和交换机2的数据流信息的第二流表信息。具体的,控制器可向防火墙直连的交换机1和交换机2分别发送流表信息查询指令如Multipart Message查询指令,利用Individual Flow Statistics信息,并将out_port字段分别设置为端口A和端口B,其余字段可任意匹配,从而查询得到包括由该交换机1和交换机2直接流入该防火墙的数据流信息的第一流表信息。进一步的,控制器还可向防火墙直连的交换机1和交换机2分别发送Multipart Message查询指令,利用Individual Flow Statistics信息,并将ofp_match字段分别设置为源端口A和源端口B,其余字段可任意匹配,从而查询得到包括由该防火墙直接流出至该交换机1和交换机2的数据流信息的第二流表信息。
S204:解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则。
可选的,所述解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则,可以具体为:对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出 数据的第四数据流;将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;将所述第四数据流标记为丢弃;生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
进一步可选的,所述将所述第三数据流标记为预设处理方式,可以具体为:将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;将所述第五数据流标记为封装或绕行;将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
具体的,结合图4,控制器在查询得到该第一流表信息和第二流表信息之后,即可利用查询得到的流表信息中的匹配域字段,将直接流入防火墙(第一安全设备)的数据流即第一流表信息指示的数据流划分为具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流,并可将该不具有对应流出数据的第四数据流标记为可丢弃,将该具有对应流出数据的第三数据流标记为预设处理方式,如封装或绕行或流表匹配域细化处理。其中,该不具有对应流出数据的第四数据流可以理解为该第一流表信息对应的流入数据流中包括、但第二流表信息对应的流出数据流中不包括的数据流,该具有对应流出数据的第三数据流可以理解为该第一流表信息对应的流入数据流包括、第二流表信息对应的流出数据流也包括(全部匹配或部分匹配)的数据流。进一步的,该查询得到的流表信息中还包括packet_count字段,若该第三数据流为第一流表信息对应的流入数据流中包括、第二流表信息对应的流出数据流中也包括的数据流,则控制器还可通过解析该查询得到的第一流表信息和第二流表信息中的计数器中packet_count字段,将该第三数据流进一步划分为流入数据与流出数据完全匹配的第五数据流(即第一流表信息对应的流入数据流中包括、第二流表信息对应的流出数据流中也包括且全部匹配)及流入数据和流出数据部分匹配的 第六数据流(即第一流表信息对应的流入数据流中包括、第二流表信息对应的流出数据流中包括但仅部分匹配),其中,该第五数据流对应的流入数据和流出数据的packet_count字段指示的数据包数目相同,该第六数据流对应的流入数据的packet_count字段指示的数据包数目大于其对应的流出数据的packet_count字段指示的数据包数目。则可将该第五数据流标记为封装或绕行,将该第六数据流标记为流表匹配域细化。从而可生成包括对各类数据流的标记结果的数据处理规则即第一数据处理规则。
S205:向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
具体实施例中,控制器在生成得到该第一数据处理规则之后,即可将该第一数据处理规则下发至与该第一安全设备连接的目标交换机中,使得目标交换机在接收到数据流时能够按照该第一数据处理规则对该接收的数据流进行处理。其中,该第一数据处理规则可以是通过下发流表的方式通知给该目标交换机的。例如,结合图4,控制器可采用下发流表的方式通知防火墙即第一安全设备的直连交换机1和交换机2对该标记为丢弃的第四数据流进行直接丢弃;采用下发流表的方式通知与防火墙直连的交换机1和交换机2对标记为封装或绕行的第五数据流进行数据流封装、解封装处理和数据流路由绕行通过处理;以及采用下发流表的方式通知与防火墙直连的交换机1和交换机2对标记为流表匹配域细化的第六数据流增加相关数据流的匹配域内容,等等。从而能够通过交换机对接收的数据流进行预处理来有效减轻防火墙等安全设备的数据过滤压力。
进一步可选的,所述软件定义网络中还可包括第二安全设备和与所述第二安全设备相连接的第三交换机;则该控制器还可获取所述第三交换机对应的数据流流表信息;解析所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;向所述目标交换机下发所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
具体的,该SDN中还可设置存在该第一安全设备的后续安全设备,即第二安全设备。则控制器还可根据该SDN的拓扑结构信息确定出与该第二安全设备连接的交换机即第三交换机(即与该第二安全设备直连的所有交换机)的地址信息,以及确定出该第三交换机与该第二安全设备连接的端口。如图4所示,该SDN中还包括第二安全设备如数据过滤设备,以及与该数据过滤设备直接连接的交换机3和交换机4(该交换机3和交换机4即为该第三交换机)。其中,交换机3通过端口C与数据过滤设备直连,交换机4通过端口D与数据过滤设备直连。则控制器能够通过获取该换机3和交换机4对应的数据流流表信息,解析该交换机3和交换机4对应的数据流流表信息,从而生成包括所述解析的解析结果的第二数据处理规则。具体的,该第二安全设备对应的第二数据处理规则的生成方式可具体参照上述的第一数据处理规则的生成方式,此处不再赘述。
可选的,在所述获取所述第三交换机对应的数据流流表信息之前,该控制器还可按照预设时间间隔重新检测所述第一安全设备的当前业务压力值,并判断重新检测到的所述第一安全设备的当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值,并在判断结果为高于所述第一安全设备对应的压力阈值时,执行所述获取所述第三交换机对应的数据流流表信息的步骤。也就是说,在生成得到第一数据处理规则并下发给目标交换机以进行数据处理之后,若该预设时间间隔如5分钟以后仍然检测到该第一安全设备处于压力过载状态,则可通过获取与第二安全设备连接的第三交换机对应的数据流流表信息,生成得到第二数据处理规则并发送给该目标交换机,使得目标交换机能够根据该第二数据处理规则进一步对可接收的数据流进行预处理,以进一步减轻第一安全设备的数据过滤压力。相应地,若检测得到该第一安全设备不再处于压力过载状态,如当前业务压力值低于该压力阈值时,则可通知目标交换机不再根据第二数据处理规则和/或第一数据处理规则进行数据处理。
进一步可选的,在获取得到第一安全设备如防火墙的直连交换机信息、直连端口信息以及压力阈值如T1,及其对应的第二安全设备如数据连接设备的 直连交换机信息、直连端口信息以及压力阈值如T2等信息之后,可将上述信息存储于预置的设备信息配置表中,以便于信息的及时获取。例如,结合图4,该预置的设备信息配置表可以如下表二所示。
表二
Figure PCTCN2015093497-appb-000002
具体实施例中,控制器在生成得到该第二数据处理规则之后,仍可将该第二数据处理规则下发至与该第一安全设备连接的目标交换机(如图4中的交换机1和交换机2)中,使得目标交换机在接收到数据流时能够按照该第二数据处理规则对该接收的数据流进行处理。具体的,该第二数据处理规则可以是通过下发流表的方式通知给该目标交换机的。该第二数据处理规则包括对数据流进行丢弃、对数据流进行封装或绕行、对数据流进行进一步的流表匹配域细化等等,具体可参照上述第一数据处理规则的相关描述,此处不再赘述。从而能够使得与安全设备连接的交换机进一步通过该第二数据处理规则对接收的数据流进行预处理,以效减轻防火墙等安全设备的数据过滤压力。
在本发明实施例中,可通过获取安全设备的当前业务压力值来判断该安全设备是否处于业务压力过载状态,并在确定处于该业务压力过载状态时获取当前SDN中与安全设备连接的交换机对应的数据流流表信息,以及对该数据流流表信息进行解析,生成与该解析结果对应的数据处理规则,并通过向与该安全设备连接的交换机下发该数据处理规则,以使交换机在接收到数据流时能够按照该数据处理规则对接收的数据流进行处理,从而避免了目前面临大业务量或网络攻击时由于过滤规则繁多而查表时间过长所导致的数据拥塞问题,并降低了系统成本,可扩展性强。同时,通过新增业务压力检测机制,使得在数据 流量较低,业务压力处于安全设备处理能力范围内时,能够按照原有的顺序查表的精确数据过滤方式来进行数据处理,则提升了系统安全性。而且,该数据处理规则可根据数据流流表信息动态改变,使得便于了对安全设备的管理,且在提升安全性能时不会导致增加安全设备的业务压力。
请参见图5,是本发明实施例的一种数据处理装置的结构示意图,具体的,如图5所示,本发明实施例的所述数据处理装置可包括获取模块11、生成模块12以及发送模块13。其中,
所述获取模块11,用于获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息。
需要说明的是,所述软件定义网络SDN包括控制器、第一安全设备和至少一个交换机,本发明实施例的所述装置可具体设置于SDN的网络设备中,如设置于该SDN网络的控制器中。
具体的,所述第一安全设备可以为该当前软件定义网络SDN中的防火墙、数据过滤设备或其他安全设备,本发明实施例不做限定。所述目标交换机可包括与所述第一安全设备直接连接的所有交换机,从而获取模块11可获取得到与其连接的所有交换机上的流表信息。其中,该流表信息记录包括该第一安全设备和与其连接的交换机即目标交换机之间传输的数据流的信息,如从目标交换机流入该第一安全设备的数据流信息或从该第一安全设备流出至该目标交换机的数据流信息等等。
所述生成模块12,用于解析所述获取模块11获取的所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则。
具体实施例中,在获取模块11获取得到与第一安全设备连接的交换机的数据流流表信息之后,即可通过生成模块12对该数据流流表信息进行解析,得到解析的解析结果,并生成与该解析结果对应的数据处理规则,比如生成模块12可对数据流流表信息中记录的流入该第一安全设备和流出该第一安全设备的数据流信息进行数据匹配,并根据该匹配的结果生成与该第一安全设备对 应的数据处理规则,即第一数据处理规则。
所述发送模块13,用于向所述目标交换机下发所述生成模块12生成的所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
具体的,在生成模块12生成得到该第一安全设备对应的数据处理规则之后,即可通过发送模块13将该数据处理规则发送给与该第一安全设备连接的目标交换机,使得该目标交换机按照该数据处理规则对接收的数据流进行处理操作(或者还可以直接下发给该第一安全设备,以使该第一安全设备按照该数据处理规则对接收的数据流进行处理操作),该处理操作包括丢弃数据流、对数据流进行封装或绕行、对数据流进行进一步的流表匹配域细化等等,从而减轻了安全设备的数据处理压力,避免了目前面临大业务量或网络攻击时由于查表时间过长所导致的数据拥塞问题。
在本发明实施例中,可通过获取当前SDN中与安全设备连接的交换机对应的数据流流表信息,以及对该数据流流表信息进行解析,生成与该解析结果对应的数据处理规则,从而能够通过向与该安全设备连接的交换机下发该数据处理规则,以使交换机在接收到数据流时能够按照该数据处理规则对接收的数据流进行处理,由此避免了目前面临大业务量或网络攻击时由于过滤规则繁多而查表时间过长所导致的数据拥塞问题,并降低了系统成本,可扩展性强,使得能够基于软件定义网络提升网络安全设备性能。而且,该数据处理规则可根据数据流流表信息的改变而动态改变,这就便于了对安全设备的管理。
进一步的,请参见图6,是本发明实施例的另一种数据处理装置的结构示意图,具体的,如图6所示,本发明实施例的所述装置可包括上述图5对应实施例中的数据处理装置的获取模块11、生成模块12以及发送模块13。进一步的,在本发明实施例中,所述装置还可包括:
压力检测模块14,用于检测所述第一安全设备的当前业务压力值;
判断模块15,用于判断所述压力检测模块14检测到的所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值,并在判断结果为高于 所述压力阈值时,通知所述获取模块11获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息。
具体的,在获取模块11获取与第一安全设备连接的目标交换机的数据流流表信息之前,还可通过压力检测模块14进一步检测该第一安全设备的当前业务压力,并在该第一安全设备的压力过大,比如判断模块15判断得到该第一安全设备的当前业务压力超过某一预设的压力阈值时,再通知所述获取模块11该获取与第一安全设备连接的目标交换机的数据流流表信息,并通过生成模块12生成数据处理规则以进行数据流处理。从而可在数据流量较低、处于防火墙处理能力范围之内时,仍按照原有的处理规则执行顺序查表以实现更为精确的数据处理,以确保防火墙性能,避免了在低数据量时有可能降低安全设备性能的问题。
其中,该控制器中可存储有预先为该第一安全设备配置的压力阈值(该SDN中的所有安全设备中每一个安全设备对应一个压力阈值),比如根据该第一安全设备的性能及所在SDN的网络拓扑,配置得到该第一安全设备对应的压力阈值。
可选的,在本实施例中,所述压力检测模块14可具体包括(图中未示出):
信息获取单元141,用于获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
计算单元142,用于根据所述信息获取单元141获取的所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
进一步可选的,在本发明实施例中,所述目标交换机可包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述信息获取单元141可具体用于:
分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
其中,该第一安全设备的当前业务压力值可以是指预设时间窗内流入该第一安全设备的平均数据量。该与第一安全设备连接的交换机端口如第一端口和第二端口可预先根据该SDN的网络拓扑结构确定得到。
具体的,压力检测模块14可根据预设时间窗统计的流入该第一安全设备的数据量来确定该当前业务压力值。例如,假设该预设时间窗为t,则信息获取单元141可每隔时间t向与第一安全设备如防火墙直连的目标交换机发送查询指令如Port Statistics指令,并将该指令携带的目的地址设为该目标交换机地址,将port_no字段设为第一安全设备与该目标交换机的直连端口号。如图4所示,则信息获取单元141可向与防火墙(第一安全设备)直连的交换机1(目标交换机)和交换机2(目标交换机)分别发送Port Statistics指令,将port_no字段分别设为端口号A(第一端口)和端口号B(第二端口),并监听由目标交换机反馈的应答信息,提取反馈的应答信息中tx_bytes字段的信息。通过对比前一个t时刻由该从目标交换机流入该第一安全设备的数据流量,信息获取单元141即可计算当前时间窗t内由该端口进入防火墙即第一安全设备的数据量,比如根据目标交换机即交换机1和交换机2反馈的应答信息,提取记录tx_bytes字段的信息,得到当前t时刻流入防火墙的数据量,并分别对比前一个t时刻由端口A和端口B流入防火墙的数据量,将当前提取的tx_bytes字段的信息对应的数据量减去该前一个t时刻由端口A和端口B发送的数据量,从而获取得到本次时间窗t内目标交换机流入防火墙的数据量。进一步的,根据该本次时间窗t内目标交换机流入防火墙的数据量,计算单元142即可计算该防火墙的业务压力,如将本次时间窗t内由交换机1和交换机2流入防火墙即通过直连端口A和直连端口B进入防火墙的数据量相累加后除以该时间t得到该时间窗t内单位时间的平均数据量,并可将该平均数据量作为防火墙的当前业务压力值。其中,该目标交换机地址可根据该SDN的拓扑结构或网络 部署记录确定得到。
进一步的,在本发明实施例中,所述获取模块11可具体包括:
指令发送单元111,用于向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
信息接收单元112,用于接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
具体的,如图4所示,当判断模块15检测到第一安全设备如图4中的防火墙处于业务压力过载状态时,指令发送单元111即可向该防火墙的直连交换机(交换机1和交换机2)发送流表信息查询指令,以查询包括由该交换机1和交换机2直接流入该防火墙的数据流信息的第一流表信息和包括由该防火墙直接流出至该交换机1和交换机2的数据流信息的第二流表信息。具体的,指令发送单元111可向防火墙直连的交换机1和交换机2分别发送流表信息查询指令如Multipart Message查询指令,利用Individual Flow Statistics信息,并将out_port字段分别设置为端口A和端口B,其余字段可任意匹配,则可通过信息接收单元112接收交换机1和交换机2返回的流表信息,即包括由该交换机1和交换机2直接流入该防火墙的数据流信息的第一流表信息。进一步的,指令发送单元111还可向防火墙直连的交换机1和交换机2分别发送Multipart Message查询指令,利用Individual Flow Statistics信息,并将ofp_match字段分别设置为源端口A和源端口B,其余字段可任意匹配,则可通过信息接收单元112接收交换机1和交换机2返回的流表信息,即包括由该防火墙直接流出至该交换机1和交换机2的数据流信息的第二流表信息。
进一步的,在本发明实施例中,所述生成模块12可具体包括:
解析单元121,用于对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
标记单元122,用于将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
所述标记单元122,还用于将所述第四数据流标记为丢弃;
规则生成单元123,用于生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
进一步的,所述标记单元122,还用于将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;将所述第五数据流标记为封装或绕行;将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
具体的,结合图4,获取模块11在查询得到该第一流表信息和第二流表信息之后,解析单元121即可利用查询得到的流表信息中的匹配域字段,将直接流入防火墙(第一安全设备)的数据流即第一流表信息指示的数据流划分为具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流,并可通过标记单元122将该不具有对应流出数据的第四数据流标记为可丢弃,将该具有对应流出数据的第三数据流标记为预设处理方式,如封装或绕行或流表匹配域细化处理。其中,该不具有对应流出数据的第四数据流可以理解为该第一流表信息对应的流入数据流中包括、但第二流表信息对应的流出数据流中不包括的数据流,该具有对应流出数据的第三数据流可以理解为该第一流表信息对应的流入数据流包括、第二流表信息对应的流出数据流也包括(全部匹配或部分匹配)的数据流。进一步的,该查询得到的流表信息中还包括packet_count字段,若该第三数据流为第一流表信息对应的流入数据流中包括、第二流表信息对应的流出数据流中也包括的数据流,则标记单元122还可通过解析该查询得到的第一流表信息和第二流表信息中的计数器中packet_count字段,将该第三数据流进一步划分为流入数据与流出数据完全匹配的第五数据流(即第一流表 信息对应的流入数据流中包括、第二流表信息对应的流出数据流中也包括且全部匹配)及流入数据和流出数据部分匹配的第六数据流(即第一流表信息对应的流入数据流中包括、第二流表信息对应的流出数据流中包括但仅部分匹配),其中,该第五数据流对应的流入数据和流出数据的packet_count字段指示的数据包数目相同,该第六数据流对应的流入数据的packet_count字段指示的数据包数目大于其对应的流出数据的packet_count字段指示的数据包数目。则可将该第五数据流标记为封装或绕行,将该第六数据流标记为流表匹配域细化。从而规则生成单元123可生成包括对各类数据流的标记结果的数据处理规则即第一数据处理规则。
具体实施例中,在生成模块12生成得到该第一数据处理规则之后,即可通过发送模块13将该第一数据处理规则下发至与该第一安全设备连接的目标交换机中,使得目标交换机在接收到数据流时能够按照该第一数据处理规则对该接收的数据流进行处理。其中,该第一数据处理规则可以是通过下发流表的方式通知给该目标交换机的。例如,结合图4,发送模块13可采用下发流表的方式通知防火墙即第一安全设备的直连交换机1和交换机2对该标记为丢弃的第四数据流进行直接丢弃;采用下发流表的方式通知与防火墙直连的交换机1和交换机2对标记为封装或绕行的第五数据流进行数据流封装、解封装处理和数据流路由绕行通过处理;以及采用下发流表的方式通知与防火墙直连的交换机1和交换机2对标记为流表匹配域细化的第六数据流增加相关数据流的匹配域内容,等等。从而能够通过交换机对接收的数据流进行预处理来有效减轻防火墙等安全设备的数据过滤压力。
进一步的可选的,在本发明实施例中,所述软件定义网络中还可包括第二安全设备和与所述第二安全设备相连接的第三交换机;
所述获取模块11,还用于获取所述第三交换机对应的数据流流表信息;
所述生成模块12,还用于解析所述获取模块11获取的所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
所述发送模块13,还用于向所述目标交换机下发所述生成模块12生成的 所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
具体的,该SDN中还可设置存在该第一安全设备的后续安全设备,即第二安全设备。则控制器还可根据该SDN的拓扑结构信息确定出与该第二安全设备连接的交换机即第三交换机(即与该第二安全设备直连的所有交换机)的地址信息,以及确定出该第三交换机与该第二安全设备连接的端口。如图4所示,该SDN中还包括第二安全设备如数据过滤设备,以及与该数据过滤设备直接连接的交换机3和交换机4(该交换机3和交换机4即为该第三交换机)。其中,交换机3通过端口C与数据过滤设备直连,交换机4通过端口D与数据过滤设备直连。则控制器能够通过获取模块11获取该交换机3和交换机4对应的数据流流表信息(包括记录了由该交换机3和交换机4直接流入该数据过滤设备的数据流信息的流表信息和记录了由该数据过滤设备直接流出至该交换机1和交换机2的数据流信息的流表信息),解析该交换机3和交换机4对应的数据流流表信息,从而通过生成模块12生成包括所述解析的解析结果的第二数据处理规则。具体的,该第二安全设备对应的第二数据处理规则的生成方式可具体参照上述的第一数据处理规则的生成方式,此处不再赘述。
可选的,在本发明实施例中,
所述压力检测模块14,还用于按照预设时间间隔重新检测所述第一安全设备的当前业务压力值;
所述判断模块15,还用于判断所述压力检测模块14重新检测到的所述第一安全设备的当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值,并在判断结果为高于所述第一安全设备对应的压力阈值时,通知所述获取模块11获取当前软件定义网络中与第二安全设备连接的第三交换机的数据流流表信息。
进一步的,生成模块12在生成得到该第二数据处理规则之后,仍可通过发送模块13将该第二数据处理规则下发至与该第一安全设备连接的目标交换机(如图4中的交换机1和交换机2)中,使得目标交换机在接收到数据流时 能够按照该第二数据处理规则对该接收的数据流进行处理。具体的,该第二数据处理规则可以是通过下发流表的方式通知给该目标交换机的。该第二数据处理规则包括对数据流进行丢弃、对数据流进行封装或绕行、对数据流进行进一步的流表匹配域细化等等,具体可参照上述第一数据处理规则的相关描述,此处不再赘述。从而能够使得与安全设备连接的交换机进一步通过该第二数据处理规则对接收的数据流进行预处理,以效减轻防火墙等安全设备的数据过滤压力。
在本发明实施例中,可通过获取安全设备的当前业务压力值来判断该安全设备是否处于业务压力过载状态,并在确定处于该业务压力过载状态时获取当前SDN中与安全设备连接的交换机对应的数据流流表信息,以及对该数据流流表信息进行解析,生成与该解析结果对应的数据处理规则,并通过向与该安全设备连接的交换机下发该数据处理规则,以使交换机在接收到数据流时能够按照该数据处理规则对接收的数据流进行处理,从而避免了目前面临大业务量或网络攻击时由于过滤规则繁多而查表时间过长所导致的数据拥塞问题,并降低了系统成本,可扩展性强。同时,通过新增业务压力检测机制,使得在数据流量较低,业务压力处于安全设备处理能力范围内时,能够按照原有的顺序查表的精确数据过滤方式来进行数据处理,则提升了系统安全性。而且,该数据处理规则可根据数据流流表信息动态改变,使得便于了对安全设备的管理,且在提升安全性能时不会导致增加安全设备的业务压力。
进一步的,请参见图7,是本发明实施例提供的一种网络设备的结构示意图,该网络设备可应用于软件定义网络SDN,并可具体为该SDN中的控制器。具体的,本发明实施例的所述网络设备包括:通信接口300、存储器200和处理器100,所述处理器100分别与所述通信接口300及所述存储器200连接。所述存储器200可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。所述通信接口300、存储器200以及处理器100之间可以通过总线进行数据连接,也可以通过其他方式数据连接。本实施例中以总线连接进行说明。其中,
所述存储器200用于存储驱动软件;
所述处理器100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下执行:
获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;
解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则;
通过所述通信接口向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
可选的,所述处理器100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息之前,还用于执行以下步骤:
检测所述第一安全设备的当前业务压力值;
判断所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值;
若高于所述压力阈值,则执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息的步骤。
可选的,所述处理器100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下执行所述检测所述第一安全设备的当前业务压力值,具体执行以下步骤:
获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
根据所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
可选的,所述目标交换机包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述处理器 100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下执行所述获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量,具体执行以下步骤:
分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
可选的,所述处理器100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,具体执行以下步骤:
通过所述通信接口向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
通过所述通信接口接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
可选的,所述处理器100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下执行所述解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则,具体执行以下步骤:
对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
将所述第四数据流标记为丢弃;
生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一 数据处理规则作为所述第一安全设备对应的第一数据处理规则。
可选的,所述处理器100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下执行所述将所述第三数据流标记为预设处理方式,具体执行以下步骤:
将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;
将所述第五数据流标记为封装或绕行;
将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
可选的,所述软件定义网络中还包括第二安全设备和与所述第二安全设备相连接的第三交换机;所述处理器100从所述存储器200读取所述驱动软件并在所述驱动软件的作用下,还用于执行以下步骤:
获取所述第三交换机对应的数据流流表信息;
解析所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
通过所述通信接口300向所述目标交换机下发所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
在本发明实施例中,可通过获取当前SDN中与安全设备连接的交换机对应的数据流流表信息,以及对该数据流流表信息进行解析,生成得到与该解析结果对应的数据处理规则,从而能够通过向与该安全设备连接的交换机下发该数据处理规则以使交换机按照该数据处理规则对接收的数据流进行处理,从而避免了目前面临大业务量或网络攻击时由于过滤规则繁多而查表时间过长所导致的数据拥塞问题,并降低了系统成本,可扩展性强,使得能够基于软件定义网络提升网络安全设备性能。而且,该数据处理规则可根据数据流流表信息的改变而动态改变,这就便于了安全设备的管理。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本发明所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述该作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以 上描述的全部或者部分功能。上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (24)

  1. 一种基于软件定义网络的数据处理方法,其特征在于,包括:
    获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;
    解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则;
    向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
  2. 根据权利要求1所述的方法,其特征在于,在所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息之前,所述方法还包括:
    检测所述第一安全设备的当前业务压力值;
    判断所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值;
    若高于所述压力阈值,则执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息的步骤。
  3. 根据权利要求2所述的方法,其特征在于,所述检测所述第一安全设备的当前业务压力值,包括:
    获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
    根据所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
  4. 根据权利要求3所述的方法,其特征在于,所述目标交换机包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量,包括:
    分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
    将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,包括:
    向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
    接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
  6. 根据权利要求5所述的方法,其特征在于,所述解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则,包括:
    对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
    将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
    将所述第四数据流标记为丢弃;
    生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
  7. 根据权利要求6所述的方法,其特征在于,所述将所述第三数据流标记为预设处理方式,包括:
    将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;
    将所述第五数据流标记为封装或绕行;
    将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述软件定义网络中还包括第二安全设备和与所述第二安全设备相连接的第三交换机;所述方法还包括:
    获取所述第三交换机对应的数据流流表信息;
    解析所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
    向所述目标交换机下发所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
  9. 一种数据处理装置,其特征在于,包括:
    获取模块,用于获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;
    生成模块,用于解析所述获取模块获取的所述目标交换机的数据流流表信 息,并生成包括所述解析的解析结果的第一数据处理规则;
    发送模块,用于向所述目标交换机下发所述生成模块生成的所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
  10. 根据权利要求9所述的装置,其特征在于,所述装置还包括:
    压力检测模块,用于检测所述第一安全设备的当前业务压力值;
    判断模块,用于判断所述压力检测模块检测到的所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值,并在判断结果为高于所述压力阈值时,通知所述获取模块获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息。
  11. 根据权利要求10所述的装置,其特征在于,所述压力检测模块包括:
    信息获取单元,用于获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
    计算单元,用于根据所述信息获取单元获取的所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
  12. 根据权利要求11所述的装置,其特征在于,所述目标交换机包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述信息获取单元具体用于:
    分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
    将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
  13. 根据权利要求9-12任一项所述的装置,其特征在于,所述获取模块包括:
    指令发送单元,用于向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
    信息接收单元,用于接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
  14. 根据权利要求13所述的装置,其特征在于,所述生成模块包括:
    解析单元,用于对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
    标记单元,用于将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
    所述标记单元,还用于将所述第四数据流标记为丢弃;
    规则生成单元,用于生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
  15. 根据权利要求14所述的装置,其特征在于,
    所述标记单元,还用于将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;将所述第五数据流标记为封装或绕行;将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求 时,增加对该数据流的流表匹配域项目。
  16. 根据权利要求9-15任一项所述的装置,其特征在于,所述软件定义网络中还包括第二安全设备和与所述第二安全设备相连接的第三交换机;
    所述获取模块,还用于获取所述第三交换机对应的数据流流表信息;
    所述生成模块,还用于解析所述获取模块获取的所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
    所述发送模块,还用于向所述目标交换机下发所述生成模块生成的所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
  17. 一种网络设备,其特征在于,包括:通信接口、存储器和处理器,所述处理器分别与所述通信接口及所述存储器连接;其中,
    所述存储器用于存储驱动软件;
    所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行:
    获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,所述数据流流表信息包括所述第一安全设备和所述目标交换机之间传输的数据流的信息;
    解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则;
    通过所述通信接口向所述目标交换机下发所述第一数据处理规则,以使所述目标交换机按照所述第一数据处理规则对接收的数据流进行处理。
  18. 根据权利要求17所述的网络设备,其特征在于,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息之前,还用于 执行以下步骤:
    检测所述第一安全设备的当前业务压力值;
    判断所述当前业务压力值是否高于预置的与所述第一安全设备对应的压力阈值;
    若高于所述压力阈值,则执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息的步骤。
  19. 根据权利要求18所述的网络设备,其特征在于,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述检测所述第一安全设备的当前业务压力值,具体执行以下步骤:
    获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量;
    根据所述预设时间窗内流入所述第一安全设备的数据量计算单位时间内流入所述第一安全设备的平均数据量,并将计算出的所述平均数据量作为所述第一安全设备的当前业务压力值。
  20. 根据权利要求19所述的网络设备,其特征在于,所述目标交换机包括通过第一端口与所述第一安全设备连接的第一交换机和通过第二端口与所述第一安全设备连接的第二交换机;所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述获取预设时间窗内从所述目标交换机流入所述第一安全设备的数据量,具体执行以下步骤:
    分别统计预设时间窗内通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量;
    将通过所述第一端口流入所述第一安全设备的数据量及通过所述第二端口流入所述第一安全设备的数据量之和作为所述预设时间窗内从所述目标交换机流入所述第一安全设备的数据量。
  21. 根据权利要求17-20任一项所述的网络设备,其特征在于,所述处理 器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述获取当前软件定义网络中与第一安全设备连接的目标交换机的数据流流表信息,具体执行以下步骤:
    通过所述通信接口向当前软件定义网络中与第一安全设备连接的目标交换机发送流表信息查询指令;
    通过所述通信接口接收所述目标交换机响应所述流表信息查询指令返回的第一流表信息和第二流表信息,其中,所述第一流表信息中指示了流入所述第一安全设备的数据流,所述第二流表信息中指示了流出所述第一安全设备的数据流。
  22. 根据权利要求21所述的网络设备,其特征在于,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述解析所述目标交换机的数据流流表信息,并生成包括所述解析的解析结果的第一数据处理规则,具体执行以下步骤:
    对所述第一流表信息和所述第二流表信息进行解析,解析得到所述第一流表信息指示的数据流在所述第二流表信息指示的数据流中具有对应流出数据的第三数据流和不具有对应流出数据的第四数据流;
    将所述第三数据流标记为预设处理方式,所述预设处理方式包括封装或绕行或流表匹配域细化处理;
    将所述第四数据流标记为丢弃;
    生成包括所述标记的标记结果的第一数据处理规则,并将生成的所述第一数据处理规则作为所述第一安全设备对应的第一数据处理规则。
  23. 根据权利要求22所述的网络设备,其特征在于,所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下执行所述将所述第三数据流标记为预设处理方式,具体执行以下步骤:
    将所述第三数据流和所述第二流表信息指示的数据流进行对比,确定出所 述第三数据流对应的流入数据与流出数据完全匹配的第五数据流以及流入数据和流出数据部分匹配的第六数据流;
    将所述第五数据流标记为封装或绕行;
    将所述第六数据流标记为流表匹配域细化,以提醒所述软件定义网络中的控制器在接收到与所述第六数据流类型相同的数据流的请求时,增加对该数据流的流表匹配域项目。
  24. 根据权利要求17-23任一项所述的网络设备,其特征在于,所述软件定义网络中还包括第二安全设备和与所述第二安全设备相连接的第三交换机;所述处理器从所述存储器读取所述驱动软件并在所述驱动软件的作用下还用于执行以下步骤:
    获取所述第三交换机对应的数据流流表信息;
    解析所述第三交换机对应的数据流流表信息,并生成包括所述解析的解析结果的第二数据处理规则;
    通过所述通信接口向所述目标交换机下发所述第二数据处理规则,以使所述目标交换机按照所述第二数据处理规则对接收的数据流进行处理。
PCT/CN2015/093497 2015-10-31 2015-10-31 一种基于软件定义网络的数据处理方法及相关设备 WO2017070965A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/093497 WO2017070965A1 (zh) 2015-10-31 2015-10-31 一种基于软件定义网络的数据处理方法及相关设备
CN201580031739.1A CN107210969B (zh) 2015-10-31 2015-10-31 一种基于软件定义网络的数据处理方法及相关设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/093497 WO2017070965A1 (zh) 2015-10-31 2015-10-31 一种基于软件定义网络的数据处理方法及相关设备

Publications (1)

Publication Number Publication Date
WO2017070965A1 true WO2017070965A1 (zh) 2017-05-04

Family

ID=58629701

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/093497 WO2017070965A1 (zh) 2015-10-31 2015-10-31 一种基于软件定义网络的数据处理方法及相关设备

Country Status (2)

Country Link
CN (1) CN107210969B (zh)
WO (1) WO2017070965A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988804A (zh) * 2019-12-12 2021-06-18 陕西西部资信股份有限公司 数据传输方法及系统
CN116962321A (zh) * 2023-09-18 2023-10-27 鹏城实验室 数据包传输方法、传输配置方法、装置、设备及介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113592059A (zh) * 2020-04-30 2021-11-02 伊姆西Ip控股有限责任公司 用于处理数据的方法、设备和计算机程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051557A (zh) * 2012-12-27 2013-04-17 华为技术有限公司 数据流处理方法及系统、控制器、交换设备
CN104639362A (zh) * 2013-11-15 2015-05-20 中兴通讯股份有限公司 Oam性能监控方法及装置
CN104702638A (zh) * 2013-12-06 2015-06-10 华为技术有限公司 事件的订阅分发方法和装置
US20150200813A1 (en) * 2014-01-15 2015-07-16 Electronics And Telecommunications Research Institute Server connection apparatus and server connection method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051557A (zh) * 2012-12-27 2013-04-17 华为技术有限公司 数据流处理方法及系统、控制器、交换设备
CN104639362A (zh) * 2013-11-15 2015-05-20 中兴通讯股份有限公司 Oam性能监控方法及装置
CN104702638A (zh) * 2013-12-06 2015-06-10 华为技术有限公司 事件的订阅分发方法和装置
US20150200813A1 (en) * 2014-01-15 2015-07-16 Electronics And Telecommunications Research Institute Server connection apparatus and server connection method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988804A (zh) * 2019-12-12 2021-06-18 陕西西部资信股份有限公司 数据传输方法及系统
CN116962321A (zh) * 2023-09-18 2023-10-27 鹏城实验室 数据包传输方法、传输配置方法、装置、设备及介质
CN116962321B (zh) * 2023-09-18 2024-01-09 鹏城实验室 数据包传输方法、传输配置方法、装置、设备及介质

Also Published As

Publication number Publication date
CN107210969A (zh) 2017-09-26
CN107210969B (zh) 2020-05-26

Similar Documents

Publication Publication Date Title
CN108040057B (zh) 适于保障网络安全、网络通信质量的sdn系统的工作方法
US10742682B2 (en) Attack data packet processing method, apparatus, and system
US9860154B2 (en) Streaming method and system for processing network metadata
US9819590B2 (en) Method and apparatus for notifying network abnormality
US10382457B2 (en) Attack stream identification method, apparatus, and device on software defined network
WO2021207922A1 (zh) 报文传输方法、装置及系统
EP3817298A1 (en) Data message detection method, device and system
WO2018108052A1 (zh) 一种DDoS攻击的防御方法、系统及相关设备
CN108737447B (zh) 用户数据报协议流量过滤方法、装置、服务器及存储介质
CN111385121B (zh) 一种操作管理维护iOAM报文的传输方法及相应装置
US20180176139A1 (en) Correlating discarded network traffic with network policy events through augmented flow
CN104115463A (zh) 用于处理网络元数据的流式传输方法和系统
CN110933111B (zh) 一种基于DPI的DDoS攻击识别方法及装置
CN109787823B (zh) 服务质量QoS标记方法、装置及存储介质
US20180287932A1 (en) Identification of an sdn action path based on a measured flow rate
CN101626323A (zh) 一种网络数据流量监测方法和装置
CN111953553B (zh) 一种报文的检测方法、设备及系统
WO2012147909A1 (ja) ネットワーク装置、通信システム、異常トラヒックの検出方法およびプログラム
WO2014110293A1 (en) An improved streaming method and system for processing network metadata
WO2017035717A1 (zh) 一种分布式拒绝服务DDoS攻击检测方法及相关设备
WO2017070965A1 (zh) 一种基于软件定义网络的数据处理方法及相关设备
CN115484047A (zh) 云平台中的泛洪攻击的识别方法、装置、设备及存储介质
US20160248652A1 (en) System and method for classifying and managing applications over compressed or encrypted traffic
WO2021098425A1 (zh) 配置业务的服务质量策略方法、装置和计算设备
US20230283624A1 (en) Method, apparatus, and system for determining data flow information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15907026

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15907026

Country of ref document: EP

Kind code of ref document: A1