A method for constructing an endogenous security switch defense executive based on load balancing

By adopting load balancing endogenous security switch defense execution body in the network, using game model and Sflow protocol, load balancing of switches and controllers is achieved, which solves the impact of DDoS attacks on network links and improves the network's defense capabilities and performance.

CN115208654BActive Publication Date: 2024-08-27SOUTHEAST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210809849.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-11
Publication Date
2024-08-27
Estimated Expiration
2042-07-11

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively defend against distributed service failure attacks (DDoS attacks), especially at the core switch level, leading to problems such as network link congestion, flow table overload, cache saturation, and controller resource saturation, affecting the normal operation of network transmission services. .

Method used

An endogenous secure switch defense execution method based on load balancing is adopted. Through the monitoring mechanism, flow scheduling strategy and switch migration strategy of switches and controllers, the game model and Sflow protocol are used to achieve load balancing and defense between switches and controllers. DDoS attack.

Benefits of technology

Through dynamic scheduling and migration strategies, switch maintenance resource overhead is minimized, the network is kept in an optimal load state, effectively defends against various network attacks, and improves network performance and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208654B
    Figure CN115208654B
Patent Text Reader

Abstract

The present invention discloses a method for constructing an endogenous security switch defense executor based on load balancing. The method monitors switches and controller nodes in network service interaction scenarios, combines the load balancing concept with the characteristics of software-defined networks, constructs two game models, and forms an endogenous security switch defense method. The present invention intends to defend against four types of DDOS attacks: flow table overload attack, buffer saturation attack, controller resource saturation attack, and data-control plane channel bandwidth exhaustion attack.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of network attack and defense, and in particular relates to a method for constructing an endogenous security switch defense execution body based on load balancing. Background Art

[0002] The core switch is in a critical position in the entire network. If a fatal failure occurs in the core switch, the local network will be paralyzed, and the loss caused is difficult to estimate. In actual application scenarios, attackers carry out complex and high-frequency attacks on switches in order to break through various defense mechanisms. Due to the popularity of methods and tools, service failure attacks (DoS attacks) have become one of the common attack methods in the current Internet. Attackers use some means to intentionally cause computers or networks to fail to provide services normally or reduce the quality of services. Although they cannot steal information or run malicious code, the damage to enterprises that rely on providing services to users is huge. In recent years, with the application of cloud computing and high-performance network equipment, ordinary DoS attacks require a large cost to affect networks with high-performance equipment. Therefore, distributed service failure attacks (DDoS attacks) that combine multiple computers as attack platforms, use remote connections, and use malicious programs to attack the same target have gradually replaced traditional DoS attacks and become the mainstream attack method threatening the security of cyberspace.

[0003] The targets of DDoS attacks generally include application service programs, operating systems, network protocols and network links. For network links, they often use congestion attacks, the basic form of which is message flooding, such as MAC table flooding attacks, UDP flooding attacks, etc. That is, the attacker sends a large number of messages to make the attacked link and important network devices on the link unable to communicate normally, resulting in a large number of packet losses, or even routing changes and losses, making it impossible for normal communication messages to pass, resulting in the failure of network transmission services.

[0004] Load balancing is mainly used to solve the problems of task scheduling and resource allocation. It is built on the existing network structure and provides a cheap, effective and transparent method to expand the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and improve network flexibility and availability. Summary of the invention

[0005] Purpose of the invention: In view of the above problems, the present invention proposes a method for constructing an endogenous security switch defense execution body based on load balancing. Figure 1 The switches and controller nodes in the network service interaction scenario shown in the figure are monitored, and load balancing technology and software-defined network characteristics are combined to achieve effective defense against DDoS attacks by using a game model in the load balancing strategy.

[0006] To achieve the purpose of the present invention, the technical solution adopted by the present invention is a method for constructing an endogenous security switch defense executive body based on load balancing.

[0007] System structure diagram of the load-balancing-based intrinsic security switch defense executive. The overall structure is divided into three parts: the monitoring mechanism of the switch and controller, the flow scheduling strategy and switch migration strategy, and the network device node.

[0008] The monitoring mechanism of switches and controllers uses the Sflow protocol to send Query requests through a polling algorithm, monitors switches and controllers based on the received Reply messages, and provides data support for flow scheduling strategies and switch migration strategies.

[0009] The flow scheduling strategy and switch migration strategy are two defense strategies of this method. The flow scheduling strategy is a cooperative game strategy between switches, and its purpose is to make the switch group in a load-balanced state by allocating flows. The switch migration strategy is a non-cooperative game strategy between controllers. The target switch conducts a pure strategy game, and makes the controller in a load-balanced state by migrating the switches in the overloaded controller subdomain.

[0010] The flow scheduling strategy first collects the load and resource information of the switch. When the controller receives the PacketIn message sent by the switch, it analyzes the load demand of the traffic, establishes a cooperative game domain between the next-hop switches, calculates the load balance of each switch node, and obtains the forwarding path that maximizes the overall load balance of the switch group through iteration. The controller sends the flow table and performs flow forwarding operations.

[0011] The switch migration strategy first traverses the controller load situation, extracts the controller whose load exceeds the threshold from the cluster as the overloaded controller, classifies the migration priority of the switches in the overloaded controller subdomain, establishes a non-cooperative game domain between the slave controllers of the migrated switches, completes the controller role conversion by obtaining the optimal migrated controller in a finite number of iterations, and judges the load situation of the overloaded controller again.

[0012] Network device nodes mainly refer to the underlying Openflow switches and SDN controllers under the software-defined network. This module needs to respond to various Openflow protocol messages and Sflow monitoring requests in a timely manner.

[0013] The present invention intends to defend against the following four types of network attacks:

[0014] (1) Flow table overload attack: The switch under the SDN architecture is called an OpenFlow switch, which stores and maintains the flow table for traffic forwarding. The switch forwards or discards the matching traffic according to the matching domain and action set in the flow table. Similar to the routing table, the number of flow table entries that can be stored by each switch is limited. The malicious host will send a large number of data packets to the switch and forge the header field of the data packet so that the switch cannot find a matching flow table entry, thereby sending a message to the controller to add a new flow table entry as the basis for forwarding. Therefore, the limited flow table capacity is filled with a large number of malicious traffic flow entries, and the flow table entries of normal business traffic cannot be added in time, which will cause damage to normal business.

[0015] (2) Cache saturation attack: Each OpenFlow switch has an OpenFlow agent that communicates with the controller through the southbound interface. On the Miss table, it sends the packet header to the controller by encapsulating it in a PacketIn message and stores the packet payload in the buffer. The OpenFlow agent runs on the bottom switch and has limited capabilities such as CPU, memory, and buffer size, so it has limited ability to process mismatched packets within a specified time interval. Therefore, when it receives a large number of packets, its buffer will be overloaded, resulting in the inability to store legitimate packets.

[0016] (3) Controller resource saturation attack: When the controller receives packets that the switch cannot match, it processes these packets and installs flow rules into the SDN switch. This series of operations consumes controller resources such as memory, CPU, and buffer capacity. As a result, flooding requests exhaust all the controller's resources and degrade the performance of the entire network. The controller needs more time to process legitimate requests.

[0017] (4) Data-control plane channel bandwidth exhaustion attack: After receiving a new data packet, the switch sends the packet header to the controller and stores the packet payload in the buffer. When the switch receives a flooding request, its buffer will be filled. Then, the switch no longer sends only the header to the controller, but the entire complete data packet, which will cause congestion in the communication channel, causing legitimate users to experience noticeable delays.

[0018] For the above four different types of network attacks, the intrinsically secure switches can basically adopt flow scheduling strategies and switch migration strategies for defense. The present invention will minimize the resource overhead of maintaining normal operation of the switch through the construction of the game domain, so that the network is in the optimal load state at the macro level.

[0019] The method mainly includes the following steps:

[0020] (1) Within a time step, the controller sends Query requests to the basic switch device at irregular intervals through an adaptive polling algorithm, and monitors the data flow based on the received Reply messages;

[0021] (2) At the beginning of the hth polling step of a time step, the status of the underlying basic switches and controllers is monitored, and the monitoring data is used as the basic data for strategy selection;

[0022] (3) When the controller receives the PacketIn message, it obtains the protocol information and header information of the traffic, such as the packet length, and queries the next-hop flow table based on the header information. If there is a relevant flow table entry, it forwards the packet directly; otherwise, it immediately invites all next-hop switches located in the flow forwarding switch to establish a cooperative game domain;

[0023] (4) Through cooperative game, the path with the highest overall load balancing degree is obtained, the controller sends the flow table, and the switch forwards the flow;

[0024] (5) After executing the flow scheduling strategy, all controllers are traversed and the dynamic load threshold is used to determine whether there are controller nodes that are overloaded. The set of controllers that need switch migration is determined and the non-overloaded switch is selected as the target controller to construct a non-cooperative game domain.

[0025] (6) Prioritize the migration of switches within the overloaded controller domain;

[0026] (7) Reselect the master controller of the switch to be migrated from the target controller and seek the pure strategy Nash equilibrium state of the target controller;

[0027] (8) The overload controller selects the switch with the highest priority for migration and sends a migration request to the selected target controller. The target controller responds to the request and changes its role to the primary controller. The original controller is converted to the backup controller. The switches synchronize their status and exchange subdomain information.

[0028] (9) Repeat steps (1) to (8) until a time step ends. According to the network status within this time step, revise the next time step and clear the associated flow table of the switch.

[0029] In step (1), the specific method of the adaptive polling request algorithm is as follows:

[0030] The polling algorithm uses a dynamic time interval, and its initial value is set to base_time. In the subsequent time interval update strategy, the time interval interval_time is not only related to the flow rate change Δr, but also to the previous time interval, but the maximum time interval does not exceed max_interval_time. According to the change of flow rate, the interval time update strategy is divided into three cases. When 0≤Δr≤a1, the time interval is interval_time+1; when a1<Δr≤a2, the time interval remains unchanged; when a2<Δr, the time interval is max{[interval_time / Δr], base_time}, where [interval_time / Δr] is the result of rounding down the quotient.

[0031] In step (2), the specific monitoring situation of the switch load is as follows:

[0032] The switch nodes in the network form a set N = {S, C}, where s i represents the i-th switch node in the network, c i represents the i-th controller node in the network. The links are grouped into a set E, where e ik Represents node n i With node n k The resource configuration information set of each switch node in the network is R, where r i Indicates the s i Resource configuration information, in Respectively represent s i The CPU, memory, buffer and flow table capabilities configured on the switch. Let set M be the state set of each switch, where Respectively represent s i The actual resource utilization of CPU, memory, buffers, and flow tables used.

[0033] In step (3), the specific analysis of the flow load demand is as follows:

[0034] Flows with different characteristics such as protocol type and packet length have different consumption preferences for switch resources. Therefore, for flows entering the switch group within the time interval interval_time, we consider them to be independent flows F = {f1,f2,…f j …,f m}, for each segment of traffic we use a four-tuple to represent it in They represent the CPU, memory and buffer requirements for processing the jth segment of traffic, respectively, and It is a binary variable determined by searching the flow table. A value of 1 indicates that a new rule needs to be added to forward the traffic. A value of 0 indicates that the relevant flow table entry for the flow already exists in the flow table.

[0035] In step (4), the specific method for obtaining the next hop flow table entry is as follows:

[0036] Resource utilization is expressed by normalizing the usage of the CPU, memory, buffer, and flow table of each switch node. The larger the value, the higher the resource utilization of the node; the smaller the value, the lower the resource utilization of the node. Its expression is:

[0037]

[0038] Among them, K1, K2, K3, K4 are resource utilization factors, and K1+K2+K3+K4=1.

[0039] The given load balancing degree indicates the difference in the utilization of the CPU, memory, and buffer of the switch node. The larger the value, the worse the load balancing degree of the node; the smaller the value, the stronger the load balancing degree of the node. Its expression is:

[0040]

[0041] where μ ij is the flow rate f j Enter the switch node i When the switch node resources are:

[0042]

[0043] In the above formula, Respectively represent the flow rate f j Enter the switch node i In the example, the resource utilization of the CPU, memory, and buffer of the switch node is

[0044]

[0045]

[0046]

[0047] Among them, τ ij is a binary decision variable. If the flow rate f j Enter node s i On, then τ ij =1; otherwise τ ij =0.

[0048] According to the above load balancing, we introduce a cooperative game model. The entire switch group network can be represented by a directed graph G switch_balance ={S,E} means that the switch node s in the switch cluster i All next-hop nodes are used as players in the cooperative game, and it is expected that the optimal load balancing of the entire switch cluster can be achieved through several rounds of games.

[0049] In the game, the utility value of choosing the switch is evaluated in the following scoring method:

[0050]

[0051] Among them, α represents the importance of switch resource utilization, and β represents the importance of switch load balancing.

[0052] By selecting different switches in the directed graph, the traffic forwarding path Path can be obtained i Therefore, the objective function in the process of flow scheduling load balancing is defined as

[0053]

[0054] Among them, k is the forwarding path Path i The total number of switches passed through. The significance of this objective function is to find the method that minimizes the product of the utility values ​​of the flow scheduling paths, that is, the path load is most balanced and the resource utilization is minimized.

[0055] In step (5), the specific method for determining the controller load level is as follows:

[0056] The controller's load overhead mainly comes from the message communication between the controller and the switch, among which the most important is the PacketIn message. Therefore, we use the request rate F of the PacketIn message ij To define the controller load level, request rate F ij It is expressed as:

[0057]

[0058] Among them, θ ij is a binary decision variable representing switch s i Is the controller connected? j , if yes, then it is 1, otherwise it is 0. Indicates switches i To controller c j The request speed for sending PacketIn messages. Let the threshold be δ. When F ij When ≥δ, the controller is an overload controller.

[0059] In step (6), the specific method for grading the overloaded controller subdomain switch is as follows:

[0060] We propose to use the request rate F ij Indicates the load level of the controller, so in order to reduce the number of migrations and complete the migration with at least one migration, we give priority to switches with a high request rate ratio. In addition, in order to reduce the communication cost between the switch to be migrated and the target controller, we give priority to switches closer to the target controller.

[0061] Define node n i With node n j The number of jumps between is defined as d ij , the switch migration priority P_move i It is expressed as:

[0062]

[0063] Therefore, select switch s i =max{P_move i}.

[0064] In step (7), the specific method of selecting the target controller is as follows:

[0065] (7.1) The game model θ can be constructed LB ={J, L, W}, where J is the set of game participants, L is the set of target controllers; L is the set of strategies that each participant can choose, and each participant has two strategies, that is, L = {c j Receive i , c j Rejections i}; W is the utility that participants can obtain by adopting a certain strategy, which is specifically expressed as the migration cost and the load level after migration.

[0066] Migration costs include communication costs P c , Migration request cost P re and state synchronization cost P syn The communication cost mainly comes from the difference between the cost of deploying the flow strategy of the original controller and the cost of deploying the flow strategy of the target controller.

[0067]

[0068] where c k is the target controller, ε is the average communication speed of PacketIn requests from the switch, v ik For node n i and node n k The average bandwidth between

[0069]

[0070] Where φ is the controller c j Average packet size when installing Flow_Mod rules on the migration switch within the domain.

[0071] After receiving the migration request from the switch, the controllers will synchronize the information status and change the master-slave roles of the controllers in the subdomain to avoid controller conflicts. There are C controllers in the game domain. Assuming that the synchronization period between controllers is T, the state synchronization cost is

[0072]

[0073] Taking into account the transmission delay and migration cost, a cost function is generated.

[0074] U=α1P c +α2P re +α3P syn

[0075] Among them, α1, α2, and α3 represent the transmission delay, communication cost, migration request cost, and state synchronization cost weights, respectively. In order to find a suitable target controller, in addition to considering the migration cost U, we must also prevent the target controller from being overloaded after the migration, so we need to consider the load condition F′ of the target switch. ij , indicating that the switch s i Migrate to controller c j After the subdomain is below, the load of the controller. In summary, our utility function is:

[0076] W=min(U,F′ ij )

[0077]

[0078] F′ ij ≤δ

[0079] The constraints are that each switch has only one master controller, and after the switch migration, the load of the target controller cannot exceed the overload threshold.

[0080] (7.2) Randomly select a player from the set of players J as the target controller and calculate U and F′ ij ;

[0081] (7.3) With U and F′ obtained by the target controller ij Traverse for the initial value. If the U and F′ obtained by the currently traversed controller ijThe value is smaller than U and F′ generated by the target controller ij value, store this controller as the new target controller; otherwise, remove the controller from the game domain. After the loop ends, satisfy min(U,F′ ij ) is selected as the destination controller. If there is no controller that meets min(U,F′ ij ) controller, the controller with the smallest U is selected as the destination controller.

[0082] In step (9), the specific method for selecting the time step is as follows:

[0083] Define frequency as the number of times that can be polled within the current unit step, and the base polling number is base_frequency. Given a network with two states, normal and overload, when an overload controller appears in the business network, the network changes from normal to overload; when there is no overload controller in the business network, the network remains in normal or changes from overload back to normal. This step is determined by the previous step, and the number of times the overload state appears in the previous step is overload_frequency, then the new step is

[0084]

[0085] If overload_frequency is 0 in the previous step, the new step is frequency+1, and the maximum value does not exceed max_frequency.

[0086] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial technical effects:

[0087] (1) The present invention proposes a method for constructing an intrinsic security switch defense executor based on load balancing. The present invention is proposed based on the load balancing method and has the advantages of method transparency, high scalability and low deployment cost. Its underlying intrinsic security switch and load balancing defense strategy are heterogeneous. Through real-time node monitoring, load balancing is made dynamic. The load balancing method makes network resources redundant, which is of great significance to the performance of the intrinsic security switch in the face of network attacks.

[0088] (2) The present invention adopts a cooperative game strategy in load balancing. Through cooperative game between switches, traffic forwarding is made more energy-efficient and efficient, ensuring the overall load balancing of the switch group and making full use of the resource characteristics of each switch.

[0089] (3) The present invention adopts a non-cooperative game strategy method in load balancing. Through non-cooperative games between control machines, it reasonably balances the load balancing degree of the controller cluster, improves the global network performance, dynamically changes the logical network configuration, and improves the initiative of the defender in the attack and defense process. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] Figure 1 It is a schematic diagram of the business network under the load balancing-based endogenous security switch defense executor;

[0091] Figure 2 The system structure of the load-balancing-based endogenous security switch defense executive;

[0092] Figure 3 Schematic diagram of flow scheduling strategy;

[0093] Figure 4 This is a schematic diagram of the switch migration strategy;

[0094] Figure 5 Schematic diagram of attacks faced by the data plane and control plane in the SDN system. DETAILED DESCRIPTION

[0095] In order to deepen the recognition and understanding of the present invention, the scheme is further introduced below in conjunction with the accompanying drawings and specific embodiments.

[0096] Embodiment 1: A system of an endogenous security switch defense executive based on load balancing, such as Figure 2 As shown, the overall structure is divided into three parts: monitoring mechanism of switches and controllers, flow scheduling strategy and switch migration strategy, and network device nodes.

[0097] The monitoring mechanism of switches and controllers uses the Sflow protocol to send Query requests through a polling algorithm, monitors switches and controllers based on the received Reply messages, and provides data support for flow scheduling strategies and switch migration strategies.

[0098] The flow scheduling strategy and switch migration strategy are two defense strategies of this method. The flow scheduling strategy is a cooperative game strategy between switches, and its purpose is to make the switch group in a load-balanced state by allocating flows. The switch migration strategy is a non-cooperative game strategy between controllers. The target switch conducts a pure strategy game, and makes the controller in a load-balanced state by migrating the switches in the overloaded controller subdomain.

[0099] like Figure 3The flow scheduling strategy is shown in Figure 1. The flow scheduling strategy first collects the load and resource information of the switch. When the controller receives the PacketIn message sent by the switch, it analyzes the load demand of the traffic, establishes a cooperative game domain between the next-hop switches, calculates the load balance of each switch node, and obtains the forwarding path that maximizes the overall load balance of the switch group through iteration. The controller sends the flow table and performs flow forwarding operations.

[0100] like Figure 4 The figure shows the switch migration strategy. First, the controller load is traversed, and the controllers with load exceeding the threshold are extracted from the cluster as overloaded controllers. The migration priority of the switches in the overloaded controller subdomain is graded, and a non-cooperative game domain is established between the slave controllers of the migrated switches. The controller role conversion is completed by obtaining the optimal migration controller in a finite number of iterations, and the load of the overloaded controller is judged again.

[0101] Network device nodes mainly refer to the underlying Openflow switches and SDN controllers under the software-defined network. This module needs to respond to various Openflow protocol messages and Sflow monitoring requests in a timely manner.

[0102] like Figure 5 As shown, the present invention intends to defend against the following four network attacks:

[0103] (1) Flow table overload attack: The switch under the SDN architecture is called an OpenFlow switch, which stores and maintains the flow table for traffic forwarding. The switch forwards or discards the matching traffic according to the matching domain and action set in the flow table. Similar to the routing table, the number of flow table entries that can be stored by each switch is limited. The malicious host will send a large number of data packets to the switch and forge the header field of the data packet so that the switch cannot find a matching flow table entry, thereby sending a message to the controller to add a new flow table entry as the basis for forwarding. Therefore, the limited flow table capacity is filled with a large number of flow table entries for malicious traffic, and the flow table entries for normal business traffic cannot be added in time, which will cause damage to normal business.

[0104] (2) Cache saturation attack: Each OpenFlow switch has an OpenFlow agent that communicates with the controller through the southbound interface. On the Miss table, it sends the packet header to the controller by encapsulating it in a PacketIn message and stores the packet payload in the buffer. The OpenFlow agent runs on the bottom switch and has limited capabilities such as CPU, memory, and buffer size, so it has limited ability to process mismatched packets within a specified time interval. Therefore, when it receives a large number of packets, its buffer will be overloaded, resulting in the inability to store legitimate packets.

[0105] (3) Controller resource saturation attack: When the controller receives packets that the switch cannot match, it processes these packets and installs flow rules into the SDN switch. This series of operations consumes controller resources such as memory, CPU, and buffer capacity. As a result, flooding requests exhaust all the controller's resources and degrade the performance of the entire network. The controller needs more time to process legitimate requests.

[0106] (4) Data-control plane channel bandwidth exhaustion attack: After receiving a new data packet, the switch sends the packet header to the controller and stores the packet payload in the buffer. When the switch receives a flooding request, its buffer will be filled. Then, the switch no longer sends only the header to the controller, but the entire complete data packet, which will cause congestion in the communication channel, causing legitimate users to experience noticeable delays.

[0107] For the above four different types of network attacks, the intrinsically secure switches can basically adopt flow scheduling strategies and switch migration strategies for defense. The present invention will minimize the resource overhead of maintaining normal operation of the switch through the construction of the game domain, so that the network is in the optimal load state at the macro level.

[0108] Embodiment 2: A method for constructing an endogenous security switch defense execution body based on load balancing, the method mainly comprises the following steps:

[0109] (1) Within this time step, the controller sends Query requests to the basic switch device at irregular intervals through an adaptive polling algorithm, and monitors the data flow based on the received Reply messages;

[0110] (2) Within this polling step, the status of the underlying basic switches and controllers is monitored, and the monitoring data is used as the basic data for policy selection;

[0111] (3) When the controller receives the PacketIn message, it obtains the protocol information and header information of the traffic, such as the packet length, and queries the next-hop flow table based on the header information. If there is a relevant flow table entry, it forwards the packet directly; otherwise, it immediately invites all next-hop switches located in the flow forwarding switch to establish a cooperative game domain;

[0112] (4) Through cooperative game, the path with the highest overall load balancing degree is obtained, the controller sends the flow table, and the switch forwards the flow;

[0113] (5) After executing the flow scheduling strategy, all controllers are traversed and the dynamic load threshold is used to determine whether there are controller nodes that are overloaded. The set of controllers that need switch migration is determined and the non-overloaded switch is selected as the target controller to construct a non-cooperative game domain.

[0114] (6) Prioritize the migration of switches within the overloaded controller domain;

[0115] (7) Reselect the master controller of the switch to be migrated from the target controller and seek the pure strategy Nash equilibrium state of the target controller;

[0116] (8) The overload controller selects the switch with the highest priority for migration and sends a migration request to the selected target controller. The target controller responds to the request and changes its role to the primary controller. The original controller is converted to the backup controller. The switches synchronize their status and exchange subdomain information.

[0117] (9) Repeat steps (1) to (8) until the end of this time step. According to the network status within this time step, revise the next time step and clear the associated flow table of the switch.

[0118] In step (1), the specific method of the adaptive polling request algorithm is as follows:

[0119] The polling algorithm uses a dynamic time interval, and its initial value is set to base_time. In the subsequent time interval update strategy, the time interval interval_time is not only related to the flow rate change Δr, but also to the previous time interval, but the maximum time interval does not exceed max_interval_time. According to the change of flow rate, the interval time update strategy is divided into three cases. When 0≤Δr≤a1, the time interval is interval_time+1; when a1<Δr≤a2, the time interval remains unchanged; when a2<Δr, the time interval is max{[interval_time / Δr], base_time}, where [interval_time / Δr] is the result of rounding down the quotient.

[0120] In step (2), the specific monitoring situation of the switch load is as follows:

[0121] The switch nodes in the network form a set N = {S, C}, where s i represents the i-th switch node in the network, c i represents the i-th controller node in the network. The links are grouped into a set E, where e ik Represents node n i With node n k The resource configuration information set of each switch node in the network is R, where r i Indicates the s i Resource configuration information, in Respectively represent s i The CPU, memory, buffer and flow table capabilities configured on the switch. Let set M be the state set of each switch, where Respectively represent s i The actual resource utilization of CPU, memory, buffers, and flow tables used.

[0122] In step (3), the specific analysis of the flow load demand is as follows:

[0123] Flows with different characteristics such as protocol type and packet length have different consumption preferences for switch resources. Therefore, for flows entering the switch group within the time interval interval_time, we consider them to be independent flows F = {f1,f2,…f j …,f m}, for each segment of traffic we use a four-tuple to represent it in They represent the CPU, memory and buffer requirements for processing the jth segment of traffic, respectively, and It is a binary variable determined by searching the flow table. A value of 1 indicates that a new rule needs to be added to forward the traffic. A value of 0 indicates that the relevant flow table entry for the flow already exists in the flow table.

[0124] In step (4), the specific method for obtaining the next hop flow table entry is as follows:

[0125] Resource utilization is expressed by normalizing the usage of the CPU, memory, buffer, and flow table of each switch node. The larger the value, the higher the resource utilization of the node; the smaller the value, the lower the resource utilization of the node. Its expression is:

[0126]

[0127] Among them, K1, K2, K3, K4 are resource utilization factors, and K1+K2+K3+K4=1.

[0128] The given load balancing degree indicates the difference in the utilization of the CPU, memory, and buffer of the switch node. The larger the value, the worse the load balancing degree of the node; the smaller the value, the stronger the load balancing degree of the node. Its expression is:

[0129]

[0130] where μ ij is the flow rate f j Enter the switch node i When the switch node resources are:

[0131]

[0132] In the above formula, Respectively represent the flow rate f j Enter the switch node i In the example, the resource utilization of the CPU, memory, and buffer of the switch node is

[0133]

[0134]

[0135]

[0136] Among them, τ ij is a binary decision variable. If the flow rate f j Enter node s i On, then τ ij =1; otherwise τ ij =0.

[0137] According to the above load balancing, we introduce a cooperative game model. The entire switch group network can be represented by a directed graph G switch_balance ={S,E} means that the switch node s in the switch cluster i All next-hop nodes are used as players in the cooperative game, and it is expected that the optimal load balancing of the entire switch cluster can be achieved through several rounds of games.

[0138] In the game, the utility value of choosing the switch is evaluated in the following scoring method:

[0139]

[0140] Among them, α represents the importance of switch resource utilization, and β represents the importance of switch load balancing.

[0141] By selecting different switches in the directed graph, the traffic forwarding path Path can be obtained i Therefore, the objective function in the process of flow scheduling load balancing is defined as

[0142]

[0143] Among them, k is the forwarding path Path i The total number of switches passed through. The significance of this objective function is to find the method that minimizes the product of the utility values ​​of the flow scheduling paths, that is, the path load is most balanced and the resource utilization is minimized.

[0144] In step (5), the specific method for determining the controller load level is as follows:

[0145] The controller's load overhead mainly comes from the message communication between the controller and the switch, among which the most important is the PacketIn message. Therefore, we use the request rate F of the PacketIn message ij To define the controller load level, request rate F ij It is expressed as:

[0146]

[0147] Among them, θ ij is a binary decision variable representing switch s i Is the controller connected? j , if yes, then it is 1, otherwise it is 0. Indicates switches i To controller c j The request speed for sending PacketIn messages. Let the threshold be δ. When F ij When ≥δ, the controller is an overload controller.

[0148] In step (6), the specific method for grading the overloaded controller subdomain switch is as follows:

[0149] We propose to use the request rate F ij Indicates the load level of the controller, so in order to reduce the number of migrations and complete the migration with at least one migration, we give priority to switches with a high request rate ratio. In addition, in order to reduce the communication cost between the switch to be migrated and the target controller, we give priority to switches closer to the target controller.

[0150] Define node n i With node n j The number of jumps between is defined as d ij , the switch migration priority P_move i It is expressed as:

[0151]

[0152] Therefore, select switch s i =max{P_move i}.

[0153] In step (7), the specific method of selecting the target controller is as follows:

[0154] (7.1) The game model θ can be constructed LB ={J, L, W}, where J is the set of game participants, L is the set of target controllers; L is the set of strategies that each participant can choose, and each participant has two strategies, that is, L = {c j Receive i , c j Rejections i}; W is the utility that participants can obtain by adopting a certain strategy, which is specifically expressed as the migration cost and the load level after migration.

[0155] Migration costs include communication costs P c , Migration request cost P re and state synchronization cost P syn The communication cost mainly comes from the difference between the cost of deploying the flow strategy of the original controller and the cost of deploying the flow strategy of the target controller.

[0156]

[0157] where c k is the target controller, ε is the average communication speed of PacketIn requests from the switch, v ik For node n i and node n k The average bandwidth between

[0158]

[0159] Where φ is the controller c j Average packet size when installing Flow_Mod rules on the migration switch within the domain.

[0160] After receiving the migration request from the switch, the controllers will synchronize the information status and change the master-slave roles of the controllers in the subdomain to avoid controller conflicts. There are C controllers in the game domain. Assuming that the synchronization period between controllers is T, the state synchronization cost is

[0161]

[0162] Taking into account the transmission delay and migration cost, a cost function is generated.

[0163] U=α1P c +α2P re +α3P syn

[0164] Among them, α1, α2, and α3 represent the transmission delay, communication cost, migration request cost, and state synchronization cost weights, respectively. In order to find a suitable target controller, in addition to considering the migration cost U, we must also prevent the target controller from being overloaded after the migration, so we need to consider the load condition F′ of the target switch. ij , indicating that the switch s i Migrate to controller c j After the subdomain is below, the load of the controller. In summary, our utility function is:

[0165] W = min(U, F′ ij )

[0166]

[0167] F′ ij ≤δ

[0168] The constraints are that each switch has only one master controller, and after the switch migration, the load of the target controller cannot exceed the overload threshold.

[0169] (7.2) Randomly select a player from the set of players J as the target controller and calculate U and F′ ij ;

[0170] (7.3) With U and F′ obtained by the target controller ij Traverse for the initial value. If the U and F′ obtained by the currently traversed controller ij The value is smaller than U and F′ generated by the target controller ij value, store this controller as the new target controller; otherwise, remove the controller from the game domain. After the loop ends, satisfy min(U, F′ ij ) is selected as the destination controller. If there is no controller that meets min(U, F′ ij ) controller, the controller with the smallest U is selected as the destination controller.

[0171] In step (9), the specific method for selecting the time step is as follows:

[0172] Define frequency as the number of times that can be polled within the current unit step, and the base polling number is base_frequency. Given a network with two states, normal and overload, when an overload controller appears in the business network, the network changes from normal to overload; when there is no overload controller in the business network, the network remains in normal or changes from overload back to normal. This step is determined by the previous step, and the number of times the overload state appears in the previous step is overload_frequency, then the new step is

[0173]

[0174] If overload_frequency is 0 in the previous step, the new step is frequency+1, and the maximum value does not exceed max_frequency.

[0175] The above is an introduction to the theoretical system of the intrinsic security switch defense executor based on load balancing. The following three experimental schemes are designed to verify the effectiveness of the intrinsic security switch defense executor based on load balancing.

[0176] Experiment 1: Flow scheduling strategy load balancing test

[0177] Purpose:

[0178] Verify the ability of the flow scheduling strategy to protect services under DDoS attacks

[0179] Experimental steps:

[0180] 1. Establish a single-controller multi-switch service network in the simulation experiment environment mininet;

[0181] 2. Carry out normal business service communication and analyze the flow information entering the switch through Sflow protocol packets and PacketIn messages;

[0182] 3. Select the switches participating in the game domain and calculate the load balance and resource utilization of each switch node;

[0183] 4. Obtain the optimal forwarding path, issue the flow table, and forward the service traffic;

[0184] 5. Attack the switch group through the DDoS attack generation tool to monitor the switch load and the service quality of normal business;

[0185] 6. Analyze the Sflow monitoring data before and after the attack and compare it with the experimental data. The resource utilization and flow table usage of each switch are more balanced than before the flow scheduling strategy is enabled. The Http business service maintains communication service under the attack, and the latency does not change significantly.

[0186] Experiment 2: Switch migration strategy load balancing test

[0187] Purpose:

[0188] Verify the switch migration strategy's ability to protect actual services under DDoS attacks

[0189] Experimental steps:

[0190] 1. Establish a multi-controller and multi-switch business network in the simulation experiment environment mininet;

[0191] 2. Use DDoS attack generation tools to send a large number of messages to attack the switch group;

[0192] 3. Traverse the controller load conditions, select the overloaded controller set, and build the target controller game domain;

[0193] 4. Migrate and rank switches in the overloaded controller subdomain;

[0194] 5. Obtain the optimal target switch through the utility function;

[0195] 6. Perform switch migration and determine whether the controller is overloaded again;

[0196] 7. Comparing the network load before and after the migration, the overloaded controller changes from an overloaded state to a non-overloaded state. The controller can respond to PacketIn messages normally, and the flow table delivery delay is within the normal range.

[0197] Experiment 3: Load balancing test of flow scheduling and switch migration linkage

[0198] Purpose:

[0199] Verify the ability of flow scheduling and switch migration strategies to protect actual services under DDoS attacks

[0200] Experimental steps:

[0201] 1. Create a multi-controller and multi-switch service experimental network to monitor the controllers and switches;

[0202] 2. Use DDoS attack generation tools to send a large number of messages to attack the switch group;

[0203] 3. Build a cooperative game domain between switches and implement flow scheduling strategies;

[0204] 4. Traverse and judge the controller load, build the target controller game domain, select the migration target, select the target controller, and execute the switch migration strategy;

[0205] 4. Compared with the network load conditions without load balancing strategy and single load balancing strategy, the latency of the business network under linkage load balancing did not change significantly under DDoS attacks, the PacketIn message processing between the switch and the controller was carried out normally, and the switch CPU, memory, buffer, flow table and other resources were evenly loaded without obvious gaps.

[0206] It should be noted that the above embodiments are not intended to limit the protection scope of the present invention, and any equivalent replacement or substitution made on the basis of the above shall fall within the protection scope of the claims of the present invention.

Claims

1. A method for constructing an endogenous security switch defense execution body based on load balancing, characterized in that In the process of endogenous security switch defense, load balancing and game theory are combined and applied to construct a system for endogenous security switch defense execution body. The method includes the following steps: (1) Within a time step, the controller sends Query requests to the basic switch device at irregular intervals through an adaptive polling algorithm, and monitors the data flow based on the received Reply messages; (2) At the beginning of the hth polling step of a time step, the status of the underlying basic switches and controllers is monitored, and the monitoring data is used as the basic data for strategy selection; (3) When the controller receives the PacketIn message, it obtains the protocol information and packet length header information of the traffic, and queries the next-hop flow table based on the header information. If there is a relevant flow table entry, it forwards the packet directly; otherwise, it immediately invites all next-hop switches located in the flow forwarding switch to establish a cooperative game domain; (4) Through cooperative game, the path with the highest overall load balancing degree is obtained, the controller sends the flow table entry, and the switch forwards it; (5) After executing the flow scheduling strategy, all controllers are traversed and the dynamic load threshold is used to determine whether there are controller nodes that are overloaded. The set of controllers that need switch migration is determined and the non-overloaded switch is selected as the target controller to construct a non-cooperative game domain. (6) Prioritize the migration of switches within the overloaded controller domain; (7) Reselect the master controller of the switch to be migrated from the target controller and seek the pure strategy Nash equilibrium state of the target controller; (8) The overload controller selects the switch with the highest priority for migration and sends a migration request to the selected target controller. The target controller responds to the request and changes its role to the primary controller. The original controller is converted to the backup controller. The switches synchronize their status and exchange subdomain information. (9) Repeat steps (1) to (8) until a time step ends. According to the network status within this time step, revise the next time step and clear the associated flow table of the switch. In step (4), the specific method for obtaining the next hop flow table entry is as follows: Resource utilization is expressed by normalizing the usage of the CPU, memory, buffer, and flow table of each switch node. The larger the value, the higher the resource utilization of the node; the smaller the value, the lower the resource utilization of the node. The expression is: Among them, K1, K2, K3, K4 are resource utilization factors, and K1+K2+K3+K4=1, Respectively represents the actual resource utilization of CPU, memory, buffer and flow table used; The given load balancing degree indicates the difference in the utilization of the CPU, memory, and buffer of the switch node. The larger the value, the worse the load balancing degree of the node; the smaller the value, the stronger the load balancing degree of the node. Its expression is: where μ ij is the flow rate f j Enter the switch node i When the switch node resources are: In the above formula, Respectively represent the flow rate f j Enter the switch node i In the example, the resource utilization of the CPU, memory, and buffer of the switch node is Among them, τ ij is a binary decision variable. If the flow rate f j Enter node s i On, then τ ij =1; otherwise τ ij =0, According to the above load balancing, the cooperative game model is introduced, and the entire switch group network is represented by a directed graph G switch_balance ={S,E} means that the switch node s in the switch cluster i All next-hop nodes are used as players in the cooperative game, and the optimal load balancing of the entire switch cluster is achieved through several rounds of games. In the game, the utility value of choosing the switch is evaluated in the following scoring method: Among them, α represents the importance of switch resource utilization, β represents the importance of switch load balancing, By selecting different switches in the directed graph, the traffic forwarding path Path can be obtained i ,Therefore, the objective function in the process of flow scheduling load balancing is defined as Among them, k is the forwarding path Path i The total number of switches passed through, the significance of this objective function is to find the way to minimize the product of the utility value of the flow scheduling path, that is, the path load is the most balanced and the resource utilization is the minimum. In step (5), the specific method for determining the controller load level is as follows: Request rate F through PacketIn message ij To define the controller load level, request rate F ij It is expressed as: Among them, θ ij is a binary decision variable representing switch s i Is the controller connected? j , if yes, then it is 1, otherwise it is 0, Indicates switches i To controller c j The request speed of sending PacketIn messages, assuming the threshold is δ, when F ij ≥δ, the controller is an overload controller. In step (6), the specific method for classifying the overloaded controller subdomain switch is as follows: Node n i With node n j The number of jumps between is defined as d ij , the switch migration priority P_move i It is expressed as: Therefore, select switch s i =max{P_move i }, In step (7), the specific method of selecting the target controller is as follows: (7.1) Constructing the game model θ LB ={J, L, W}, where J is the set of game participants, L is the set of target controllers; L is the set of strategies that each participant can choose, and each participant has two strategies, that is, L = {c j Receive i , c j Rejections i }; W is the utility that participants can obtain by adopting the pre-screening strategy, which is specifically expressed as the migration cost and the load level after migration, Migration costs include communication costs P c , Migration request cost P re and state synchronization cost P syn ,The communication cost comes from the difference between the cost of deploying the flow ,strategy by the original controller and the cost of deploying the flow ,strategy by the target controller. Where c is the target controller, ε is the average communication speed of the switch PacketIn request, v ir For node n i and node n r The average bandwidth between in For controller c j Average packet size for installing Flow_Mod rules on the migration switch within the domain, After receiving the migration request of the switch, the controllers will synchronize the information status and change the master-slave roles of the controllers in the subdomain to avoid controller conflicts. There are C controllers in the game domain. Assuming that the synchronization period between controllers is T, the state synchronization cost is Generate cost function U=α1P c +α2P re +α3P syn Among them, α1, α2, and α3 represent the weights of communication cost, migration request cost, and state synchronization cost, respectively. Considering the load of the target switch F′ ij , indicating that the switch s i Migrate to controller c j After the subdomain is below, the load condition of the controller, the utility function is: W=min(U,F′ ij ) F′ ij ≤δ The constraints are that each switch has only one master controller, and after the switch is migrated, the load of the target controller cannot exceed the overload threshold. (7.2) Randomly select a player from the set of players J as the target controller and calculate U and F′ ij ; (7.3) With U and F′ obtained by the target controller ij Traverse for the initial value. If the U and F′ obtained by the currently traversed controller ij The value is smaller than U and F′ generated by the target controller ij value, store this controller as the new target controller; otherwise, remove the controller from the game domain, and after the cycle ends, satisfy min(U,F′ ij ) is selected as the target controller. If there is no controller that meets min(U,F′ ij ) controller, the controller with the smallest U is selected as the target controller. In step (9), the specific method for selecting the time step is as follows: Define frequency as the number of polling times within the current unit step length, and the base polling frequency is base_frequency. Given a network in two states, normal and overload, when an overload controller appears in the business network, the network changes from normal to overload; when there is no overload controller in the business network, the network remains in normal or changes back to normal from overload. This step length is determined by the previous step length, and the number of overload state occurrences in the previous step length is overload_frequency. The new step length is If overload_frequency is 0 in the previous step, the new step is frequency+1, and the maximum value does not exceed max_frequency.

2. According to the method for constructing an endogenous security switch defense execution body based on load balancing according to claim 1, it is characterized in that: The specific method of step (1) is as follows: The polling algorithm uses a dynamic time interval, and its initial value is set to base_time. In the subsequent time interval update strategy, the time interval interval_time is not only related to the flow rate change Δr, but also to the previous time interval, but the maximum time interval does not exceed max_interval_time. According to the change of flow rate, the interval time update strategy is divided into three cases. When 0≤Δr≤a1, the time increases linearly; when a1<Δr≤a2, the time interval remains unchanged; when a2<Δr, the time interval decreases multiplicatively.

3. A method for constructing an endogenous security switch defense execution body based on load balancing according to claim 2, characterized in that: In step (2), the specific monitoring situation of the switch load is as follows: The switch nodes in the network form a set N = {S, C}, where s i represents the i-th switch node in the network, c i represents the i-th controller node in the network, and the links are combined into a set E, where e ik Represents node n i With node n k The resource configuration information set of each switch node in the network is R, where r i Represents switch node s i Resource configuration information, in Respectively represent s i The CPU, memory, buffer and flow table capabilities configured on the switch are recorded as set M, where 4. A method for constructing an endogenous security switch defense execution body based on load balancing according to claim 3, characterized in that: In step (3), the specific analysis of the flow load demand is as follows: Flows with different protocol types and message length characteristics have different consumption preferences for switch resources; therefore, for flows entering the switch group within the time interval interval_time, they are considered to be independent flows F = {f1,f2,…f j …,f m }, a four-tuple is used to represent each segment of traffic in They represent the CPU, memory and buffer requirements for processing the jth segment of traffic, respectively, and It is a binary variable determined by searching the flow table. A value of 1 indicates that a new rule needs to be added to forward the traffic. A value of 0 indicates that the relevant flow table entry for the flow already exists in the flow table.

5. A system of an intrinsically secure switch defense executive body based on load balancing, used to implement the method for constructing an intrinsically secure switch defense executive body based on load balancing according to any one of claims 1 to 4, characterized in that: The system is divided into three parts: monitoring mechanisms for switches and controllers, flow scheduling strategies and switch migration strategies, and network device nodes; The monitoring mechanism of switches and controllers uses the Sflow protocol to send Query requests through a polling algorithm, monitors switches and controllers based on the received Reply messages, and provides data support for flow scheduling strategies and switch migration strategies; The flow scheduling strategy and switch migration strategy are two defense strategies. The flow scheduling strategy is a cooperative game strategy between switches. Its purpose is to make the switch group in a load-balanced state by allocating flows. The switch migration strategy is a non-cooperative game strategy between controllers. The target switch plays a pure strategy game. By migrating switches in the overloaded controller subdomain, the controller is in a load-balanced state. The flow scheduling strategy first collects the load and resource information of the switch. When the controller receives the PacketIn message sent by the switch, it analyzes the load demand of the traffic and establishes a cooperative game domain between the next-hop switches to calculate the load balance of each switch node. It then obtains the forwarding path that maximizes the overall load balance of the switch group through iteration. The controller then sends the flow table and performs flow forwarding operations. The switch migration strategy first traverses the controller load situation, extracts the controller whose load exceeds the threshold from the cluster as the overloaded controller, classifies the migration priority of the switches in the overloaded controller subdomain, establishes a non-cooperative game domain between the slave controllers of the migrated switches, completes the controller role conversion by obtaining the optimal migrated controller in a finite number of iterations, and judges the load situation of the overloaded controller again; Network device nodes refer to the underlying Openflow switches and SDN controllers under the software-defined network, which need to respond to various Openflow protocol messages and Sflow monitoring requests in a timely manner.