Virtual controller construction method, apparatus, and system
By building virtual controllers in the SDN network, the network traffic overhead caused by information interaction between physical controllers is solved, and high efficiency and rapid recovery of network information synchronization are achieved.
Patent Information
- Application Number
- CN202410007041.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-02
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-01-02
AI Technical Summary
In software-defined networking (SDN), the information exchange between physical controllers results in a large network traffic overhead in the control plane, especially the frequent transmission of heartbeat information and network information, which increases the network burden.
By building virtual controllers in the SDN network, each physical controller broadcasts its own synchronization messages to select a host controller, and then building a virtual controller on that host controller to synchronize public network information of the SDN, the direct information interaction between physical controllers is reduced.
It reduces network traffic overhead in the control plane, alleviates the difficulty of maintaining network information consistency, and can dynamically transfer virtual controllers in the event of a host controller failure, ensuring rapid network recovery.
Smart Images

Figure CN118827424B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of communication, and particularly relates to a virtual controller construction method, device and system. BACKGROUND
[0002] Software defined networking (SDN) realizes logical centralized control of network data forwarding equipment through separation of control plane and data plane. A distributed SDN network is composed of multiple physical controllers and data forwarding equipment (for example, openflow switches), the physical controllers manage the data forwarding equipment under their respective control domains, and the forwarding strategies of the underlying data forwarding equipment are formulated and issued by the upper controller, and the upper controller constitutes the control plane of the SDN network.
[0003] At present, each physical controller in the SDN network needs to interact with public network information, including heartbeat information frequently sent by each physical controller and network information shared in the control domain of each physical controller, and the like, the heartbeat information is used to maintain the network state of the physical controller, and since there is much information sent between the physical controllers, the network traffic overhead of the control plane is large. SUMMARY
[0004] The embodiment of the present application provides a virtual controller construction method, device and system, a virtual controller can be constructed on a certain physical controller, the public network information of the SDN is synchronized to all the physical controllers in the SDN through the virtual controller, and the network traffic overhead of the control plane is reduced.
[0005] In a first aspect, the embodiment of the present application provides a virtual controller construction method, and the method comprises the following steps.
[0006] Each physical controller in the software defined network (SDN) broadcasts a synchronization message of itself as a host controller, and each synchronization message comprises a MAC address of a physical controller.
[0007] For any first physical controller in the SDN, the first physical controller receives a synchronization message broadcasted by any second physical controller in the SDN.
[0008] The first physical controller updates the MAC address in the received synchronization message to obtain a first synchronization message, and broadcasts the first synchronization message.
[0009] If the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, and all N synchronization messages carry the MAC address of the first physical controller, then the first physical controller is regarded as the host controller of the virtual controller, where N is greater than m / 2, and m is the number of physical controllers in the SDN.
[0010] A virtual controller is built on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN.
[0011] Secondly, embodiments of this application provide a virtual controller construction apparatus, the apparatus comprising:
[0012] The first broadcast module is used to broadcast synchronization messages of itself as the host controller through each physical controller in the software-defined network (SDN). Each synchronization message includes the MAC address of a physical controller.
[0013] The receiving module is configured to receive a synchronization message broadcast by any second physical controller in the SDN through any first physical controller in the SDN;
[0014] The update module is used to update the MAC address in the received synchronization message through the first physical controller to obtain the first synchronization message;
[0015] The second broadcast module is used to broadcast the first synchronization message through the first physical controller;
[0016] The determination module is used to determine the first physical controller as the host controller of the virtual controller if, when the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, all N synchronization messages carry the MAC address of the first physical controller, where N is greater than m / 2 and m is the number of physical controllers in the SDN.
[0017] A construction module is used to build a virtual controller on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN.
[0018] Thirdly, embodiments of this application provide a virtual controller construction system, the system including multiple physical controllers in a software-defined network (SDN), wherein the first physical controller is any physical controller in the SDN;
[0019] Each physical controller broadcasts a synchronization message for itself as the host controller, and each synchronization message includes the MAC address of a physical controller.
[0020] The first physical controller is also used for:
[0021] Receive a synchronization message broadcast by any second physical controller in the SDN, update the MAC address in the received synchronization message to obtain a first synchronization message, and broadcast the first synchronization message;
[0022] If the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, and all N synchronization messages carry the MAC address of the first physical controller, then the first physical controller is regarded as the host controller of the virtual controller, where N is greater than m / 2, and m is the number of physical controllers in the SDN.
[0023] A virtual controller is built on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN.
[0024] The virtual controller construction method, apparatus, and system of this application embodiment can construct a virtual controller on a physical controller, and synchronize the public network information of SDN to all physical controllers in SDN through the virtual controller, thereby reducing the network traffic overhead of the control plane. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of SDN data interaction provided in one embodiment of this application;
[0027] Figure 2 This is a flowchart illustrating a virtual controller construction method provided in one embodiment of this application;
[0028] Figure 3 This is a schematic diagram of an SDN structure provided in one embodiment of this application;
[0029] Figure 4 This is a schematic diagram of the field composition structure of a synchronization message provided in one embodiment of this application;
[0030] Figure 5 This is a schematic diagram of a virtual controller sending broadcast information according to an embodiment of this application;
[0031] Figure 6 This is a schematic diagram of the structure of a virtual controller construction device provided in one embodiment of this application. Detailed Implementation
[0032] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0033] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0034] Software-defined networking (SDN) achieves centralized logical control of network data forwarding devices by separating the control plane and data plane. For example... Figure 1 As shown, a distributed SDN network consists of multiple physical controllers and data forwarding devices (e.g., OpenFlow switches). The physical controllers manage the data forwarding devices under their respective control domains. The forwarding policies of the underlying data forwarding devices are all formulated and issued by the upper-layer controllers, which together constitute the SDN network control plane.
[0035] In an SDN network, physical controllers need to exchange common network information. For example, if there are three physical controllers in an SDN network, then every pair of physical controllers needs to exchange common network information. Common network information includes heartbeat information frequently sent by each physical controller and network information shared by each physical controller within the control domain. Heartbeat information is used to maintain the network state of the physical controllers, resulting in a large network traffic overhead in the control plane.
[0036] To address the problems of the prior art, embodiments of this application provide a method, apparatus, and system for constructing a virtual controller. The method for constructing a virtual controller provided in this application will be described first.
[0037] Figure 2 A flowchart illustrating a virtual controller construction method according to an embodiment of this application is shown. Figure 2 As shown, the virtual controller construction method provided in this application embodiment includes the following steps 101-105, wherein:
[0038] Step 101: Each physical controller in the Software-Defined Network (SDN) broadcasts a synchronization message for itself as the host controller. Each synchronization message includes a Media Access Control Address (MAC) address of a physical controller. The MAC address can also be called a LAN address, Ethernet address, or physical address. The MAC address is used to indicate the unique physical hardware address of the physical controller and occupies 48 bits.
[0039] For example, the synchronization message also includes at least one of the following:
[0040] The message type TYPE is used to indicate the type of synchronization message, occupying 4 bits. The default type of the host message is 0001, the type of the host result notification message is 0002, and the type of the heartbeat message is 0003.
[0041] The message priority PRIORITY is used to indicate the priority of synchronization messages, and it occupies 8 bits. The smaller the value, the higher the priority.
[0042] The current round number (ROUND) indicates the round of the synchronization message and occupies 32 bits.
[0043] The NETWORK STATE, which indicates the network status of the physical controller that sends the synchronization message, occupies 32 bits.
[0044] The message type of the synchronization message in this step is 0001, PRIORITY is 11111111 by default, ROUND is 00000001, NETWORK STATE is obtained by reading the configuration file, and the MAC address is determined by the physical controller that sends the synchronization message.
[0045] Step 102: For any first physical controller in the SDN, the first physical controller receives a synchronization message broadcast by any second physical controller in the SDN.
[0046] Each physical controller in SDN receives synchronization messages broadcast by other physical controllers and analyzes these messages. For ease of description, this step will use the example of the first physical controller receiving a synchronization message broadcast by the second physical controller.
[0047] The second physical controller can be any physical controller in the SDN other than the first physical controller.
[0048] Step 103: The first physical controller updates the MAC address in the received synchronization message to obtain the first synchronization message, and broadcasts the first synchronization message.
[0049] After receiving the synchronization message, the first physical controller compares the most recently updated synchronization message with the received synchronization message. If it is necessary to update the MAC address in the received synchronization message, it updates the MAC address in the received synchronization message to obtain the first synchronization message, and then broadcasts the first synchronization message to other physical controllers.
[0050] For example, the first physical controller updates the MAC address in the received synchronization message to obtain the first synchronization message, which may specifically include:
[0051] If the message type of the third synchronization message received by the first physical controller is a preset message type, and if the current round of the second synchronization message of the first physical controller is the same as the current round of the third synchronization message, then the value of the current round of the target synchronization message is increased by 1 to obtain the first synchronization message.
[0052] The target synchronization message is the minimum value between the value corresponding to the second synchronization message and the value corresponding to the third synchronization message.
[0053] In the above description, for ease of description, the synchronization message received by the first physical controller is referred to as the third synchronization message, and the latest synchronization message in the first physical controller before receiving the third synchronization message is referred to as the second synchronization message. After receiving the third synchronization message, the first physical controller determines whether the message type of the third synchronization message is 0001. If so, it determines whether the current cycle of the second synchronization message is the same as the current cycle of the third synchronization message. If they are the same, it selects the synchronization message with the smallest value from the second and third synchronization messages as the target synchronization message.
[0054] Since the synchronization message includes five fields: MAC address, message type, message priority, current round, and current network status, and each field is identified by a binary number, the value of the synchronization message can be calculated based on these binary numbers.
[0055] Based on the target synchronization message, a first synchronization message can be generated. The content of the first synchronization message is as follows: TYPE is 0001, PRIORITY defaults to 11111111, ROUND increments by 1, and NETWORK STATE and MAC are the corresponding values of the target synchronization message.
[0056] In some embodiments of this application, the first physical controller updates the MAC address in the received synchronization message to obtain a first synchronization message, including:
[0057] If the message type of the third synchronization message received by the first physical controller is a preset message type, and if the current round of the second synchronization message is less than the current round of the third synchronization message, then the current round of the second synchronization message is updated to the current round of the third synchronization message.
[0058] Other physical controllers in the SDN will perform the same processing as the first physical controller until each physical controller receives synchronization messages from all other physical controllers, or until more than half of the multiple synchronization messages received contain the MAC address of the first physical controller.
[0059] Step 104: If the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, and all N synchronization messages carry the MAC address of the first physical controller, then the first physical controller is designated as the host controller of the virtual controller, where N is greater than m / 2, and m is the number of physical controllers in the SDN.
[0060] If each physical controller receives multiple synchronization messages from all other physical controllers, and more than m / 2 of these synchronization messages carry the MAC address of the first physical controller, then it means that more than m / 2 physical controllers in the SDN have chosen the first physical controller as the host controller.
[0061] Step 105: Construct a virtual controller on the first physical controller. The virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN.
[0062] Since each synchronization message is sent via broadcast, the synchronization messages available to each physical controller are identical. After each physical controller selects a host controller, i.e., each of the N synchronization messages carries the MAC address of the first physical controller, the first physical controller learns that it has become the host controller and models the virtual controller.
[0063] In this embodiment, a host controller is selected by broadcasting synchronization messages from each physical controller in the SDN, and a virtual controller is built on the host controller. The virtual controller synchronizes the public network information of the SDN to all physical controllers in the SDN. Compared with the need for information exchange between every pair of physical controllers, synchronizing information to all physical controllers through the virtual controller can greatly reduce the network traffic overhead of the control plane, and also greatly reduce the difficulty of maintaining the consistency of network information in the control plane.
[0064] In some embodiments of this application, before each physical controller in the software-defined network (SDN) broadcasts a synchronization message in which it acts as the host controller, the method further includes:
[0065] Each physical controller in the SDN broadcasts its own MAC address;
[0066] For any third physical controller in the SDN, the third physical controller determines the number of physical controllers in the SDN based on the MAC addresses broadcast by other physical controllers in the SDN that it receives.
[0067] This embodiment describes the physical controller discovery phase, which typically occurs during network initialization or when a new physical controller joins the SDN network. Specifically, the physical controller broadcasts its MAC address to the control plane network via a synchronization message with a TYPE of 0003 (with the rest being 0). The system receives and analyzes the number of such messages, calculates the total number of physical controllers (m) in the SDN, and records m in a local configuration file.
[0068] In some embodiments of this application, the current state of the network is determined according to the following expression:
[0069]
[0070] in, Represents the physical controller C i Central processing unit load status, Idle i Represents the physical controller C i Central Processing Unit Idle Time, TR i Represents the physical controller C i Central processing unit runtime;
[0071] Represents the physical controller C i Memory load status, Free i Represents the physical controller C i Free memory, TM i Represents the physical controller C i Total memory;
[0072] Represents the physical controller C i and physical controller C j Inter-link resource utilization status, D i,j Represents the physical controller C i and physical controller C j The set of shortest intra-band communication links, Send l Brand represents the number of messages per unit time for the l-th link. l This represents the bandwidth allocated to the l-th link;
[0073] ω1, ω2, and ω3 are weight adjustment factors, and ω1 + ω2 + ω3 = 1.
[0074] In some embodiments of this application, after constructing a virtual controller on the first physical controller, the method further includes:
[0075] The virtual controller on the first physical controller broadcasts the MAC address of the first physical controller through a fourth synchronization message. The fourth synchronization message is used to inform all physical controllers in the SDN that the first physical controller is the host controller of the virtual controller.
[0076] The message type of the fourth synchronization message is different from that of the first synchronization message, and the message priority, current round, and current network state of the fourth synchronization message are all set to 0.
[0077] This embodiment belongs to the result distribution stage. The virtual controller broadcasts the MAC address of the host controller through a synchronization message of type TYPE 0002 (with other parts being 0), informing other physical controllers that the first physical controller is the host controller.
[0078] In some embodiments of this application, after constructing a virtual controller on the first physical controller, the method further includes:
[0079] In the event of a failure of the first physical controller, if the connection between the first physical controller and other physical controllers in the SDN is interrupted, the process jumps to the step of each physical controller in the SDN broadcasting a synchronization message as a host controller to determine a new host controller from the SDN.
[0080] When a single point of failure occurs in the host controller, the connection between other controllers in the control plane and the virtual controller is interrupted. The process can jump to the step of each physical controller in the SDN broadcasting itself as a synchronization message as the host controller, so as to re-select a new host controller and build a virtual controller on the new host controller, so that the control plane can quickly restore the connection.
[0081] The following example illustrates the virtual controller construction method provided in this application.
[0082] like Figure 3 As shown, assuming the SDN network has n switches, the i-th switch in the network is denoted as S. i , 1≤i≤n. Assume there are m controllers, and the i-th controller in the network is represented as C. i 1 ≤ i ≤ m. As shown in the diagram above, in the dashed control domain, controller C2 manages switches S1, S2, and S4. Controllers C1, C2, C3, and C4 communicate via inter-switch links to form the upper-layer control plane. Generally, in a distributed SDN control plane, controllers need to frequently send heartbeat messages to maintain network status, share network information within their respective control domains, and ensure global network consistency.
[0083] like Figure 4 As shown, a synchronization message (hereinafter referred to as a SYNC message) consists of five parts: TYPE, PRIORITY, ROUND, NETWORKSTATE, and MAC address. TYPE, occupying 4 bits, distinguishes message types between controllers; the default type for hosted messages is 0001, for hosted result notification messages it is 0002, and for heartbeat messages it is 0003. PRIORITY, occupying 8 bits, indicates message priority; a smaller value indicates higher priority. ROUND, occupying 32 bits, indicates the current SYNC round. NETWORKSTATE, occupying 32 bits, indicates the current network status. MAC, occupying 48 bits, represents the controller's unique physical hardware address.
[0084] Controller C in SDN i The network status NETWORK STATE is:
[0085]
[0086] in, Represents the physical controller C i Central processing unit load status, Idle i Represents the physical controller C i Central Processing Unit Idle Time, TR i Represents the physical controller C i Central processing unit runtime;
[0087] Represents the physical controller C i Memory load status, Free i Represents the physical controller C i Free memory, TM i Represents the physical controller C i Total memory;
[0088] Represents the physical controller C i and physical controller C j Inter-link resource utilization status, D i,j Represents the physical controller C i and physical controller C j The set of shortest intra-band communication links, Send l Brand represents the number of messages per unit time for the l-th link. l This represents the bandwidth allocated to the l-th link;
[0089] ω1, ω2, and ω3 are weight adjustment factors, and ω1 + ω2 + ω3 = 1.
[0090] The virtual controller construction method includes three stages: controller discovery, virtual controller hosting, and result distribution.
[0091] Controller discovery phase: This phase typically occurs during network initialization or when a new physical controller joins the network. The physical controller broadcasts its MAC address to the control plane network via a SYNC message with a TYPE of 0003 (with the rest set to 0). Simultaneously, by receiving and analyzing the number of such messages, the total number of physical controllers (m) in the network is calculated and recorded in a local configuration file.
[0092] Virtual controller hosting phase: All physical controllers first broadcast a SYNC message indicating that they are the host physical controller to the control plane network. The message content is as follows: TYPE is 0001, PRIORITY is 11111111 by default, ROUND is 00000001, NETWORK STATE is obtained by reading the configuration file, and MAC is determined by the current physical controller itself.
[0093] After the physical controller receives a SYNC message with TYPE 0001, if the physical controller's current ROUND is the same as the received message's ROUND, it compares the values of the SYNC messages to find the SYNC message with the smallest value and generates a new message with the following content: TYPE is 0001, PRIORITY is 11111111 by default, ROUND is incremented by 1, NETWORK STATE and MAC are the corresponding values of the SYNC message with the smallest value, and finally broadcasts it.
[0094] If the current ROUND of the physical controller is less than the ROUND of the received message, update the current ROUND of the physical controller and clear the historical ROUND messages.
[0095] Repeat the above steps until SYNC messages are received from all physical controllers or the number of messages hosted on the first physical controller is greater than m / 2, then designate the first physical controller as the host controller.
[0096] A virtual controller is built on the first physical controller. This virtual controller is primarily responsible for processing and maintaining critical public network information that needs to be synchronized and shared among the controllers. The virtual controller distributes and synchronizes this public network information to all controllers, achieving real-time data state synchronization and consistency among multiple controllers. Based on the SYNC message (detailed in step S2), the virtual controller hosts itself on a specific physical controller in the control plane, modeling this hosted physical controller as the host controller. If the network state changes, the virtual controller can dynamically transfer to the new host controller and continue providing services. This dynamic transfer mechanism effectively avoids single points of failure for the virtual controller. The virtual controller significantly reduces control plane traffic overhead and greatly simplifies network consistency maintenance. Figure 5 As shown, the virtual controller resides on the host controller C1 and provides C2, C3, and C4 with the function of sharing public network information.
[0097] Result distribution phase: The virtual controller broadcasts the MAC address of the host controller via a message of type TYPE 0002 (with the rest being 0).
[0098] When the host controller experiences a single point of failure, the connection between other controllers in the control plane and the virtual controller is interrupted. The three stages of controller discovery, virtual controller hosting, and result distribution are repeated to generate a new virtual controller and a new host controller to form a new control plane.
[0099] The virtual controller construction method provided in this application fully considers the network communication performance issues between physical controller domains. Under in-band communication between physical controllers, it selects a host controller with better network conditions to provide physical resources for the virtual controller. The virtual controller is then responsible for computing, maintaining, and distributing critical public network information that needs to be synchronized and shared between controllers. The virtual controller significantly reduces control plane network traffic overhead and greatly simplifies the maintenance of control plane network information consistency. Furthermore, in the event of a single point of failure in the host controller, the virtual controller can dynamically transfer connections, enabling the control plane to quickly restore connectivity. The rapid convergence resulting from the SYNC message value comparison in this method is suitable for large-scale networks.
[0100] Figure 6 A structural diagram of the virtual controller construction apparatus provided in an embodiment of this application is shown. Figure 6 As shown, the virtual controller construction device 300 includes:
[0101] The first broadcast module 301 is used to broadcast synchronization messages of itself as the host controller through each physical controller in the software-defined network (SDN), and each synchronization message includes the MAC address of a physical controller.
[0102] The first receiving module 302 is used to receive a synchronization message broadcast by any second physical controller in the SDN through any first physical controller in the SDN;
[0103] The update module 303 is used to update the MAC address in the received synchronization message through the first physical controller to obtain the first synchronization message;
[0104] The second broadcast module 304 is used to broadcast the first synchronization message through the first physical controller;
[0105] The determination module 305 is used to determine the first physical controller as the host controller of the virtual controller if, when the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, all N synchronization messages carry the MAC address of the first physical controller. Here, m is the number of physical controllers in the SDN, and N is greater than n / 2.
[0106] The construction module 306 is used to construct a virtual controller on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN.
[0107] In one embodiment of this application, the apparatus further includes:
[0108] The third broadcast module is used to broadcast its own MAC address through each physical controller in the SDN;
[0109] The second receiving module is used to determine the number of physical controllers in the SDN based on the MAC addresses broadcast by other physical controllers in the SDN received by the third physical controller.
[0110] In one embodiment of this application, the synchronization message further includes at least one of the following:
[0111] The message type is used to indicate the type of synchronization message;
[0112] The message priority is used to indicate the priority of synchronization messages;
[0113] The current round indicates the round of the synchronization message;
[0114] The current network state is used to indicate the network state of the physical controller that sends the synchronization message.
[0115] In one embodiment of this application, the update module 303 is used to increment the value of the current round of the target synchronization message by 1 to obtain the first synchronization message if the current round of the second synchronization message of the first physical controller is the same as the current round of the third synchronization message when the message type of the third synchronization message received by the first physical controller is a preset message type. The second synchronization message is the latest synchronization message in the first physical controller before the first physical controller receives the third synchronization message.
[0116] The target synchronization message is the minimum value between the value corresponding to the second synchronization message and the value corresponding to the third synchronization message.
[0117] In one embodiment of this application, the update module 303 is used to update the current round of the second synchronization message to the current round of the third synchronization message if the current round of the second synchronization message of the first physical controller is less than the current round of the third synchronization message when the message type of the third synchronization message received by the first physical controller is a preset message type. The second synchronization message is the latest synchronization message in the first physical controller before the first physical controller receives the third synchronization message.
[0118] In one embodiment of this application, the current state of the network is determined according to the following expression:
[0119]
[0120] in, Represents the physical controller C i Central processing unit load status, Idle i Represents the physical controller C i Central Processing Unit Idle Time, TR i Represents the physical controller C i Central processing unit runtime;
[0121] Represents the physical controller C i Memory load status, Free i Represents the physical controller C i Free memory, TM i Represents the physical controller C i Total memory;
[0122] Represents the physical controller C i and physical controller C j Inter-link resource utilization status, D i,j Represents the physical controller C i and physical controller C jThe set of shortest intra-band communication links, Send l Brand represents the number of messages per unit time for the l-th link. l This represents the bandwidth allocated to the l-th link;
[0123] ω1, ω2, and ω3 are weight adjustment factors, and ω1 + ω2 + ω3 = 1.
[0124] In one embodiment of this application, the apparatus further includes:
[0125] The fourth broadcast module is used to broadcast the MAC address of the first physical controller through a fourth synchronization message via a virtual controller on the first physical controller. The fourth synchronization message is used to inform all physical controllers in the SDN that the first physical controller is the host controller of the virtual controller.
[0126] The message type of the fourth synchronization message is different from that of the first synchronization message, and the message priority, current round, and current network state of the fourth synchronization message are all set to 0.
[0127] In one embodiment of this application, the apparatus further includes:
[0128] The jump module is configured to, in the event of a failure of the first physical controller, if the connection between the first physical controller and other physical controllers in the SDN is interrupted, jump to the step of each physical controller in the SDN broadcasting a synchronization message of itself as the host controller, so as to determine a new host controller from the SDN.
[0129] The virtual controller construction apparatus 300 provided in this application embodiment can implement all the processes implemented in the aforementioned virtual controller construction method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0130] This application embodiment also provides a virtual controller construction system, the system including multiple physical controllers in a software-defined network (SDN), wherein the first physical controller is any physical controller in the SDN;
[0131] Each physical controller broadcasts a synchronization message for itself as the host controller, and each synchronization message includes the MAC address of a physical controller.
[0132] The first physical controller is also used for:
[0133] Receive a synchronization message broadcast by any second physical controller in the SDN, update the MAC address in the received synchronization message to obtain a first synchronization message, and broadcast the first synchronization message;
[0134] If the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, and all N synchronization messages carry the MAC address of the first physical controller, then the first physical controller is regarded as the host controller of the virtual controller, where m is the number of physical controllers in the SDN, and N is greater than n / 2.
[0135] A virtual controller is built on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN.
[0136] In one embodiment of this application, each physical controller in the SDN is further configured to broadcast its own MAC address;
[0137] For any third physical controller in the SDN, the third physical controller is used to determine the number of physical controllers in the SDN based on the MAC addresses broadcast by other physical controllers in the SDN.
[0138] In one embodiment of this application, the synchronization message further includes at least one of the following:
[0139] The message type is used to indicate the type of synchronization message;
[0140] The message priority is used to indicate the priority of synchronization messages;
[0141] The current round indicates the round of the synchronization message;
[0142] The current network state is used to indicate the network state of the physical controller that sends the synchronization message.
[0143] In one embodiment of this application, the first physical controller is further configured to, when the message type of the received third synchronization message is a preset message type, if the current round of the second synchronization message of the first physical controller is the same as the current round of the third synchronization message, increment the value of the current round of the target synchronization message by 1 to obtain the first synchronization message, wherein the second synchronization message is the latest synchronization message in the first physical controller before receiving the third synchronization message;
[0144] The target synchronization message is the minimum value between the value corresponding to the second synchronization message and the value corresponding to the third synchronization message.
[0145] In one embodiment of this application, the first physical controller is further configured to, when the message type of the received third synchronization message is a preset message type, update the current round of the second synchronization message to the current round of the third synchronization message if the current round of the second synchronization message of the first physical controller is less than the current round of the third synchronization message, wherein the second synchronization message is the latest synchronization message in the first physical controller before receiving the third synchronization message.
[0146] In one embodiment of this application, the current state of the network is determined according to the following expression:
[0147]
[0148] in, Represents the physical controller C i Central processing unit load status, Idle i Represents the physical controller C i Central Processing Unit Idle Time, TR i Represents the physical controller C i Central processing unit runtime;
[0149] Represents the physical controller C i Memory load status, Free i Represents the physical controller C i Free memory, TM i Represents the physical controller C i Total memory;
[0150] Represents the physical controller C i and physical controller C j Inter-link resource utilization status, D i,j Represents the physical controller C i and physical controller C j The set of shortest intra-band communication links, Send l Brand represents the number of messages per unit time for the l-th link. l This represents the bandwidth allocated to the l-th link;
[0151] ω1, ω2, and ω3 are weight adjustment factors, and ω1 + ω2 + ω3 = 1.
[0152] In one embodiment of this application, the first physical controller is further configured to broadcast the MAC address of the first physical controller via a fourth synchronization message, wherein the fourth synchronization message is used to inform all physical controllers in the SDN that the first physical controller is the host controller of the virtual controller.
[0153] The message type of the fourth synchronization message is different from that of the first synchronization message, and the message priority, current round, and current network state of the fourth synchronization message are all set to 0.
[0154] In one embodiment of this application, the first physical controller is further configured to, in the event of a failure of the first physical controller, if the connection between the first physical controller and other physical controllers in the SDN is interrupted, jump to the step of each physical controller in the SDN broadcasting a synchronization message of itself as a host controller, so as to determine a new host controller from the SDN.
[0155] The virtual controller construction system provided in this application can implement all the processes implemented in the aforementioned virtual controller construction method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.
[0156] Furthermore, in conjunction with the virtual controller construction methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the virtual controller construction methods in the above embodiments.
[0157] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0158] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0159] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0160] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0161] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for constructing a virtual controller, characterized in that, The method includes: In Software-Defined Networking (SDN), each physical controller broadcasts a synchronization message to itself as the host controller, and each synchronization message includes the MAC address of a physical controller. For any first physical controller in the SDN, the first physical controller receives a synchronization message broadcast by any second physical controller in the SDN; The first physical controller updates the MAC address in the received synchronization message to obtain the first synchronization message, and then broadcasts the first synchronization message. If the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, and all N synchronization messages carry the MAC address of the first physical controller, then the first physical controller is regarded as the host controller of the virtual controller, where N is greater than m / 2, and m is the number of physical controllers in the SDN. A virtual controller is built on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN; The first physical controller updates the MAC address in the received synchronization message to obtain a first synchronization message, which includes: If the message type of the third synchronization message received by the first physical controller is a preset message type, and if the current round of the second synchronization message of the first physical controller is the same as the current round of the third synchronization message, then the value of the current round of the target synchronization message is incremented by 1 to obtain the first synchronization message. The second synchronization message is the latest synchronization message in the first physical controller before receiving the third synchronization message. The target synchronization message is the minimum value between the value corresponding to the second synchronization message and the value corresponding to the third synchronization message. The value of the synchronization information is determined based on the MAC address, message type, message priority, current round, and current network status in the synchronization message.
2. The method according to claim 1, characterized in that, Before each physical controller in the software-defined network (SDN) broadcasts a synchronization message as the host controller, the method further includes: Each physical controller in the SDN broadcasts its own MAC address; For any third physical controller in the SDN, the third physical controller determines the number of physical controllers in the SDN based on the MAC addresses broadcast by other physical controllers in the SDN that it receives.
3. The method according to claim 1, characterized in that, Synchronization messages also include at least one of the following: Message type, used to indicate the type of synchronization message; Message priority, used to indicate the priority of synchronization messages; The current round indicates the round in which the synchronization message is sent. Current network status, used to indicate the network status of the physical controller that sends synchronization messages.
4. The method according to claim 3, characterized in that, The first physical controller updates the MAC address in the received synchronization message to obtain a first synchronization message, including: If the message type of the third synchronization message received by the first physical controller is a preset message type, and if the current round of the second synchronization message of the first physical controller is less than the current round of the third synchronization message, then the current round of the second synchronization message is updated to the current round of the third synchronization message. The second synchronization message is the latest synchronization message in the first physical controller before the first physical controller receives the third synchronization message.
5. The method according to claim 3, characterized in that, The current state of the network is determined according to the following expression: in, , indicating physical controller Central processing unit load status, Represents physical controller Central processing unit idle time, Represents physical controller Central processing unit runtime; , indicating physical controller Memory load status, Represents physical controller Free memory, Represents physical controller Total memory; Represents physical controller and physical controller Inter-link resource utilization status Represents physical controller and physical controller The set of shortest intra-band communication links. Indicates the first l Message volume per unit time in each link Indicates the first l The bandwidth allocated to each link; It is a weighting adjustment factor, and .
6. The method according to claim 3, characterized in that, After constructing a virtual controller on the first physical controller, the method further includes: The virtual controller on the first physical controller broadcasts the MAC address of the first physical controller through a fourth synchronization message. The fourth synchronization message is used to inform all physical controllers in the SDN that the first physical controller is the host controller of the virtual controller. The message type of the fourth synchronization message is different from that of the first synchronization message, and the message priority, current round, and current network state of the fourth synchronization message are all set to 0.
7. The method according to any one of claims 1-6, characterized in that, After constructing a virtual controller on the first physical controller, the method further includes: In the event of a failure of the first physical controller, if the connection between the first physical controller and other physical controllers in the SDN is interrupted, the process jumps to the step of each physical controller in the SDN broadcasting a synchronization message as a host controller to determine a new host controller from the SDN.
8. A virtual controller construction apparatus, characterized in that, The device includes: The first broadcast module is used to broadcast synchronization messages of itself as the host controller through each physical controller in the software-defined network (SDN). Each synchronization message includes the MAC address of a physical controller. The receiving module is configured to receive a synchronization message broadcast by any second physical controller in the SDN through any first physical controller in the SDN; The update module is used to update the MAC address in the received synchronization message through the first physical controller to obtain the first synchronization message; The second broadcast module is used to broadcast the first synchronization message through the first physical controller; The determination module is used to determine the first physical controller as the host controller of the virtual controller if, when the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, all N synchronization messages carry the MAC address of the first physical controller, where N is greater than m / 2 and m is the number of physical controllers in the SDN. A construction module is used to build a virtual controller on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN; Specifically, the update module is used to, when the message type of the third synchronization message received by the first physical controller is a preset message type, if the current round of the second synchronization message of the first physical controller is the same as the current round of the third synchronization message, increment the value of the current round of the target synchronization message by 1 to obtain the first synchronization message. The second synchronization message is the latest synchronization message in the first physical controller before receiving the third synchronization message. The target synchronization message is the minimum value between the value corresponding to the second synchronization message and the value corresponding to the third synchronization message. The value of the synchronization information is determined based on the MAC address, message type, message priority, current round, and current network status in the synchronization message.
9. A virtual controller construction system, characterized in that, The system includes multiple physical controllers in a software-defined network (SDN), wherein the first physical controller is any physical controller in the SDN. Each physical controller broadcasts a synchronization message for itself as the host controller, and each synchronization message includes the MAC address of a physical controller. The first physical controller is also used for: Receive a synchronization message broadcast by any second physical controller in the SDN, update the MAC address in the received synchronization message to obtain a first synchronization message, and broadcast the first synchronization message; If the first physical controller receives multiple synchronization messages broadcast by other physical controllers in the SDN, and all N synchronization messages carry the MAC address of the first physical controller, then the first physical controller is regarded as the host controller of the virtual controller, where N is greater than m / 2, and m is the number of physical controllers in the SDN. A virtual controller is built on the first physical controller, and the virtual controller is used to synchronize the public network information of the SDN to all physical controllers in the SDN; Specifically, the first physical controller is further configured to, when the message type of the third synchronization message received by the first physical controller is a preset message type, if the current round of the second synchronization message of the first physical controller is the same as the current round of the third synchronization message, increment the value of the current round of the target synchronization message by 1 to obtain a first synchronization message, wherein the second synchronization message is the latest synchronization message in the first physical controller before receiving the third synchronization message; wherein the target synchronization message is the minimum value between the value corresponding to the second synchronization message and the value corresponding to the third synchronization message; the value of the synchronization information is determined based on the MAC address, message type, message priority, current round, and current network state in the synchronization message.
Citation Information
Patent Citations
High-availability SDN controller clustering method and system, storage medium and equipment
CN110838935A
Ad hoc network main node election and data synchronization method
CN115412419A