METHOD FOR SOFTWARE-DEFINED NETWORK CONTROL DEVICE, SWITCH AND STORAGE MEDIUM

DE602018078214T2Active Publication Date: 2025-01-01ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
DE602018078214
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Priority Date
2017-10-31
Filing Date
2018-09-12
Publication Date
2025-01-01
Estimated Expiration
2038-09-12

AI Technical Summary

Technical Problem

In Software Defined Networks (SDNs), interruptions between controllers and switches cause data forwarding interruptions due to the need for re-delivery of forwarding table entries, which is time-consuming and affects network performance, especially in large-scale networks.

Method used

An SDN setting method that involves sending a setting message with an update time to the switch during connection reestablishment, allowing the switch to update its forwarding table entries based on pre-stored entries from the controller, thereby minimizing data forwarding disruptions and improving network efficiency.

Benefits of technology

This method effectively and quickly updates forwarding table entries during reconnection, reducing data forwarding interruptions and improving the overall forwarding efficiency and accuracy of the SDN network.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates generally to, but is not limited to, the field of communication technologies, and in particular, to a software defined network (SDN) setting method, a controller, a switch, and a storage mediumBACKGROUND

[0002] An SDN is a novel network system structure, and separates a control plane of a network from a data forwarding plane of the network. In the SDN network, a controller (or a controller cluster) is responsible for collecting information, such as a topology and traffic, of a whole network, calculating a traffic forwarding path, and delivering a forwarding table entry to a switch by using the OpenFlow protocol, to allow the switch to forward data according to the forwarding table entry.

[0003] In the related art, when a control plane and a forwarding plane are interrupted (for example, a controller cluster is restarted and / or an intermittent disconnection occurs on a switch in a large-scale network), this results in a reconnection operation between a controller and an OpenFlow switch. To ensure consistency of forwarding table entries on the controller and the OpenFlow switch after a reconnection, when the OpenFlow switch accesses the SDN network, the controller first controls the OpenFlow switch to eliminate all forwarding table entries, and then delivers forwarding table entries again. This results in a short interruption of data forwarding traffic of the OpenFlow switch during the reconnection between the controller and the OpenFlow switch. Especially, when a scale of the network is larger, re-delivery of forwarding table entries consumes a longer time, and a traffic interruption of data forwarding caused by an interruption time significantly affects data forwarding of the SDN.

[0004] EP2813034 A1 discloses a connection of a forwarding element to a new master controller after loss of a previous master controller, and / or distribution of forwarding element loads across a plurality of peer controllers.

[0005] SIGCOMM conference publication "Abstractions for network update", Mark Reitblatt et al. introduces a notion of consistent network updates that are guaranteed to preserve well-defined behaviors when transitioning between configurations.SUMMARY

[0006] The present invention relates to a software defined network setting method applied to a controller, a software defined network setting method applied to a switch, a controller, a switch, and a storage medium, as defined in the annexed claims.

[0007] Based on the above, the present invention is intended to overcome a disadvantage of a data forwarding interruption of a switch caused by an interruption between a controller and the switch in an SDN in the related art.

[0008] The present invention provides an SDN setting method. The method is applied to a controller, according to independent claim 1.

[0009] In an embodiment, sending the setting message carrying the update time to the switch after it is detected that the connection to the switch is interrupted, and the connection reestablishment request from the switch is received includes: when it is detected that the connection to the switch is interrupted, and the connection reestablishment request from the switch is received, determining whether a forwarding capacity maintaining message from the switch is received; and when the forwarding capacity maintaining message from the switch is received, sending the setting message to the switch.

[0010] The present invention further provides an SDN setting method. The method is applied to a switch, according to independent claim 3.

[0011] In an embodiment, after the connection reestablishment request is sent to the controller, the method further includes: sending a forwarding capacity maintaining message to the controller, to allow the controller to send the setting message carrying the update time to the switch based on the forwarding capacity maintaining message.

[0012] In an embodiment, the first forwarding table entry includes a first group table, and the second forwarding table entry includes a second group table; and updating, based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller includes: within the update time starting from reception of the setting message, deleting all group tables in the second group table, and storing all group tables in the first group table into the second group table.

[0013] The present invention further provides a controller, including a processor and a memory, according to independent claim 6.

[0014] In an embodiment, sending the setting message carrying the update time to the switch when it is detected that the connection to the switch is interrupted, and the connection reestablishment request from the switch is received includes: when it is detected that the connection to the switch is interrupted, and the connection reestablishment request from the switch is received, determining whether a forwarding capacity maintaining message from the switch is received; and when the forwarding capacity maintaining message from the switch is received, sending the setting message to the switch.

[0015] The present invention further provides a switch, including a processor and a memory, according to independent claim 8.

[0016] In an embodiment, after the connection reestablishment request is sent to the controller, the one or more programs are further executed by the one or more processors, to implement the following step: sending a forwarding capacity maintaining message to the controller, to allow the controller to send the setting message carrying the update time to the switch based on the forwarding capacity maintaining message.

[0017] In an embodiment, the first forwarding table entry includes a first flow table and a first metering rate-limiting table, and the second forwarding table entry includes a second flow table and a second metering rate-limiting table; and updating, based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller includes: within the update time starting from reception of the setting message, updating the second flow table by using the first flow table, and updating the second metering rate-limiting table by using the first metering rate-limiting table; and when the update time expires, deleting a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table.

[0018] In an embodiment, the first forwarding table entry includes a first group table, and the second forwarding table entry includes a second group table; and updating, based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller includes: within the update time starting from reception of the setting message, deleting all group tables in the second group table, and storing all group tables in the first group table into the second group table.

[0019] The present disclosure further provides a storage medium, storing one or more programs, where the one or more programs are executable by one or more processors, to implement steps of the foregoing SDN setting method.

[0020] By using the foregoing technical solutions, the present disclosure include at least the following advantages: By applying the SDN setting method, the controller, the switch, and the storage medium provided by the embodiments of the present disclosure, forwarding, by the switch based on a pre-stored forwarding table entry, data in a case of a disconnection between the controller and the switch in an SDN network is implemented, thereby preventing the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network.BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Fig. 1 is a schematic structural diagram of composition of an SDN network in the related art; Fig. 2 is a flowchart of an SDN setting method according to an embodiment of the present disclosure; Fig. 3 is a flowchart of an SDN setting method according to an embodiment of the present disclosure; Fig. 4 is a flowchart of an SDN setting method according to an embodiment of the present disclosure; Fig. 5 is a flowchart of an SDN setting method according to an embodiment of the present disclosure; Fig. 6 is a flowchart of a method for updating a flow table by a switch according to an embodiment of the present disclosure; Fig. 7 is a schematic structural diagram of composition of a controller according to an embodiment of the present disclosure; and Fig. 8 is a schematic structural diagram of composition of a switch according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] The following further describes the present disclosure in detail with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely used to explain the present disclosure, and are not intended to limit the present disclosure.

[0023] An SDN network includes a switch and a controller (or a controller cluster) supporting the OpenFlow protocol. As shown in Fig. 1, the switch and the controller establish a connection, through a secure channel, based on the OpenFlow protocol, and by using flow tables, metering rate-limiting tables, and group tables, datagrams received by the switch are matched and forwarded. The switch determines forwarding of data, based on forwarding table entries (including: multi-level flow tables, metering rate-limiting tables, and group tables) delivered by the controller.

[0024] An embodiment of the present disclosure provides an SDN setting method. The method is applied to a controller, and as shown in Fig.2, includes the following steps.

[0025] In step S101, a setting message carrying an update time is sent to a switch when it is detected that a connection to the switch is interrupted, and a connection reestablishment request from the switch is received.

[0026] In this embodiment, the reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch in a large-scale SDN.

[0027] In this embodiment, the update time is not specifically limited. The update time may be an optimum update time of a second entry that is set according to engineering experience, or may be an optimum update time of a second entry that is obtained according to a limited quantity of experiments, or may be an optimum update time of a second entry that is obtained according to a limited quantity of computer simulations.

[0028] In step S102, when the connection to the switch is reestablished, a first forwarding table entry is sent to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry.

[0029] By sending a first forwarding table entry to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry when the connection to the switch is reestablished, forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be updated effectively and quickly, thereby greatly improving data forwarding accuracy of the SDN.

[0030] The SDN setting method provided by this embodiment of the present disclosure can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, and greatly improve data forwarding accuracy of the SDN.

[0031] An embodiment of the present disclosure provides an SDN setting method. The method is applied to a controller, and as shown in Fig. 3, includes the following steps.

[0032] In step S201, when it is detected that a connection to a switch is interrupted, and a connection reestablishment request from the switch is received, it is determined whether a forwarding capacity maintaining message from the switch is received.

[0033] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch in a large-scale SDN.

[0034] In step S202, when the forwarding capacity maintaining message from the switch is received, a setting message carrying an update time is sent to the switch.

[0035] In this embodiment, the update time is not specifically limited. The update time may be an optimum update time of a second entry that is set according to engineering experience, or may be an optimum update time of a second entry that is obtained according to a limited quantity of experiments, or may be an optimum update time of a second entry that is obtained according to a limited quantity of computer simulations.

[0036] In case that the switch can forward data according to the pre-stored second forwarding table entry, the switch sends the forwarding capacity maintaining message to the controller, to inform the controller that the switch can forward data according to the pre-stored second forwarding table entry.

[0037] In step S203, when the connection to the switch is reestablished, a first forwarding table entry is sent to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry.

[0038] By sending a first forwarding table entry to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry in case that the connection to the switch is reestablished, forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be updated effectively and quickly, thereby greatly improving data forwarding accuracy of the SDN.

[0039] The SDN setting method provided by this embodiment of the present disclosure can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, and greatly improve data forwarding accuracy of the SDN.

[0040] An embodiment of the present disclosure provides an SDN setting method. The method is applied to a switch, and as shown in Fig. 4, includes: In step S301, when it is detected that a connection to a controller is interrupted, forward data based on a pre-stored second forwarding table entry.

[0041] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch in a large-scale SDN.

[0042] The pre-stored second forwarding table entry is the second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted.

[0043] The data forwarding, by the switch based on the pre-stored second forwarding table entry, prevents the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network.

[0044] In step S302, after a connection reestablishment request is sent to the controller, a setting message is received. Herein, the setting message is sent by the controller and carries an update time.

[0045] In step S303, when the connection to the controller is reestablished, based on the update time, the second forwarding table entry is updated according to a received first forwarding table entry from the controller.

[0046] In an embodiment, step S303 includes: within the update time starting from reception of the setting message, updating the second forwarding table entry by using the first forwarding table entry; and when the update time expires, deleting a forwarding table entry that is not updated in the second forwarding table entry.

[0047] The updating, by the switch, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, and greatly improve data forwarding accuracy of the SDN.

[0048] The SDN setting method provided by this embodiment of the present disclosure implements data forwarding, by the switch based on a pre-stored forwarding table entry, in a case of a disconnection between a controller and a switch in an SDN network, thereby preventing the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network. Forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be effectively and quickly updated, thereby greatly improving data forwarding accuracy of the SDN.

[0049] An embodiment of the present disclosure provides an SDN setting method, where the method is applied to a switch, and as shown in Fig. 4, includes: In step S301, when it is detected that a connection to a controller is interrupted, data is forwarded based on a pre-stored second forwarding table entry.

[0050] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch, in a large-scale SDN.

[0051] The pre-stored second forwarding table entry is the second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted.

[0052] The data forwarding, by the switch based on the pre-stored second forwarding table entry, prevents the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network.

[0053] In step S302, after a connection reestablishment request is sent to the controller, a setting message is received. Herein, the setting message is sent by the controller and carries an update time.

[0054] In an embodiment, step S302 includes: after the connection reestablishment request is sent to the controller, sending a forwarding capacity maintaining message to the controller, to allow the controller to send the setting message carrying the update time to the switch based on the forwarding capacity maintaining message; and receiving a setting message that is sent by the controller and that carries an update time.

[0055] When the switch can forward data according to the pre-stored second forwarding table entry, the switch sends the forwarding capacity maintaining message to the controller, to inform the controller that the switch can forward data according to the pre-stored second forwarding table entry.

[0056] In step S303, when the connection to the controller is reestablished, based on the update time, the second forwarding table entry is updated according to a received first forwarding table entry from the controller.

[0057] The first forwarding table entry includes a first flow table and a first metering rate-limiting table, and the second forwarding table entry includes a second flow table and a second metering rate-limiting table.

[0058] Step S303 includes: within the update time starting from reception of the setting message, updating the second flow table by using the first flow table, and updating the second metering rate-limiting table by using the first metering rate-limiting table; and when the update time expires, deleting a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table.

[0059] In an embodiment, the first forwarding table entry includes a first group table, and the second forwarding table entry includes a second group table.

[0060] Step S303 includes: within the update time starting from reception of the setting message, deleting all group tables in the second group table, and storing all group tables in the first group table into the second group table.

[0061] In an embodiment, the first forwarding table entry includes a first flow table, a first metering rate-limiting table, and a first group table, and the second forwarding table entry includes a second flow table, a second metering rate-limiting table, and a second group table

[0062] Step S303 includes: within the update time starting from reception of the setting message, updating the second flow table by using the first flow table, and updating the second metering rate-limiting table by using the first metering rate-limiting table; and deleting all group tables in the second group table, and storing all group tables in the first group table into the second group table; and when the update time expires, deleting a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table.

[0063] The updating, by the switch based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry, can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, and greatly improve data forwarding accuracy of the SDN.

[0064] The SDN setting method provided by this embodiment of the present disclosure implements data forwarding, by the switch based on a pre-stored forwarding table entry, in a case of a disconnection between a controller and a switch in an SDN network, thereby preventing the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network. Forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be effectively and quickly updated, thereby greatly improving data forwarding accuracy of the SDN.

[0065] Using the SDN setting method as an example, an application instance is described with reference to Fig. 5 to Fig. 6.

[0066] In step S501, a switch sends an OFPT_FEATURE_REPLY datagram to a controller.

[0067] When it is detected that a connection of the switch to the controller is interrupted, the switch initiates a connection reestablishment request to the controller. The switch forwards data based on a pre-stored second forwarding table entry. The switch sends the OFPT_FEATURE_REPLY datagram carrying a forwarding capacity maintaining message to the controller.

[0068] A setting manner of the OFPT FEATURE REPLY datagram carrying the forwarding capacity maintaining message includes, but is not limited to: setting a most significant bit in a capacity field in the OFPT_FEATURE_REPLY datagram to 1.

[0069] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: the controller encounters a severe failure, and needs to be recovered by restarting an SDN network cluster; and when a large quantity of switches exist in a large-scale SDN network, a situation, such as an interruption of an OpenFlow connection between the switch and the controller, is caused by an unstable management network.

[0070] In step S502, the controller sends the OFPT_EXPERIMENT datagram to the switch.

[0071] When the controller receives the forwarding capacity maintaining message carried in the OFPT FEATURE REPLY datagram, the controller is prohibited from sending a deletion instruction of the second forwarding table entry to the switch; and the controller sends the OFPT_EXPERIMENT datagram carrying an update time to the switch.

[0072] A manner of detecting, by the controller, whether the forwarding capacity maintaining message is carried in the OFPT FEATURE REPLY datagram includes, but is not limited to: detecting the most significant bit in the capacity field of the OFPT FEATURE REPLY datagram.

[0073] If the most significant bit in the capacity field of the OFPT_FEATURE_REPLY datagram is 1, the forwarding capacity maintaining message is carried in the OFPT_FEATURE_REPLY datagram; if the most significant bit in the capacity field of the OFPT_FEATURE_REPLY datagram is 0, the forwarding capacity maintaining message is not carried in the OFPT FEATURE REPLY datagram.

[0074] A setting manner of the OFPT_EXPERIMENT datagram carrying the update time includes, but is not limited to: setting a body field of the OFPT_EXPERIMENT datagram to be the update time.

[0075] In this embodiment, the update time is not specifically limited. The update time may be an optimum update time of a second entry that is set according to engineering experience, or may be an optimum update time of a second entry that is obtained according to a limited quantity of experiments, or may be an optimum update time of a second entry that is obtained according to a limited quantity of computer simulations.

[0076] In step S503, the switch starts timing according to the update time.

[0077] When the switch receives the OFPT_EXPERIMENT datagram that is sent by the controller and that carries the update time, aging tags are set for all second forwarding table entries, and the timing is started according to the update time.

[0078] In step S504, the controller sends a first forwarding table entry to the switch.

[0079] When the connection between the switch and the controller is reestablished, the controller sends the first forwarding table entry to the switch.

[0080] In step S505, the switch updates the second forwarding table entry by using the first forwarding table entry.

[0081] The switch receives the first forwarding table entry. Within the update time starting from a beginning of the timing, the switch updates the second forwarding table entry by using the first forwarding table entry, to obtain a third forwarding table entry.

[0082] A manner in which the switch updates, within the update time starting from the beginning of the timing, the second forwarding table entry by using the first forwarding table entry includes: The first forwarding table entry includes a first flow table, a first metering rate-limiting table, and a first group table, and the second forwarding table entry includes a second flow table, a second metering rate-limiting table, and a second group table.

[0083] Within the update time starting from reception of the update datagram, the second flow table is updated by using the first flow table, and aging tags of all the second flow tables that have been updated are deleted; and the second metering rate-limiting table is updated by using the first metering rate-limiting table, and aging tags of all the second metering rate-limiting tables have been updated are deleted; and all group tables in the second group table are deleted, and all group tables in the first group table are stored into the second group table.

[0084] When the update time expires, a flow table that is not updated in the second flow table is deleted to obtain a fourth flow table; and a metering rate-limiting table that is not updated in the second metering rate-limiting table is deleted, to obtain a fourth metering rate-limiting table.

[0085] The third forwarding table entry is obtained, here the third forwarding table entry includes the fourth flow table, the fourth metering rate-limiting table, and the first group table.

[0086] For example, as shown in Fig. 6, the switch forwards data according to a received second flow table from the controller. Here the second flow table includes a flow table 0, where duration = 569.517s, a flow table 1, where duration = 569.517s, and a flow table 2, where duration = 569.517s.

[0087] When the switch detects that a connection to the controller is interrupted, the switch initiates a connection reestablishment request to the controller, and the switch maintains forwarding data by using the second flow table, where the second flow table includes a flow table 0, where duration = 569.517s, a flow table 1, where duration = 569.517s, and a flow table 2, where duration = 569.517s.

[0088] When receiving the OFPT_EXPERIMENT datagram carrying the update time, the switch adds aging tags to all the second flow tables, and starts timing, wherein, a manner in which the switch adds the aging tags to all the second flow tables includes a flow table 0, where duration = 569.517s, and sflag = true, timer, a flow table 1, where duration = 569.517s, and sflag = true, timer, and a flow table 2, where duration = 569.517s, and sflag = true, timer.

[0089] When the connection between the switch and the controller is reestablished, the switch receives the first flow table, where the first flow table includes a flow table 0, where duration = 1.517s; and a flow table 1, where duration = 1.517s. Within the update time starting from the beginning of the timing, the switch updates the second flow table by using the first flow table, where the updated second flow table includes a flow table 0, where duration = 1.517s; and a flow table 1, where duration = 1.517s. A flow table 2 in the second flow table is deleted when the update time expires.

[0090] In step S506, the switch forwards data according to the third forwarding table entry.

[0091] The SDN setting method provided by this embodiment of the present disclosure implements data forwarding, by the switch based on a pre-stored forwarding table entry, in a case of a disconnection between a controller and a switch in an SDN network, thereby preventing the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network. Forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be effectively and quickly updated, thereby greatly improving data forwarding accuracy of the SDN.

[0092] An embodiment of the present disclosure provides a controller. The controller is disposed in an SDN network, and as shown in Fig. 7, includes the following components: a processor 601 and a memory 602. In some embodiments, the processor 601 and the memory 602 may be connected by a bus or in another manner.

[0093] The processor 601 may be a general-purpose processor, for example, a central processing unit (CPU), or may be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present disclosure. The memory 602 is configured to store an instruction executable by the processor 601.

[0094] The memory 602 is configured to store program code and transmit the program code to the processor 601. The memory 602 may include a volatile memory, for example, a random-access memory (RAM). The memory 602 may alternatively include a non-volatile memory, for example, a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). The memory 602 may alternatively include a combination of the foregoing types of memories.

[0095] The processor 601 is configured to invoke the program code stored in the memory 602, to perform the following operations. (1) a setting message carrying an update time is sent to a switch when it is detected that a connection to the switch is interrupted, and a connection reestablishment request from the switch is received.

[0096] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch, in a large-scale SDN.

[0097] In this embodiment, the update time is not specifically limited. The update time may be an optimum update time of a second entry that is set according to engineering experience, or may be an optimum update time of a second entry that is obtained according to a limited quantity of experiments, or may be an optimum update time of a second entry that is obtained according to a limited quantity of computer simulations.

[0098] (2) When the connection to the switch is reestablished, a first forwarding table entry is sent to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry.

[0099] By sending a first forwarding table entry to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry in case that the connection to the switch is reestablished, forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be updated effectively and quickly to make a great improvement on data forwarding accuracy of the SDN.

[0100] The controller provided by this embodiment of the present disclosure can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, which can greatly improve data forwarding accuracy of the SDN.

[0101] An embodiment of the present disclosure provides a controller. The controller is disposed in an SDN network, and as shown in Fig. 7, includes the following components: a processor 601 and a memory 602. In some embodiments, the processor 601 and the memory 602 may be connected by using a bus or in another manner.

[0102] The processor 601 may be a general-purpose processor, for example, a CPU, or may be a DSP or an ASIC, or may be one or more integrated circuits configured to implement this embodiment of the present disclosure. The memory 602 is configured to store an instruction executable by the processor 601.

[0103] The memory 602 is configured to store program code and transmit the program code to the processor 601. The memory 602 may include a volatile memory, for example, a RAM. The memory 602 may alternatively include a non-volatile memory, for example, a ROM, a flash memory, an HDD, or an SSD. The memory 602 may alternatively include a combination of the foregoing types of memories.

[0104] The processor 601 is configured to invoke the program code stored in the memory 602, to perform the following operations. (1) When it is detected that a connection to a switch is interrupted, and a connection reestablishment request from the switch is received, it is determined whether a forwarding capacity maintaining message from the switch is received.

[0105] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch, in a large-scale SDN.

[0106] (2) When the forwarding capacity maintaining message from the switch is received, a setting message carrying an update time is sent to the switch.

[0107] In this embodiment, the update time is not specifically limited. The update time may be an optimum update time of a second entry that is set according to engineering experience, or may be an optimum update time of a second entry that is obtained according to a limited quantity of experiments, or may be an optimum update time of a second entry that is obtained according to a limited quantity of computer simulations.

[0108] When the switch can forward data according to the pre-stored second forwarding table entry, the switch sends the forwarding capacity maintaining message to the controller, to inform the controller that the switch can forward data according to the pre-stored second forwarding table entry.

[0109] (3) When the connection to the switch is reestablished, a first forwarding table entry is sent to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry.

[0110] By sending a first forwarding table entry to the switch, to allow the switch to update, based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry in case that the connection to the switch is reestablished, forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be updated effectively and quickly, thereby greatly improving data forwarding accuracy of the SDN.

[0111] The controller provided by this embodiment of the present disclosure can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, which can greatly improve data forwarding accuracy of the SDN.

[0112] An embodiment of the present disclosure further provides a switch. The switch is disposed in an SDN network, and as shown in Fig. 8, includes the following components: a processor 801 and a memory 802. In some embodiments, the processor 801 and the memory 802 may be connected by a bus or in another manner.

[0113] The processor 801 may be a general-purpose processor, for example, a CPU, or may be a DSP or an ASIC, or may be one or more integrated circuits configured to implement this embodiment of the present disclosure. The memory 802 is configured to store an instruction executable by the processor 801.

[0114] The memory 802 is configured to store program code and transmit the program code to the processor 801. The memory 802 may include a volatile memory, for example, a RAM. The memory 802 may alternatively include a non-volatile memory, for example, a ROM, a flash memory, an HDD, or an SSD. The memory 802 may alternatively include a combination of the foregoing types of memories.

[0115] The processor 801 is configured to invoke the program code stored in the memory 802, to perform the following operations. (1) When it is detected that a connection to a controller is interrupted, data is forwarded based on a pre-stored second forwarding table entry.

[0116] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch, in a large-scale SDN.

[0117] The pre-stored second forwarding table entry is the second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted.

[0118] The data forwarding, by the switch based on the pre-stored second forwarding table entry, prevents the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network.

[0119] (2) After a connection reestablishment request is sent to the controller, receive a setting message is received. Herein, the setting message is sent by the controller and carries an update time.

[0120] (3) When the connection to the controller is reestablished, based on the update time, the second forwarding table entry is updated according to a received first forwarding table entry from the controller.

[0121] In an embodiment, when the connection to the controller is reestablished, a manner of updating, based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller includes: within the update time starting from reception of the setting message, updating the second forwarding table entry by using the first forwarding table entry; and when the update time expires, deleting a forwarding table entry that is not updated in the second forwarding table entry.

[0122] The updating, by the switch based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, and greatly improve data forwarding accuracy of the SDN.

[0123] The switch provided by this embodiment of the present disclosure implements data forwarding, based on a pre-stored forwarding table entry, in a case of a disconnection between a controller and a switch in an SDN network, thereby preventing the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network. Forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be effectively and quickly updated, thereby greatly improving data forwarding accuracy of the SDN.

[0124] An embodiment of the present disclosure provides a switch. The switch is disposed in an SDN network, and as shown in Fig. 8, includes the following components: a processor 801 and a memory 802. In some embodiments of the present disclosure, the processor 801 and the memory 802 may be connected by using a bus or in another manner.

[0125] The processor 801 may be a general-purpose processor, for example, a CPU, or may be a DSP or an ASIC, or may be one or more integrated circuits configured to implement this embodiment of the present disclosure. The memory 802 is configured to store an instruction executable by the processor 801.

[0126] The memory 802 is configured to store program code and transmit the program code to the processor 801. The memory 802 may include a volatile memory, for example, a RAM. The memory 802 may alternatively include a non-volatile memory, for example, a ROM, a flash memory, an HDD, or an SSD. The memory 802 may alternatively include a combination of the foregoing types of memories.

[0127] The processor 801 is configured to invoke the program code stored in the memory 802, to perform the following operations. (1) When it is detected that a connection to a controller is interrupted, data is forwarded based on a pre-stored second forwarding table entry.

[0128] In this embodiment, reasons leading to the interruption of connection between the controller and the switch include at least one of the following: a failure of the controller, restarting of the controller, and a situation, such as an intermittent disconnection of a switch, in a large-scale SDN.

[0129] The pre-stored second forwarding table entry is the second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted.

[0130] The data forwarding, by the switch based on the pre-stored second forwarding table entry, prevents the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network.

[0131] (2) After a connection reestablishment request is sent to the controller, a setting message is received. Herein, the setting message is sent by the controller and carries an update time.

[0132] In an embodiment, after the connection reestablishment request is sent to the controller, a manner of receiving a setting message that is sent by the controller and that carries an update time includes: after the connection reestablishment request is sent to the controller, sending a forwarding capacity maintaining message to the controller, to allow the controller to send the setting message carrying update time to the switch based on the forwarding capacity maintaining message; and receiving a setting message that is sent by the controller and that carries an update time.

[0133] When the switch can forward data according to the pre-stored second forwarding table entry, the switch sends the forwarding capacity maintaining message to the controller, to inform the controller that the switch can forward data according to the pre-stored second forwarding table entry.

[0134] (3) When the connection to the controller is reestablished, based on the update time, the second forwarding table entry is updated according to a received first forwarding table entry from the controller.

[0135] When the connection to the controller is reestablished, a manner of updating, based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller includes the following.

[0136] The first forwarding table entry includes a first flow table and a first metering rate-limiting table, and the second forwarding table entry includes a second flow table and a second metering rate-limiting table.

[0137] Within the update time starting from reception of the setting message, the second flow table is updated by using the first flow table, and the second metering rate-limiting table is updated by using the first metering rate-limiting table.

[0138] When the update time expires, a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table are deleted.

[0139] In an embodiment, when the connection to the controller is reestablished, a manner of updating, based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller includes the following.

[0140] The first forwarding table entry includes a first group table, and the second forwarding table entry includes a second group table.

[0141] Within the update time starting from reception of the setting message, all group tables in the second group table are deleted, and all group tables in the first group table are stored into the second group table.

[0142] In an embodiment, when the connection to the controller is reestablished, a manner of updating, based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller includes the following.

[0143] The first forwarding table entry includes a first flow table, a first metering rate-limiting table, and a first group table, and the second forwarding table entry includes a second flow table, a second metering rate-limiting table, and a second group table.

[0144] Within the update time starting from reception of the setting message, the second flow table is updated by using the first flow table, and the second metering rate-limiting table is updated by using the first metering rate-limiting table; and all group tables in the second group table are deleted, and all group tables in the first group table are stored into the second group table.

[0145] When the update time expires, a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table are deleted.

[0146] The updating, by the switch based on the update time, a pre-stored second forwarding table entry according to the first forwarding table entry can effectively and quickly update forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted, and greatly improve data forwarding accuracy of the SDN.

[0147] The SDN setting method provided by this embodiment of the present disclosure implements data forwarding, by the switch based on a pre-stored forwarding table entry, in a case of a disconnection between a controller and a switch in an SDN network, thereby preventing the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network. Forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be effectively and quickly updated, thereby greatly improving data forwarding accuracy of the SDN.

[0148] The present disclosure provides a computer-readable storage medium.

[0149] The computer-readable storage medium may be a RAM, a flash, a ROM, an EPROM, an EEPROM, a register, a hard disk, a removable hard disk, a CD-ROM, or any other storage medium known in the art.

[0150] The computer-readable storage medium stores one or more programs, where the one or more programs are executable by one or more processors, to implement some or all steps in any embodiment of the forgoing embodiments of the present disclosure.

[0151] The computer-readable storage medium provided by this embodiment of the present disclosure implements stores one or more programs, where the one or more programs are executable by one or more processors, to implement data forwarding, by the switch based on a pre-stored forwarding table entry, in a case of a disconnection between the controller and the switch in an SDN network, to prevent the disconnection between the controller and the switch from causing the switch to stop data forwarding, thereby effectively improving forwarding efficiency of the switch in the SDN network, and reducing a failure rate of the SDN network. Forwarding table entries in the switch that reestablishes the connection to the controller after the connection to the controller is interrupted can be effectively and quickly updated, thereby greatly improving data forwarding accuracy of the SDN.

[0152] It should be noted that the terms "include", "comprise", and any variants thereof in the present disclosure are intended to cover a non-exclusive inclusion. Therefore, a process, a method, an article, or an apparatus that includes a series of elements not only includes such elements, but also includes other elements that are not clearly listed or that are inherent to the process, the method, the article, or the apparatus. Unless otherwise specified, an element limited by "include a / an..." does not exclude other same elements existing in the process, the method, the article, or the apparatus that includes the element.

[0153] The sequence numbers of the foregoing embodiments of the present disclosure are merely for description and do not indicate the preference of the embodiments.

[0154] Through the descriptions of the foregoing implementations, a person skilled in the art may clearly understand that the methods according to the foregoing embodiments may be implemented by software and a necessary general-purpose hardware platform or certainly, by hardware. However, in most cases, the former is a preferred implementation. Based on such an understanding, the technical solutions of the present disclosure essentially, or the part contributing to the prior art may be implemented in a form of a software product. The computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disc) and includes several instructions for instructing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, a network device, or the like) to perform the methods described in the embodiments of the present disclosure.

[0155] The present invention is solely defined in the appended independent claims to which reference should be made. Advantageous features are set out in the appended dependent claims.

Claims

1. A software defined network, SDN, setting method, applied to a controller, comprising: sending (S101) a setting message carrying an update time to a switch after the controller detects that a connection to the switch is interrupted and receives a connection reestablishment request from the switch; and sending (S102) a first forwarding table entry to the switch, when the connection to the switch is reestablished; wherein the update time and the first forwarding table entry are configured to allow the switch to update a pre-stored second forwarding table entry in the switch, wherein the first forwarding table entry comprises a first flow table and a first metering rate-limiting table, and the second forwarding table entry comprises a second flow table and a second metering rate-limiting table, and the pre-stored second forwarding table entry is a second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted; wherein allow the switch to update a pre-stored second forwarding table entry in the switch comprises: updating the second flow table by using the first flow table and the second metering rate-limiting table by using the first metering rate-limiting table, within the update time starting from reception of the setting message; and deleting a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table, when the update time expires.

2. The method according to claim 1, wherein sending the setting message carrying the update time to the switch after the controller detects that a connection to the switch is interrupted and receives the connection reestablishment request from the switch comprises: determining (S201) whether the controller receives a forwarding capacity maintaining message from the switch, after the controller detects that the connection to the switch is interrupted and receives the connection reestablishment request from the switch; and sending (5202) the setting message to the switch, when the controller receives the forwarding capacity maintaining message from the switch.

3. A software defined network, SDN, setting method, applied to a switch, comprising: forwarding (S301) data based on a pre-stored second forwarding table entry, when the switch detects that a connection to a controller is interrupted, wherein the pre-stored second forwarding table entry is a second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted; receiving (S302) a setting message that is sent by the controller and that carries an update time, after a connection reestablishment request is sent to the controller; and when the connection to the controller is reestablished, based on the update time, updating (S303) the second forwarding table entry according to a received first forwarding table entry from the controller, wherein the first forwarding table entry comprises a first flow table and a first metering rate-limiting table, and the second forwarding table entry comprises a second flow table and a second metering rate-limiting table; wherein updating (S303) the second forwarding table entry according to a received first forwarding table entry from the controller comprises: updating (S303) the second flow table by using the first flow table and the second metering rate-limiting table by using the first metering rate-limiting table, within the update time starting from reception of the setting message; and deleting (S303) a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table, when the update time expires.

4. The method according to claim 3, wherein after sending the connection reestablishment request to the controller, the method further comprises: sending (S302) a forwarding capacity maintaining message to the controller, to allow the controller to send the setting message carrying the update time to the switch based on the forwarding capacity maintaining message.

5. The method according to claim 3, wherein the first forwarding table entry comprises a first group table, and the second forwarding table entry comprises a second group table; and updating (S303), based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller comprises: deleting (S303) all group tables in the second group table, and storing all group tables of the first group table into the second group table, within the update time starting from reception of the setting message.

6. A controller, comprising a processor (601) and a memory (602), wherein the processor (601) is configured to execute a software defined network setting program stored in the memory, to implement the following steps: sending (S101) a setting message carrying an update time to a switch after it is detected that a connection to the switch is interrupted and a connection reestablishment request from the switch is received; and sending (S102) a first forwarding table entry to the switch, when the connection to the switch is reestablished; wherein the update time and the first forwarding table entry are configured to allow the switch to update a pre-stored second forwarding table entry in the switch, wherein the first forwarding table entry comprises a first flow table and a first metering rate-limiting table, and the second forwarding table entry comprises a second flow table and a second metering rate-limiting table, and the pre-stored second forwarding table entry is a second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted; wherein allow the switch to update a pre-stored second forwarding table entry in the switch comprises: updating the second flow table by using the first flow table and the second metering rate-limiting table by using the first metering rate-limiting table, within the update time starting from reception of the setting message; and deleting a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table, when the update time expires.

7. The controller according to claim 6, wherein sending (S101) the setting message carrying the update time to the switch after it is detected that the connection to the switch is interrupted and a connection reestablishment request from the switch is received comprises: determining (S201) whether a forwarding capacity maintaining message from the switch is received, after it is detected that the connection to the switch is interrupted and the connection reestablishment request from the switch is received; and sending (5202) the setting message to the switch when the forwarding capacity maintaining message from the switch is received.

8. A switch, comprising a processor (801) and a memory (802); wherein the processor (801) is configured to execute a software defined network setting program stored in the memory, to implement the following steps: forwarding (S301) data based on a pre-stored second forwarding table entry, when it is detected that a connection to a controller is interrupted, wherein the pre-stored second forwarding table entry is a second forwarding table entry sent by the controller to the switch before the connection between the switch and the controller is interrupted; receiving (S302) a setting message that is sent by the controller and that carries an update time after a connection reestablishment request is sent to the controller; and updating (S303), based on the update time, the second forwarding table entry according to a received first forwarding table entry from the controller, when the connection to the controller is reestablished, wherein the first forwarding table entry comprises a first flow table and a first metering rate-limiting table, and the second forwarding table entry comprises a second flow table and a second metering rate-limiting table; wherein updating (S303), based on the update time, the second forwarding table entry according to a received first forwarding table entry from the controller comprises: updating (S303) the second flow table by using the first flow table and the second metering rate-limiting table by using the first metering rate-limiting table, within the update time starting from reception of the setting message; and deleting (S303) a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table, when the update time expires.

9. The switch according to claim 8, wherein after the connection reestablishment request is sent to the controller, the setting program is further executed by the processor, to implement the following step: sending (S302) a forwarding capacity maintaining message to the controller, to allow the controller to send the setting message carrying the update time to the switch based on the forwarding capacity maintaining message.

10. The switch according to claim 8, wherein the first forwarding table entry comprises a first flow table and a first metering rate-limiting table, and the second forwarding table entry comprises a second flow table and a second metering rate-limiting table; and updating (S303), based on the update time, the second forwarding table entry according to the received first forwarding table entry from the controller comprises: updating (S303) the second flow table by using the first flow table, and the second metering rate-limiting table by using the first metering rate-limiting table, within the update time starting from reception of the setting message; and deleting (S303) a flow table that is not updated in the second flow table and a metering rate-limiting table that is not updated in the second metering rate-limiting table, when the update time expires.

11. The switch according to claim 8 or 10, wherein the first forwarding table entry comprises a first group table, and the second forwarding table entry comprises a second group table; and updating (S303), based on the update time, the second forwarding table entry according to the received first forwarding table entry sent by the controller comprises: deleting (S303) all group tables in the second group table, and storing all group tables in the first group table into the second group table, within the update time starting from reception of the setting message.

12. A storage medium, storing at least one program executable by at least one processor, to implement the software defined network, SDN, setting method according to claim 1 or 2, and / or to implement the SDN setting method according to any one of claims 3 to 5.