Method, device, and storage medium for detecting policy conflicts of flow tables in SDN

By using directed graphs to detect flow table policy conflicts in SDN networks, it solves the problems of false positives, poor effectiveness, and low efficiency of existing detection solutions, achieves efficient and accurate flow table policy conflict detection, and can detect forwarding loops, Forwarding blackhole and firewall conflicts.

CN114301786BActive Publication Date: 2024-08-23CHINA TELECOM CORP LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010996092.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-21
Publication Date
2024-08-23
Estimated Expiration
2040-09-21

AI Technical Summary

Technical Problem

Existing flow table policy detection solutions in SDN networks have problems such as false positives, poor effectiveness, and low efficiency. Especially when the flow table changes, the entire network needs to be detected, resulting in low detection efficiency.

Method used

By receiving flow table update information, it obtains a directed graph generated based on SDN physical topology and existing flow table entries, and detects whether new flow table entries conflict with existing flow table entries, avoiding network-wide detection and improving efficiency.

Benefits of technology

It achieves efficient and accurate flow table policy conflict detection, reduces false alarms, improves detection effectiveness, and can detect forwarding loops, forwarding black holes and firewall conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114301786B
    Figure CN114301786B
Patent Text Reader

Abstract

Disclosed are a method, device, and storage medium for detecting a policy conflict of a flow table in an SDN. The method comprises: receiving flow table update information, wherein the flow table update information comprises a new flow table entry to be updated to the flow table and information of a destination switch as a destination of the new flow table entry; acquiring a directed graph maintained in the SDN, wherein the directed graph is generated based on the physical topology of the SDN and existing flow table entries of the flow table in the switch in the SDN and comprises a plurality of nodes and connections between the nodes to form a forwarding path for a data packet; and detecting whether the new flow table entry conflicts with the existing flow table entry based on the new flow table entry and the directed graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to conflict detection technology in the field of network communications, and in particular to a method, apparatus, and storage medium for detecting policy conflicts in flow tables in a software-defined network (SDN). Background Art

[0002] As an emerging network architecture, SDN's core concept is to decouple the forwarding and control planes, allowing a centralized controller to manage diverse network devices using standardized interfaces. For example, the southbound interface protocol OpenFlow is currently widely used in the industry to centrally manage switches within a network. Compared to traditional networks, SDN offers numerous advantages. For example, SDN is more controllable and offers stronger network management capabilities, enabling easier monitoring of network operations and more flexible deployment of packet forwarding policies.

[0003] Although SDN provides great convenience for network management, due to the existence of multiple different users in SDN, the flow table policies issued by these different users or even the same user may conflict with each other, resulting in the formation of forwarding loops, forwarding black holes and the failure of security policies (for example, firewall rules) in the SDN network.

[0004] There are currently some detection solutions for policy conflicts in flow tables in SDN networks. However, the inventors of this application have discovered that these existing detection solutions have at least the following problems.

[0005] First, some existing detection schemes use the Cartesian product method for detection, which cannot accurately detect conflicts. Normal packet behavior is usually detected as a conflict, which easily leads to false alarms.

[0006] Secondly, some existing detection solutions are unable to detect firewall conflicts in SDN networks (which are usually caused by the use of "set" actions in SDN networks), resulting in poor detection effectiveness.

[0007] Again, although some existing detection solutions can solve the above-mentioned problems of false alarms and poor effectiveness, when the flow table in the SDN network changes, full network detection from the sender to the receiver of the data packet is required, resulting in low detection efficiency.

[0008] Therefore, it is hoped that a new detection solution can be provided to solve the problems of the current detection solution being prone to false positives, poor effectiveness, and low efficiency. Summary of the Invention

[0009] The present disclosure provides a method, an apparatus, and a storage medium for detecting policy conflicts of flow tables in an SDN, which are less likely to generate false positives when performing policy conflict detection of flow tables, and have good detection effectiveness and high efficiency.

[0010] According to one aspect of the present disclosure, a method for detecting policy conflicts in flow tables in an SDN is provided. The method comprises: receiving flow table update information, wherein the flow table update information includes a new flow table entry to be updated in the flow table and information about a destination switch to which the new flow table entry is to be sent; obtaining a directed graph maintained in the SDN, wherein the directed graph is generated based on the physical topology of the SDN and existing flow table entries in flow tables in switches in the SDN and includes multiple nodes and connections between the nodes to form a forwarding path for data packets; and detecting whether the new flow table entry conflicts with the existing flow table entry based on the new flow table entry and the directed graph.

[0011] According to another aspect of the present disclosure, a device for detecting policy conflicts in flow tables in an SDN is proposed, wherein the device includes components for implementing the above method.

[0012] According to another aspect of the present disclosure, a computer device is provided, comprising: a processor; and a memory storing a program executable by the processor, wherein the program implements the above method when executed by the processor.

[0013] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a program, and when the program is executed by a processor, the program implements the above method.

[0014] The above is a brief overview of the present disclosure in order to provide a basic understanding of some aspects of the present disclosure. However, it should be understood that this overview is not an exhaustive overview of the present disclosure. It is not intended to identify key or important parts of the present disclosure, nor is it intended to limit the scope of the present disclosure. Its purpose is simply to present certain concepts of the present disclosure in a simplified form as a prelude to the more detailed description that will be given later.

[0015] Other features and advantages of the present disclosure will become more apparent from the following detailed description of embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0017] Figure 1 An SDN system including a flow table policy conflict detection device according to an embodiment of the present disclosure is shown.

[0018] Figure 2 The basic process of the method for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown.

[0019] Figure 3 The detailed process of the method for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown.

[0020] Figure 4 FIG. 4 shows a physical topology of an SDN according to an embodiment of the present disclosure.

[0021] Figure 5 A directed graph for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown.

[0022] Figure 6 The structure of an apparatus for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0023] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

[0024] It should be noted that in the following detailed description, many specific details are set forth to provide a thorough understanding of the described embodiments. However, it should be clear to those skilled in the art that the described embodiments can be implemented without some or all of these specific details. In addition, in the described embodiments, in order to avoid unnecessarily obscuring the concepts of the present disclosure, some well-known contents are not described in detail, and where appropriate, such contents should be considered part of the description.

[0025] In addition, the steps of the methods presented in this disclosure are illustrative. In some embodiments, these methods may have one or more additional steps not described herein and / or omit one or more steps described herein. Moreover, the order in which the steps of these methods are illustrated and described is not limiting.

[0026] Figure 1 An SDN system including a flow table policy conflict detection device according to an embodiment of the present disclosure is shown.

[0027] like Figure 1 As shown in FIG, an SDN system 100 includes an SDN controller 101 and switches 106, 107, and 108. The SDN controller 101 manages the switches 106, 107, and 108, including issuing forwarding policies (ie, flow entries) of data packets to the switches 106, 107, and 108.

[0028] In addition to applications 102, 103, and 104, the SDN controller 101 also includes a device 105 that applies the flow table policy conflict detection technology disclosed herein. Specifically, when, for example, application 102 in the SDN controller 101 needs to send a flow table entry to a corresponding switch 106 to update the flow table in that switch 106, the flow table entry will first be detected by the device 105 using the flow table policy conflict detection technology disclosed herein to determine whether it conflicts with existing flow table entries in the flow tables of switches 106, 107, and 108 in the system 100. If it is determined that there is no conflict, the flow table entry will be sent to the switch 106.

[0029] The above briefly introduces the system using the flow table policy conflict detection technology disclosed in the present invention. Figure 1 The SDN system shown in is only exemplary, and its actual system architecture is not limited to this. Figure 1 The flow table policy conflict detection device is set inside the SDN controller, but it is also possible to set it outside the SDN controller. In addition, for the sake of simplicity, Figure 1 Only three applications in the SDN controller and three switches managed by the SDN controller are shown in FIG. 3 . Obviously, the SDN system may include any number of applications and switches, and may also include Figure 1 The components shown in FIG. 1 are functionally equivalent to those shown in FIG. 1 , and may even include Figure 1 Some components are not shown. Figure 1 These variations related to the SDN system shown in should be clear to those skilled in the art and will not be listed here one by one.

[0030] Figure 2 The basic process of the method for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown. The method can be executed by the flow table policy conflict detection device mentioned above, for example.

[0031] First, in step S201, flow table update information is received.

[0032] As mentioned above, before a new flow entry is sent to a switch in the SDN to update its flow table, a conflict check needs to be performed on the new flow entry. Therefore, in step S201, information related to the flow table update (i.e., flow table update information) can be obtained. This information includes the new flow entry and information related to the destination (i.e., the destination switch) to which the new flow entry is sent.

[0033] Next, in step S202, a directed graph maintained in the SDN is obtained.

[0034] In this disclosure, a directed graph is maintained in the SDN for use in flow table policy conflict detection. Therefore, each time a conflict is detected, the maintained directed graph must be retrieved. Generally, this directed graph is generated based on the physical topology of the SDN and the existing flow table entries in the SDN switches. Furthermore, this directed graph includes multiple nodes and the connections between them to form a forwarding path for data packets.

[0035] In order to more clearly understand the directed graph of the present disclosure, Figure 4 and Figure 5 Give some detailed explanation.

[0036] Figure 4 FIG. 4 shows the physical topology of SDN according to an embodiment of the present disclosure. Figure 4 As shown in FIG, in the physical topology 400, there are switches S1, S2, S3, S4, and hosts H1, H2, and there are physical connections between these switches and hosts (in Figure 4 In addition, by the way, in Figure 4 In the diagram, the numbers 1, 2, and 3 next to each switch indicate the port number of the switch.

[0037] Assume that switch S1 already has flow entries "192.168.0.0 / 16,1,2" and "192.169.0.0 / 16,1,3," S2 already has a flow entry "192.169.0.0 / 16,1,2," S3 already has a flow entry "192.160.1.2 / 32,1,2," and S4 already has a flow entry "192.168.1.2 / 32,1,2." The following description will discuss matching domains for flow entries, a concept well known to those skilled in the art and omitted for clarity. Furthermore, assume that hosts H1 and H2 have IP addresses "192.168.0.2" and "192.168.1.2," respectively.

[0038] Figure 5 A directed graph for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown, wherein: Figure 5 The directed graph 501 in is based on Figure 4 The directed graph 501 is generated based on the physical topology 400 in FIG. 4 and the existing flow table entries in switches S1, S2, S3, and S4 (ie, the flow table entries assumed above).

[0039] Specifically, in Figure 5 In the upper part of the graph, HN1 and HN2 represent nodes in the directed graph 501 (hereinafter referred to as the first node), which are respectively Figure 4SN1, SN2, SN3, SN4 also represent nodes in the directed graph 501 (hereinafter referred to as second nodes), which correspond to hosts H1 and H2 (for the sake of intuitiveness, the IP addresses of these hosts are shown). Figure 4 , S1, S2, S3, and S4 in the directed graph. Furthermore, SN1-1, SN1-2, SN2-1, SN3-1, and SN4-1 also represent nodes in the directed graph 501 (hereinafter referred to as third nodes). They correspond to flow entries in switches S1, S2, S3, and S4, respectively (for the sake of clarity, these flow entries are shown), and these third nodes are included in the corresponding second nodes SN1, SN2, SN3, and SN4. Therefore, it can be said that the directed graph 501 includes a first node and a second node, and the second node includes the third node.

[0040] Moreover, in the directed graph 501, connections are established between the third nodes included in different second nodes through the following criteria to form a forwarding path for the data packet: for two physically connected switches, if there is an overlap between the matching domains of the two flow table entries in the two switches (this means that the two flow table entries have a collaborative relationship in the forwarding processing of the data packet), then a connection is established between the third nodes corresponding to the two flow table entries in the two switches in the directed graph 501.

[0041] Furthermore, in the directed graph 501, a connection is established between the first node and the third node included in the second node to form a forwarding path for the data packet through the following criteria: for a physically connected host and switch, if there is an overlap between the IP address of the host and the matching domain of the flow table entry in the switch (this means that the data packet can be sent from the host to the switch to be processed via the flow table entry), then a connection is established between the first node corresponding to this host and the third node corresponding to the flow table entry in this switch in the directed graph 501.

[0042] For example, if Figure 4As shown in , there is a physical connection between switch S1 and switch S2. Also, as described above, switch S1 has a flow entry "192.169.0.0 / 16,1,3", and switch S2 has a flow entry "192.169.0.0 / 16,1,2". Since there is an overlap between the matching domains "192.169.0.0 / 16" and "192.169.0.0 / 16" of the two flow table entries in the two switches S1 and S2 (this means that the two flow table entries have a collaborative relationship in the forwarding processing of data packets, that is, after the data packet in switch S1 is processed by the flow table entry "192.169.0.0 / 16,1,3" and forwarded to switch S2, the flow table entry "192.169.0.0 / 16,1,2" in switch S2 can be used for further processing), a connection L2 is established between the third nodes SN1-2 and SN2-1 corresponding to these two flow table entries in the directed graph 501 to form a forwarding path for the data packet (Note: the direction of the connection L2 indicates the forwarding direction of the data packet). At the same time, it can also be seen from the directed graph 501 that since there is no overlap between the matching domain "192.160.1.2 / 32" of the flow table entry "192.160.1.2 / 32,1,2" in the switch S3 and the matching domains "192.168.0.0 / 16" and "192.168.1.2 / 32" of the flow table entries "192.168.0.0 / 16,1,2" and "192.168.1.2 / 32,1,2" in the switches S1 and S4 (this means that these flow table entries do not have a collaborative relationship in the forwarding processing of data packets), no connection is established between the third node SN3-1 and the third nodes SN1-1 and SN4-1 in the directed graph 501.

[0043] Furthermore, since there is an overlap between the IP address "192.168.0.2" of host H1 and the matching domain "192.168.0.0 / 16" of the flow entry "192.168.0.0 / 16,1,2" of switch S1 (which means that packets can be sent from host H1 to switch S1 to be processed via the flow entry "192.168.0.0 / 16,1,2"), a connection L1 is established between the corresponding first node HN1 and the third node SN1-1 in directed graph 501. Similarly, a connection L3 is established between the third node SN4-1 and the first node HN2.

[0044] The above is the process of generating a directed graph based on the physical topology of SDN and the flow table entries in the switch. Figure 5 The directed graph 501 shown in FIG is exemplary. The directed graph of the present disclosure is not limited to Figure 5The form shown in , but there can be other variations. In fact, as long as the generated directed graph can reflect the forwarding path of the data packet, other forms of directed graphs can be used.

[0045] Next, continue the discussion Figure 2 After obtaining the directed graph in step S202, in step S203, based on the new flow entry received in step S201 and the directed graph obtained in step S202, it is detected whether the new flow entry conflicts with the existing flow entry.

[0046] The directed graph obtained in step S202 is as follows Figure 5 In the case of the directed graph 501 shown in , step S203 may include: determining whether the new flow entry conflicts with the flow entry corresponding to the third node included in the second node corresponding to the destination switch in the directed graph; and if the new flow entry does not conflict with the flow entry corresponding to the third node included in the second node corresponding to the destination switch in the directed graph, then determining whether the new flow entry conflicts with the flow entry corresponding to the third node in the new forwarding path of the data packet to be formed in the directed graph, the new forwarding path being a forwarding path formed when the third node corresponding to the new flow entry is added to the second node corresponding to the destination switch in the directed graph. Regarding these judgment processes, the following will be combined with Figure 3 Introduce it in detail.

[0047] Figure 3 The detailed process of the method for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown. The method can be executed by the flow table policy conflict detection device mentioned above, for example.

[0048] In steps S301 and S302, the flow table update information is received and the directed graph maintained in the SDN is obtained. Figure 2 The steps S201 and S202 have been described in , and will not be introduced here again.

[0049] In step S303 , the corresponding node (ie, the second node corresponding to the destination switch) in the directed graph acquired in step S302 is determined based on the destination switch information included in the flow table update information received in step S301 .

[0050] As mentioned above, the flow table update information includes the destination switch information, and there is a second node corresponding to each switch in the directed graph. Therefore, in step S303, the corresponding node in the directed graph can be determined based on the destination switch information.

[0051] In step S304, it is determined whether the matching domain of the new flow entry overlaps with the matching domain of the flow entry corresponding to the third node included in the second node determined in step S303.

[0052] Step S304 is intended to determine whether the new flow entry conflicts with an existing flow entry in the destination switch by comparing the matching domain of the new flow entry with the matching domain of an existing flow entry in the destination switch. It should be noted that for the same switch, if the matching domains of two different flow entries overlap, this means that two different forwarding processing policies exist for the same packet, resulting in a processing policy conflict. Therefore, for the same switch, whether flow entries (i.e., policies) conflict can be determined by determining whether the matching domains of the flow entries overlap.

[0053] If the result of step S304 is "yes," the process proceeds to step S305. In step S305, it is determined that the new flow entry conflicts with the flow entry corresponding to the third node included in the second node corresponding to the destination switch in the directed graph. In other words, it is determined that the new flow entry conflicts with the existing flow entry (specifically, the flow entry in the destination switch).

[0054] If the result of step S304 is "No" (i.e., the new flow entry does not conflict with the existing flow entry in the destination switch), the process proceeds to step S306. In step S306, a new forwarding path for the data packet is determined by adding a third node corresponding to the new flow entry to the second node corresponding to the destination switch in the directed graph.

[0055] Specifically, if step S304 determines that the new flow entry does not conflict with existing flow entries in the destination switch, it is necessary to continue determining whether the new flow entry conflicts with existing flow entries in other switches. Step S306 is intended to determine a new forwarding path for the data packet, which will be used to determine whether the new flow entry conflicts with existing flow entries in other switches.

[0056] More specifically, when a new flow entry is added to the destination switch (i.e., a third node corresponding to the new flow entry is added to the second node corresponding to the destination switch in the directed graph), the new flow entry may work together with the existing flow entries in other switches to complete the forwarding processing of the data packet (i.e., the third node corresponding to the new flow entry in the directed graph may establish a connection with other nodes to form a new forwarding path for the data packet). The new forwarding path determined in step S306 is the forwarding path formed when the third node corresponding to the new flow entry is added to the second node corresponding to the destination switch in the directed graph. It should be noted that the establishment of a connection between the third node corresponding to the new flow entry added in the directed graph and other nodes to form a new forwarding path is also in accordance with the above description on Figure 5 The criteria mentioned in the description are carried out and will not be repeated here.

[0057] After determining the new forwarding path in step S306, the process proceeds to step S307. In step S307, a determination is made as to whether the path in the new forwarding path, traced from the third node corresponding to the new flow entry along the packet's forwarding direction to the last node (hereinafter referred to as "downward tracing"), and the path traced against the packet's forwarding direction to the first node (hereinafter referred to as "upward tracing"), form a forwarding loop, a forwarding black hole, or conflict with firewall rules. It should be noted that the forwarding loops, forwarding black holes, and firewall rules mentioned herein are well known to those skilled in the art and will not be described in detail here.

[0058] Step S307 is intended to judge whether to be formed with forwarding ring, forwarding black hole or conflict with firewall rule by starting to carry out downward tracing and upward tracing from the 3rd node corresponding with the new flow item in the new forwarding path, thus judge whether the new flow item conflicts with the flow item corresponding to the node on the new forwarding path. Specifically, if after adding the new flow item (that is, in the directed graph, adding the 3rd node corresponding with the new flow item in the second node corresponding with the destination switch), the existing flow item in this new flow item and other switches (particularly, those switches related to in the new forwarding path) acts together to form a forwarding ring, forwarding black hole or conflict with firewall rule (that is, forming a forwarding ring, forwarding black hole or conflict with firewall rule in the new forwarding path) when carrying out the forwarding process of data packet, this means that the new flow item conflicts with the existing flow item in other switches so. Therefore, in step S307, can judge whether the new flow item conflicts with the existing flow item by judging whether to be formed with forwarding ring, forwarding black hole or conflict with firewall rule in the new forwarding path.

[0059] If the result of the judgment in step S307 is "yes", the process proceeds to step S305. In step S305, it is determined whether the new flow entry conflicts with the existing flow entry (specifically, the flow entry in the switch involved in the new forwarding path).

[0060] If the result of the judgment in step S307 is "No", the flow proceeds to step S308. In step S308, it is determined that the new flow entry does not conflict with the existing flow entry.

[0061] At this point, it is possible to determine whether the new flow entry conflicts with the existing flow entry. As can be seen from the above, the above conflict detection process mainly includes the following two steps: First, it is detected whether the new flow entry conflicts with the flow entry in the destination switch (that is, the flow entry corresponding to the third node included in the second node corresponding to the destination switch in the directed graph) ( Figure 3If the new flow entry does not conflict with the flow entry in the destination switch, then the new flow entry is checked to see if it conflicts with the flow entry in the switch in the new forwarding path formed when the new flow entry is added to the destination switch (i.e., the flow entry corresponding to the third node in the new forwarding path formed when the third node corresponding to the new flow entry is added to the directed graph). Figure 3 Steps S306 and S307 in the flow table are used to determine whether the new flow entry conflicts with the existing flow entry.

[0062] Optionally, after determining whether the new flow entry conflicts with the existing flow entry, additional steps may be included, for example, Figure 3 Steps S309 and S310 in .

[0063] In step S309, a conflict report is sent to the issuer of the new flow entry.

[0064] Specifically, after determining that the new flow entry conflicts with the existing flow entry, a conflict report can be sent to the issuer of the new flow entry. The conflict report informs the issuer of the new flow entry that the new flow entry conflicts with the existing flow entry. Moreover, in this case, the new flow entry will not be sent to the destination switch.

[0065] In step S310 , the directed graph is updated and the new flow table entry is sent to the destination switch.

[0066] Specifically, after determining that the new flow entry does not conflict with the existing flow entry, the directed graph obtained in step S302 can be updated based on the new flow entry and the destination switch information included in the flow table update information received in step S301. More specifically, updating the directed graph can include adding a third node corresponding to the new flow entry to the second node corresponding to the destination switch in the directed graph and establishing a connection between the added third node and other nodes (the first node and / or the third node). The process of establishing the connection has been described above and will not be repeated here. It should be noted that although the addition of the third node corresponding to the new flow entry to the directed graph and the establishment of a corresponding connection are mentioned when determining the new forwarding path in step S306, the third node is not actually added to the directed graph and the corresponding connection is not established at this time. Only when it is determined in subsequent steps S307 and S308 that the new flow entry does not conflict with the existing flow entry will the third node be actually added to the directed graph and the corresponding connection be established. The updated directed graph can be called or obtained during the next conflict detection.

[0067] In addition to updating the directed graph, the process of step S310 may also include sending the new flow table entry to the destination switch to update the flow table of the destination switch.

[0068] The above has been fully introduced Figure 3 The following two examples will be given to make it easier to understand. Figure 3 The process in .

[0069] In Example 1, it is assumed that the application in the SDN controller wants to Figure 4 Switch S1 in the process sends a new flow entry "192.168.2.0 / 16,1,2".

[0070] according to Figure 3 ,First, the flow table update information received in step S301 includes the new ,flow table entry “192.168.2.0 / 16,1,2” and the information of the switch S1.

[0071] Next, in step 302, the directed graph maintained in the SDN is obtained. Here, it is assumed that the directed graph obtained in step S302 is Figure 5 The directed graph 501 in .

[0072] Next, in step S303 , based on the information of the switch S1 received in step S301 , it is determined that the (second) node corresponding to the switch S1 in the directed graph 501 is SN1 .

[0073] Next, in step S304, the matching domain "192.168.2.0 / 16" of the new flow entry "192.168.2.0 / 16,1,2" is compared with the matching domains "192.168.0.0 / 16" and "192.169.0.0 / 16" of the flow entries "192.168.0.0 / 16,1,2" and "192.169.0.0 / 16" corresponding to the third nodes SN1-1 and SN1-2 included in the second node SN1 in the directed graph 501 to determine whether there is overlap between their matching domains. The comparison reveals that the matching domain of the new flow entry "192.168.2.0 / 16,1,2" overlaps with the matching domain of the flow entry "192.168.0.0 / 16,1,2."

[0074] Next, in step S305 , it is determined that the new flow entry “192.168.2.0 / 16,1,2” conflicts with the existing flow entry (specifically, the flow entry “192.168.0.0 / 16,1,2” in the switch S1 ).

[0075] Then, in step S309, a conflict report is sent to the issuer of the new flow entry "192.168.2.0 / 16,1,2" (ie, the application in the SDN controller) to inform that the new flow entry conflicts with the existing flow entry. Figure 3 The process in ends.

[0076] Next, we will describe Example 2. In Example 2, it is assumed that the application in the SDN controller wants to Figure 4 Switch S3 in the process sends a new flow entry "192.168.1.0 / 24,1,2".

[0077] Similarly, according to Figure 3 ,First, the flow table update information received in step S301 includes the new ,flow table entry “192.168.1.0 / 24,1,2” and the information of the switch S3.

[0078] Next, in step 302, the directed graph maintained in the SDN is obtained. Here, it is assumed that the directed graph obtained in step S302 is Figure 5 The directed graph 501 in .

[0079] Next, in step S303 , based on the information of the switch S3 received in step S301 , it is determined that the (second) node corresponding to the switch S3 in the directed graph 501 is SN3 .

[0080] Next, in step S304, the matching domain "192.168.1.0 / 24" of the new flow entry "192.168.1.0 / 24,1,2" is compared with the matching domain "192.160.1.2 / 32" of the flow entry "192.160.1.2 / 32,1,2" corresponding to the third node SN3-1 included in the second node SN3 in the directed graph 501 to determine whether there is any overlap between their matching domains. After comparison, it is found that the matching domains of the new flow entry "192.168.1.0 / 24,1,2" and the matching domain of the flow entry "192.160.1.2 / 32,1,2" do not overlap.

[0081] Next, in step S306, a new forwarding path is determined by adding a third node corresponding to the new flow entry "192.168.1.0 / 24,1,2" to the second node SN3 corresponding to the switch S3 in the directed graph 501. Figure 5 The directed graph 502 in FIG. Figure 5The directed graph 502 is a directed graph formed when a third node (i.e., SN3-2) corresponding to the new flow entry "192.168.1.0 / 24,1,2" is added to the directed graph 501. As can be seen from the directed graph 502, after the addition of the third node SN3-2, the third node SN3-2 establishes connections L4 and L5 with the other two third nodes SN1-1 and SN4-1, respectively. It should be noted that the process of establishing the connection between the third node SN3-2 in the directed graph 502 and the other nodes is the same as the process of establishing the connection between the nodes in the directed graph 501, which has been described above and will not be repeated here. In this way, due to the addition of the third node SN3-2 (i.e., the new flow entry "192.168.1.0 / 24,1,2"), a new forwarding path L1-L4-L5-L3 for the data packet is formed.

[0082] Next, in step S307, it is determined whether the path traced downward from the third node SN3-2 in the new forwarding path L1-L4-L5-L3 (i.e., L5-L3) and the path traced upward (i.e., L4-L1) form a forwarding loop, a forwarding black hole, or conflict with the firewall rules. After judgment, it is found that the above paths do not form a forwarding loop, a forwarding black hole, or conflict with the firewall rules.

[0083] Next, in step S308 , it is determined that the new flow entry “192.168.1.0 / 24,1,2” does not conflict with the existing flow entry.

[0084] Next, in step S310 , the directed graph 501 is updated and the new flow table entry “192.168.1.0 / 24,1,2” is sent to the switch S3 to update the flow table in the switch S3 . The updated directed graph becomes the directed graph 502 .

[0085] The flow table policy conflict detection method disclosed herein has been introduced above. As can be seen from the above description, the detection method disclosed herein is based on a directed graph for detection, and during detection, the detection is performed by tracing downward and upward from the update point of the flow table (i.e., the destination switch). This avoids the need for full network detection every time the flow table is updated, making the detection efficient. Moreover, the detection method disclosed herein only needs to detect the flow table items corresponding to the nodes on the forwarding path in the directed graph, and does not need to traverse every flow table item in the switch, which also makes the detection efficient.

[0086] Moreover, the detection method disclosed in the present invention can not only detect common policy conflicts such as forwarding loops and forwarding black holes, but also detect firewall conflicts, so the detection effectiveness is good.

[0087] In addition, compared with traditional detection methods (for example, detection using a Cartesian product method), the detection method disclosed herein is based on a directed graph for path tracing detection, which has high accuracy and is less likely to generate false positives.

[0088] The following briefly introduces the flow table policy conflict detection device disclosed in the present invention. Figure 6 The structure of an apparatus for detecting flow table policy conflicts in SDN according to an embodiment of the present disclosure is shown.

[0089] like Figure 6 As shown in , the flow table policy conflict detection device 600 includes a first component 601 , a second component 602 , and a third component 603 .

[0090] The first component 601 is used to receive flow table update information, wherein the flow table update information includes a new flow table entry to be updated in the flow table and information of a destination switch to which the new flow table entry is to be sent.

[0091] The second component 602 is used to obtain a directed graph maintained in the SDN, wherein the directed graph is generated based on the physical topology of the SDN and existing flow table entries in the flow table of the switch in the SDN and includes multiple nodes and connections between the nodes to form a forwarding path for the data packet.

[0092] The third component 603 is used to detect whether the new flow entry conflicts with the existing flow entry based on the new flow entry and the directed graph.

[0093] It should be noted that the above descriptions describe that the first component 601, the second component 602, and the third component 603 respectively perform Figure 2 The processing in steps S201, S202, and S203 shown in FIG is merely an example. Those skilled in the art will appreciate that Figure 2 The processing in steps S201, S202, and S203 shown in FIG can be performed by a greater or lesser number of components, and is not limited to Figure 6 The three components shown in .

[0094] Moreover, as described in detail above, the flow table policy conflict detection method disclosed in the present invention includes Figure 2 In addition to the processing in steps S201, S202, and S203 shown in FIG, many other processing may also be included. Therefore, the first component 601, the second component 602, and the third component 603 in the flow table policy conflict detection device 600 may also be used to perform these other processing, or the flow table policy conflict detection device 600 may further include additional components to perform these other processing. For those skilled in the art, these are all understandable and will not be described in further detail here.

[0095] The present disclosure may also be implemented by a computer program. For example, the program may be stored in a memory of a computer device, and when executed by a processor of the computer device, the program implements the flow table policy conflict detection method of the present disclosure. Alternatively, the program may be stored in a computer-readable storage medium, and when executed by a processor, the program implements the flow table policy conflict detection method of the present disclosure.

[0096] The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of computer readable storage media may include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0097] The flowcharts and block diagrams in the accompanying drawings illustrate possible architectures, functions, and operations of the devices, methods, etc. according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a portion of a module, segment, or instruction, which includes one or more executable instructions for implementing the specified one or more logical functions. In some alternative implementations, the processing marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, depending on the functions involved, two consecutive boxes may actually be executed substantially in parallel, or the boxes may sometimes be executed in the opposite order. Those skilled in the art may adjust the order of operations as needed. Those skilled in the art may also add more operations or omit some of the operations as needed.

[0098] Any feature described in this specification, unless otherwise stated, may be replaced by other equivalent or similar features. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

[0099] In addition, although the description of the present disclosure has included descriptions of one or more embodiments, configurations, or aspects, other variations, modifications, and combinations are also within the scope of the present disclosure. The present disclosure is intended to obtain rights, which should include alternative embodiments, configurations, or aspects to the extent permitted, and including structures, functions, or steps that are interchangeable, alternative, and / or equivalent to those claimed, regardless of whether such interchangeable, alternative, and / or equivalent structures, functions, or steps are specifically described in this specification.

Claims

1. A method for detecting policy conflicts in flow tables in a software defined network (SDN). include: Receive flow table update information, wherein the flow table update information includes a new flow table entry to be updated to the flow table and information of a destination switch as a destination of sending the new flow table entry; Obtaining a directed graph maintained in the SDN, wherein the directed graph is generated based on the physical topology of the SDN and existing flow table entries in the flow table of the switch in the SDN and includes a plurality of nodes and connections between the nodes to form a forwarding path for the data packet, the plurality of nodes including at least one first node and a second node, each first node corresponds to a host in the SDN, each second node corresponds to a switch in the SDN, and each second node includes a third node corresponding to each flow table entry in the corresponding switch; and Detecting whether the new flow entry conflicts with the existing flow entry based on the new flow entry and the directed graph includes: determining whether the new flow entry conflicts with a flow entry corresponding to a third node included in a second node corresponding to the destination switch in the directed graph.

2. The method according to claim 1, wherein: A connection is established between the first node and the third node included in the second node, and between third nodes included in different second nodes, to form a forwarding path for a data packet according to the following criteria: If there is a physical connection between the host and the switch and there is an overlap between the IP address of the host and the matching domain of the flow table entry in the switch, a connection is established between a first node corresponding to the host and a third node corresponding to the flow table entry in the switch; and If there is a physical connection between the two switches and there is an overlap between the matching domains of the two flow table entries in the two switches, a connection is established between the third nodes respectively corresponding to the two flow table entries in the two switches.

3. The method according to claim 2, wherein: If the new flow table entry does not conflict with the flow table entry corresponding to the third node included in the second node corresponding to the destination switch in the directed graph, it is determined whether the new flow table entry conflicts with the flow table entry corresponding to the third node in the new forwarding path of the data packet to be formed in the directed graph, and the new forwarding path is a forwarding path formed based on the criterion when the third node corresponding to the new flow table entry is added to the second node corresponding to the destination switch in the directed graph.

4. The method according to claim 1, wherein: Determining whether the new flow entry conflicts with a flow entry corresponding to a third node included in a second node corresponding to the destination switch in the directed graph includes: Determine a second node in the directed graph corresponding to the destination switch based on the information of the destination switch included in the flow table update information; Determine whether the matching domain of the new flow table entry overlaps with the matching domain of the flow table entry corresponding to the third node included in the second node in the determined directed graph; and If the matching domain of the new flow table entry overlaps with the matching domain of the flow table entry corresponding to the third node included in the second node in the determined directed graph, it is determined that the new flow table entry conflicts with the flow table entry corresponding to the third node included in the second node in the directed graph corresponding to the destination switch.

5. The method according to claim 4, in the case where it is determined that the new flow table entry conflicts with the flow table entry corresponding to the third node included in the second node corresponding to the destination switch in the directed graph, the method further comprises: Send a conflict report to the issuer of the new flow entry.

6. The method according to claim 3, wherein: Determining whether the new flow table entry conflicts with a flow table entry corresponding to a third node in a new forwarding path of a data packet to be formed in the directed graph includes: Determine the new forwarding path formed based on the criterion when a third node corresponding to the new flow entry is added to the second node corresponding to the destination switch in the directed graph; Determine whether a path traced from the added third node along the forwarding direction of the data packet to the last node and a path traced against the forwarding direction of the data packet to the first node in the new forwarding path form a forwarding loop, a forwarding black hole, or conflict with a firewall rule; and If a forwarding loop or a forwarding black hole is formed or there is a conflict with a firewall rule, it is determined that the new flow entry conflicts with a flow entry corresponding to a third node in a new forwarding path of a data packet to be formed in the directed graph.

7. The method according to claim 6, when it is determined that the new flow table entry does not conflict with the flow table entry corresponding to the third node in the new forwarding path of the data packet to be formed in the directed graph, the method further comprises: Updating the directed graph according to the new flow table entry and the information of the destination switch; as well as The new flow table entry is sent to the destination switch to update the flow table of the destination switch.

8. The method according to claim 6, in the case where it is determined that the new flow table entry conflicts with the flow table entry corresponding to the third node in the new forwarding path of the data packet to be formed in the directed graph, the method further comprises: Send a conflict report to the issuer of the new flow entry.

9. A device for detecting policy conflicts of flow tables in a software defined network (SDN), the device comprising components for implementing the method according to any one of claims 1 to 8.

10. A computer device, comprising: processor; as well as A memory storing a program executable by the processor, wherein the program implements the method according to any one of claims 1 to 8 when executed by the processor.

11. A computer-readable storage medium storing a program, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Policy conflict detection method and system for SDN (Software Defined Network) application

    CN104202303A

  • SDN based fault handling method, device and equipment

    CN108270614A

  • Path determining method and device for SDN, SDN controller and network

    CN109120525A

  • Efficient cascading of flow tables in SDN

    WO2016008524A1