Synchronization Method, Device, Storage Medium and Electronic Device for Configuration Information
By establishing a communication link between two nodes, dynamically adjusting the network card binding mode and interface attributes, real-time synchronization of configuration information in a hyperconverged environment is solved, and efficient connection and high availability problems in small hyperconverged environments are reduced, and resource waste and maintenance costs are reduced.
Patent Information
- Application Number
- CN202510327017.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-03-19
AI Technical Summary
The prior art cannot directly establish efficient and highly available hyperconverged connections between two nodes, while maintaining failover and high bandwidth transmission capabilities, especially in small hyperconverged environments with high resource waste and maintenance costs.
When the first host and the second host have established a communication link, the target message carrying the configuration information is determined, the data transmission strategy is adjusted based on the network card binding mode, and the interface attributes are dynamically adjusted, real-time synchronization and dynamic adjustment of the configuration information are realized.
In a switch-free direct connection environment, ensure that the network configuration information between the two hosts is synchronized and consistent, maintain high availability and high performance, and reduce network equipment acquisition and maintenance costs.
Smart Images

Figure CN119854320B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of data centers, and more particularly, to a method, apparatus, storage medium, and electronic device for synchronizing configuration information. Background Art
[0002] In the related art, as a new generation of IT solution, Hyper-Converged Infrastructure (HCI) integrates computing, storage, and network functions through software-defined technology, presenting characteristics of high integration and automation. It is particularly suitable for the modern application and massive data processing requirements faced by enterprises in the digital transformation. Its simplified architecture and resource pooling significantly improve the resource management efficiency and utilization rate, support flexible expansion, especially benefiting small and micro enterprises, and realizing low-cost deployment and seamless expansion of future resources. In the deployment of a hyper-converged network, it is usually required to isolate the management network, business network, and storage network. Each network uses different bandwidths according to traffic requirements, such as 1 Gigabit (1G) for the management network, 10 Gigabits (10G) or higher for the business network and storage network. However, for a small hyper-converged environment with only two nodes, purchasing high-bandwidth switches means resource waste and additional maintenance costs, especially considering the redundant configuration of switches. That is, for some small-scale users, such as those with only two nodes, it also means purchasing these devices. Although only a limited number of ports of these devices are used, in order to ensure the high availability of each network, these switches are often redundant in pairs, and most of the resources of these network devices are actually in an idle state, not only causing waste of network resources, but also incurring significant expenses in daily operation and maintenance.
[0003] Regarding the problem in the related art that an efficient and highly available hyper-converged connection cannot be directly established between two nodes while maintaining failover and high-bandwidth transmission capabilities, no effective solution has been proposed yet. Summary of the Invention
[0004] The embodiments of the present application provide a method, apparatus, storage medium, and electronic device for synchronizing configuration information, so as to at least solve the problem in the related art that an efficient and highly available hyper-converged connection cannot be directly established between two nodes while maintaining failover and high-bandwidth transmission capabilities.
[0005] According to an embodiment of the present application, a method for synchronizing configuration information is provided, including: when a communication link has been established between a first host and a second host, determining a target message carrying first configuration information, where the target message is used for synchronizing configuration information between the first host and the second host; based on the first configuration information, confirming the network card binding mode of the first host and the second host, and regulating a target policy for sending target data between the first host and the second host based on the network card binding mode; according to the target policy, determining a control instruction for adjusting a first interface attribute corresponding to the first host or a second interface attribute corresponding to the second host, modifying the first configuration information based on the control instruction to obtain second configuration information; using the second configuration information to replace the first configuration information as the content carried by the target message to obtain a target update message, and sending down the target update message for synchronously adjusting the configuration information of the first host and the second host in the running state.
[0006] According to another embodiment of the present application, a device for synchronizing configuration information is provided, including: a determination module, configured to determine a target message carrying first configuration information when a communication link has been established between a first host and a second host, where the target message is used for synchronizing configuration information between the first host and the second host; a regulation module, configured to confirm the network card binding mode of the first host and the second host based on the first configuration information, and regulate a target policy for sending target data between the first host and the second host based on the network card binding mode; a modification module, configured to determine a control instruction for adjusting a first interface attribute corresponding to the first host or a second interface attribute corresponding to the second host according to the target policy, and modify the first configuration information based on the control instruction to obtain second configuration information; a synchronization module, configured to use the second configuration information to replace the first configuration information as the content carried by the target message to obtain a target update message, and send down the target update message for synchronously adjusting the configuration information of the first host and the second host in the running state.
[0007] According to still another embodiment of the present application, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium, where the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0008] According to still another embodiment of the present application, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0009] According to still another embodiment of the present application, a computer program product is further provided, including a computer program, where the computer program implements the steps in any one of the above method embodiments when executed by a processor.
[0010] Through this application, it involves synchronizing and dynamically adjusting configuration information between two hosts (the first host and the second host) in a hyper-converged environment, especially in a direct network configuration without using a switch. Specifically, after the first host and the second host establish a communication link through direct fiber connection, target packets containing the first configuration information are sent periodically. These packets are used to synchronize the status and configuration of network interfaces between the two hosts. After receiving the target packets, the controller (or the control agent within the host) analyzes the first configuration information, confirms the binding mode of the network cards between the first host and the second host, and determines the strategy for sending target data (such as data transmission between virtual machines) according to the network card binding mode. In addition, when the first configuration information indicates that the network interface or the binding mode needs to be adjusted, corresponding control instructions will be generated. According to the control instructions, the first host will modify its first configuration information (i.e., the attributes of the network interface), and the updated content becomes the second configuration information. The second configuration information will be used for subsequent sending of target packets to ensure the synchronization and consistency of configuration information between the two hosts. Therefore, it solves the problem in the related art that an efficient and highly available hyper-converged connection cannot be directly established between two nodes, while maintaining the failover and high-bandwidth transmission capabilities, ensuring that even in the scenario of direct fiber connection, the high availability and high performance of the network can be maintained, and at the same time reducing the purchase and maintenance costs of network devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a hardware structure block diagram of a server device for a method of synchronizing configuration information according to an embodiment of the present application;
[0012] Figure 2 is a flowchart of a method of synchronizing configuration information according to an embodiment of the present application;
[0013] Figure 3 is a topological schematic diagram of a general hyper-converged network according to an embodiment of the present application;
[0014] Figure 4 is a schematic diagram of the traffic forwarding path when dual network cards of a general hyper-converged network are bound according to an embodiment of the present application;
[0015] Figure 5 is a topological schematic diagram of an extremely simple hyper-converged network without a switch according to an embodiment of the present application;
[0016] Figure 6 is a structural schematic diagram of an IFACESYND packet format according to an embodiment of the present application;
[0017] Figure 7 is a schematic diagram of a separation of control and forwarding network used in hyper-convergence according to an embodiment of the present application;
[0018] Figure 8It is a schematic diagram of IFACESYND message interaction according to an embodiment of the present application;
[0019] Figure 9 It is a schematic diagram of the traffic path during the binding of dual network cards in a minimalist hyper-converged network without a switch according to an embodiment of the present application;
[0020] Figure 10 It is a structural block diagram of a synchronization device for configuration information according to an embodiment of the present application;
[0021] Figure 11 It is a structural block diagram of the computer system of an electronic device according to an embodiment of the present application. Detailed implementation manners
[0022] In the following, embodiments of the present application will be described in detail with reference to the accompanying drawings and in combination with embodiments.
[0023] It should be noted that the terms "first", "second", etc. in the description and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence.
[0024] In this embodiment, a method for synchronizing configuration information is also provided. The system is used to implement the embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the terms "module" and "unit" are combinations of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0025] As an optional implementation manner, the method embodiments provided in the embodiments of the present application can be executed on a server device or a similar computing device. Taking the operation on a server device as an example, Figure 1 It is a hardware structural block diagram of a server device for a method of synchronizing configuration information according to an embodiment of the present application. As Figure 1 shown, the server device may include one or more ( Figure 1 only one is shown in Figure 1 a) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Among them, the above-mentioned server device may further include a transmission device 106 for communication functions and an input / output device 108. Those of ordinary skill in the art can understand that, Figure 1 the structure shown in Figure 1 is only schematic and does not limit the structure of the above-mentioned server device. For example, the server device may further include more or fewer components than
[0026] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the synchronization method of configuration information in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implements the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely disposed relative to the processor 102, and these remote memories may be connected to the server device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by a communication provider of the server device. In one instance, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0028] In this embodiment, a method for synchronizing configuration information is provided. Figure 2 is a flowchart of the method for synchronizing configuration information according to the embodiments of the present application, as Figure 2 shown, and the process includes the following steps:
[0029] Step S202, when a communication link has been established between the first host and the second host, determine a target message carrying the first configuration information, where the target message is used to synchronize the configuration information between the first host and the second host;
[0030] Step S204, confirm the network card binding mode between the first host and the second host based on the first configuration information, and regulate the target policy for sending target data between the first host and the second host based on the network card binding mode;
[0031] Step S206, determine a control instruction for adjusting the first interface attribute corresponding to the first host or the second interface attribute corresponding to the second host according to the target policy, and modify the first configuration information based on the control instruction to obtain the second configuration information;
[0032] Step S208: Replace the first configuration information with the second configuration information as the content carried in the target message to obtain a target update message, and send the target update message to synchronously adjust the configuration information of the first host and the second host in the running state.
[0033] It should be noted that the target message is a defined message in the Ethernet layer 2 message format, and the target message includes at least one of the following: the network card names in different hosts, the network card statuses in different hosts, the MAC (Media Access Control Address, abbreviated as MAC, media access control address) addresses corresponding to different hosts, the binding types corresponding to different hosts, the binding names corresponding to different hosts, the binding modes corresponding to different hosts, the primary network card and the secondary network card names corresponding to different hosts.
[0034] Through the above method, based on the communication link established between the first host and the second host, the real-time synchronization of the configuration information is achieved by sending and receiving the target message, ensuring that even in a direct connection environment without a switch, the high availability and high performance of the network can be maintained. Further, determine and send the target message carrying the first configuration information for the synchronization of the configuration data between the two hosts; then, confirm the binding mode (such as mode1 or mode4) of the network cards on both sides based on the first configuration information contained in the message, and accordingly adjust the data sending strategy to ensure the reliable transmission of data and the timely response to faults; subsequently, dynamically generate a control instruction according to the target strategy to adjust the network interface attributes of the first host or the second host to respond to configuration changes or network anomalies; finally, generate a target update message through the updated second configuration information to achieve the instant synchronous update of the configuration information and maintain the consistency of the network configuration and optimize the network operation efficiency.
[0035] In an exemplary embodiment, determining the target message carrying the first configuration information includes: obtaining the message format template between the first host and the second host; wherein, the message format template includes: a frame header field, an interface synchronization message field, and a frame check sequence field; filling the message format template with the target bytes corresponding to the first configuration information, and encapsulating the filled message format template in the Ethernet frame to obtain the target message.
[0036] In the hyper-converged networking method without a switch, in order to ensure that the configuration information can be accurately synchronized between two hosts (i.e., the first host and the second host), an optional embodiment of the present application provides a specific message format template for constructing and sending the target message. Before obtaining and sending the target message carrying the first configuration information, the following steps need to be executed:
[0037] Step 1: Obtain the message format template: The host first obtains a predefined message format template, which contains three key fields: the frame header field, the interface synchronization message field, and the frame check sequence field. The frame header field is responsible for the basic information of the message, such as the source address, destination address, and type identifier, etc.; the interface synchronization message field is used to carry the network interface configuration information that needs to be synchronized between two hosts; while the frame check sequence field is used for data integrity verification to ensure that the message has not been tampered with or damaged during transmission.
[0038] Step 2: Fill the message format template: The host uses the first configuration information, that is, information such as the network card name, status, MAC address, binding type, binding name, binding mode, and primary network card of the current host, to fill the interface synchronization message field in the message format template. Here, the first 3 bits of each record are used to identify the record type, and the 4th to 8th bits are used to represent the length of the data part, ensuring that the receiving end can accurately parse each field. According to actual needs, the data length and type in this field can be flexibly adjusted to adapt to the transmission requirements of different configuration information.
[0039] Step 3: Encapsulate and send the target message: After completion of filling, the host encapsulates the entire message format template into an Ethernet frame to form the target message. Here, the type field of the Ethernet frame is set to 0xC001, which is the identifier of the IFACESYND message defined in this application, ensuring that network devices can recognize and correctly process this special type of message. Subsequently, the target message is periodically sent through the network card to the second host to complete the synchronization of configuration information. Optionally, the above identifier can also be defined by other fields, and this application does not make excessive limitations on this.
[0040] Through the above embodiments, two hosts can perform real-time synchronization of network configuration information using a directly connected link without relying on a physical switch. The definition of the message format template, the filling of configuration information, and the encapsulation and sending of the target message constitute a complete mechanism, ensuring that even in a certain network architecture, the high availability, bandwidth requirements, and failover functions of the network can be maintained.
[0041] In an exemplary embodiment, filling the message format template with the target bytes corresponding to the first configuration information includes: determining the byte lengths corresponding to different type fields in the message format template and the target number of records allowed in the interface synchronization message field; dividing the filling positions of different type fields in the message format template according to the byte lengths and the target number; and completing the filling of the message format template based on the filling positions and the target bytes corresponding to the first configuration information.
[0042] It should be noted that before filling the message format template, it is first necessary to determine the byte length of the interface synchronization message field and the number of target configuration information records allowed for this field. This step is crucial because it directly determines how much information the message can carry and how to effectively utilize the limited space to store the necessary configuration data. As an example, in the IFACESYND message format template defined in the embodiments of this application, the interface synchronization message field allows multiple records, and each record uses at most 32 bytes. Among them, the type of the record is indicated by the first 3 bits, and the length of the data part is represented by the 4th to 8th bits, which can indicate a total length of 32 bytes. Furthermore, by controlling the record type and data length, it can be ensured that the message field can carry rich configuration information while avoiding data overflow or space waste. Secondly, after determining the byte length and the number of records of the message field, it is then necessary to allocate and indicate the filling positions of different attribute data according to this information. Specifically, in this application, the data part of each record is designed to carry specific configuration information related to the network card, such as the network card name (name), status (states), MAC address (mac_addr), bond type (bond_type), bond name (bond_name), bond mode (bond_mode), current primary network card (active_slave), and slave network card name (slave_name), etc. Based on the determined byte length, the number of records, and the filling positions allocated to different attribute data, the system fills the message format template with the target bytes in the first configuration information. This process involves filling the attribute data of each configuration record into the interface synchronization message field in sequence, ensuring that each field is correctly filled and the integrity of the information is not damaged. Once the filling is completed, the message format template will be encapsulated into an Ethernet frame to form the target message, and then sent periodically through the network card.
[0043] Optionally, in order to efficiently utilize the message field, the above embodiments can adopt a dynamic filling indication mechanism in practical applications. That is, the byte length of each record in the message can be adjusted according to the content of the actually carried configuration information. For example, if the content of a certain configuration item is short, the number of bytes allocated to it can be reduced, so as to leave more space for other longer configuration items. In addition, since "slave_name" can appear multiple times in the form of multiple records, the system can flexibly adjust the number of records of this item according to actual needs to ensure that all slave network card information can be completely carried.
[0044] In summary, through the above embodiments, the network configuration information between two directly connected hosts can be accurately and efficiently encapsulated and synchronized. Even in a network environment without a switch, the high availability of the network and the continuity of data transmission can be ensured, while solving the network interruption problems caused by resource waste and configuration inconsistency in the traditional mode.
[0045] In an exemplary embodiment, filling the message format template based on the filling position and the target bytes corresponding to the first configuration information includes: parsing the first configuration information, and determining the target source address corresponding to the first host, the target destination address corresponding to the second host, and multiple configuration records between the first host and the second host according to the parsing result, where each configuration record at least includes: the configuration subtype corresponding to each host, the length of the configuration record corresponding to each host, and the data of the configuration record corresponding to each host; filling the frame header fields in the message format template according to the target source address and the target destination address, where the frame header fields at least include: destination address, source address, and type field; the type field is used to indicate the type of the encapsulated bytes in the current message format template; filling the interface synchronization message fields in the message format template according to the multiple configuration records.
[0046] It is understandable that the host needs to parse the first configuration information, which contains the detailed network interface configurations of the host itself and the peer host, such as network card name, status, MAC address, binding type, binding name, binding mode, current primary network card, and secondary network cards. The parsing process extracts key parameters from the first configuration information, including the target source address of the first host and the target destination address of the second host, as well as multiple configuration records between the two hosts. These configuration records will be used for subsequent packet filling operations to ensure that the packets can accurately reflect the latest status of the network interface. After determining the target addresses, the next step is to fill the header fields in the packet format template. This field includes the destination address, source address, and type field. The destination address and source address are filled with the MAC addresses of the second host and the first host respectively to ensure that the packets can be correctly sent and received. The type field is set to 0xC001, which is the identifier of the IFACESYND packet, indicating that the interface synchronization packet is encapsulated in the current packet format template, rather than other types of network data packets. In this way, the receiving party can quickly identify and correctly process the synchronization packet, avoiding confusion with other network traffic. The interface synchronization packet fields in the packet format template are filled according to the multiple configuration records obtained from the parsing. Each configuration record includes at least a configuration subtype, a record length, and actual data. The configuration subtype is represented by the first 3 bits in the record to identify the specific type of the record, such as network interface name, status, MAC address, etc. The record length is indicated by the 4th to 8th bits, reflecting the length of the data part of the configuration record to ensure that the receiving party can accurately parse each record. During the filling process, the system fills the data part of each configuration record into the interface synchronization packet fields in the specified format and position to form a complete IFACESYND packet unit. At the same time, considering that the "slave_name" field may contain multiple network card information, the packet format template allows this field to appear in multiple records to ensure that the detailed information of all secondary network cards is completely carried. Once the filling of the packet format template is completed, the system generates the target packet and sends it periodically through the network card. The target packet not only carries the latest configuration information of the first host but also contains the configuration status of the second host to ensure two-way synchronization between the two hosts. The packet sending module uses the multicast address (01:80:c2:00:00:a0) as the destination address and maintains real-time updates of the network configuration status through periodic sending. At the same time, the frame check sequence field is used to ensure the integrity of the transmission. This mechanism is particularly critical in an environment without switches because it allows the host to autonomously adjust and optimize the network configuration without relying on physical network devices, achieving high availability and failover. When the target packet is received and parsed, the receiving party compares the configuration information carried in the packet with its own configuration to confirm the consistency of the configuration.If a difference is detected, the system generates control instructions to adjust its own network interface properties, such as switching the primary and standby network cards or updating the network card status. The modified configuration information becomes the second configuration information, which will be used to generate subsequent target update messages to continuously synchronize the network configuration status of both parties, ensuring network operation optimization and fast response to faults.
[0047] Through the above embodiments, it is elaborated in detail how to maintain the real-time synchronization and dynamic adjustment of network configurations between two hosts by generating and sending intelligent messages, thereby simplifying the network architecture and reducing hardware costs while ensuring high network availability, high performance, and failover capabilities, bringing a practical solution to small-scale hyper-converged deployment scenarios.
[0048] In an exemplary embodiment, after determining the target message carrying the first configuration information, the above method further includes: recording the initial sending time of the target message; calculating the synchronization period of the target message based on the initial sending time and a preset interval duration, where the preset interval duration is a time configuration parameter in the deployed converged networking system, and the synchronization period is used to indicate the frequency at which the target message is repeatedly synchronized between the first host and the second host.
[0049] In the hyper-converged networking method without a switch, ensuring the continuous synchronization and timely update of configuration information is the key to maintaining network stability and high availability. Therefore, this application introduces an accurate management mechanism for the sending period of target messages to adapt to the real-time requirements of system operation. Specifically, it is implemented through the following steps:
[0050] Step S32, record the initial sending time of the target message: When the first host first determines and sends the target message carrying the first configuration information, the system records the initial sending time of this message. The recording of this time stamp provides a basis for subsequent calculation of the message synchronization period, ensuring that the update of configuration information follows the preset time pattern rather than randomly or disorderly. By recording the initial sending time, the system can accurately track the sending history of the message, thereby performing time calibration or adjustment when necessary to maintain the synchronization of the network configuration.
[0051] Step S34: Calculate the synchronization period based on the initial transmission time and the preset interval duration. The preset interval duration is an important time configuration parameter that is set at the beginning of the hyper-converged networking system deployment to define the frequency of configuration information synchronization. This parameter takes into account the possible speed of network state changes, the system's response requirements for configuration changes, and the impact of message transmission on network resources, ensuring the rationality and effectiveness of the synchronization period. The system calculates the specific synchronization period of the target message based on the initial transmission time of the target message and the preset interval duration. Based on this period, the first host periodically sends the target message to the second host for configuration information synchronization. This mechanism ensures that even when network environment changes or faults occur, the configuration information can be updated quickly and accurately, reducing the network interruption time caused by inconsistent information.
[0052] Step S36: Dynamic adjustment of the synchronization period. Although the preset interval duration provides a basic synchronization frequency, in certain specific situations, such as network congestion, device fault detection, or configuration changes, the synchronization period may need to be dynamically adjusted. For example, when network congestion is detected, the system may temporarily extend the synchronization period to avoid excessive message transmission from exacerbating the network burden; while in the event of an emergency configuration change, such as a network card failure switch, the synchronization period may be shortened to ensure that the configuration information can be quickly conveyed to the peer end for timely link adjustment. This dynamic adjustment strategy is an intelligent management based on the real-time network state and system requirements, further enhancing the flexibility and response speed of the hyper-converged environment.
[0053] Step S38: Continuity and reliability of message transmission. To ensure the continuity and reliability of configuration information synchronization, the system designs a fault recovery mechanism. Within the preset synchronization period, if the first host detects abnormal network connection or message transmission failure during continuous sending of the target message, it will automatically adopt a fault recovery strategy, such as retrying transmission, switching to an alternative link, or adjusting the message size, to reduce the possibility of transmission failure. At the same time, the synchronization period calculation mechanism of the target message also has a certain fault tolerance ability. Even if one or several message transmissions fail, the system can recalculate the synchronization period based on the latest network state and time parameters to resume the normal synchronization of configuration information.
[0054] Through the embodiments, the present application not only realizes the periodic synchronization of configuration information between two hosts in a switchless environment, but also provides precise management and dynamic adjustment strategies for the synchronization period to adapt to changes in the network environment and system requirements. This mechanism ensures the real-time and consistency of network configuration. Even in a directly fiber-connected architecture, it can guarantee the high availability and fault switching ability of the network, reducing the acquisition and maintenance costs of network devices, which is particularly beneficial for small and micro enterprises and hyper-converged deployments in specific scenarios.
[0055] In an exemplary embodiment, before determining a control instruction for adjusting the first interface attribute corresponding to the first host or the second interface attribute corresponding to the second host according to a target policy and modifying the first configuration information based on the control instruction to obtain the second configuration information, the method further includes: receiving parameter information input by an operation and maintenance object; determining whether the communication link between the first host and the second host is adjusted according to the parameter information; in the case where the communication link is not adjusted, allowing the control instruction to modify the first configuration information; in the case where the communication link is adjusted, prohibiting the use of the control instruction to modify the first configuration information, and changing the first interface attribute corresponding to the first host or the second interface attribute corresponding to the second host based on the parameter information.
[0056] Briefly, an operation and maintenance object, such as a network administrator or an automated operation and maintenance system, can input parameter information to the converged networking system through a specific interface. This information may include changes in the status of network links, physical connection adjustments of devices, modification requests for network configurations, etc. The converged networking system receives this parameter information as a basis for deciding whether the communication link needs to be adjusted. Based on the received parameter information, the converged networking system analyzes whether the communication link between the first host and the second host has been adjusted. These adjustments may include changes in physical connections (such as reconnection of optical fibers), replacement of network devices, or changes in software configurations, etc. The adjustment of the communication link has a direct impact on the sending path and receiving mechanism of packets, so the converged networking system needs to monitor and evaluate the link status in real time.
[0057] Optionally, in the case where the communication link is not adjusted, the system allows the use of control instructions to modify the first interface attribute corresponding to the first host or the second interface attribute corresponding to the second host. These control instructions are generated based on a target policy and are used to adjust the status of network cards (such as primary / standby switching), binding modes, or link aggregation policies to optimize network performance or handle faults. The execution of the control instructions helps to maintain the consistency and high availability of network configurations, while reducing unnecessary link adjustments and avoiding waste of resources. However, when the communication link has been adjusted, the system will disable the modification of the current configuration information by the control instructions. This is because physical or logical adjustments of the link have occurred between the two hosts. If the control instructions are used to modify the configuration at this time, it may lead to inconsistency between the configuration information and the actual link status, thereby causing network connection failures or data transmission anomalies. To avoid this problem, the system directly changes the interface attributes of the first host or the second host based on the parameter information to ensure the matching of the configuration information and the link status and maintain the stable operation of the network.
[0058] Optionally, after detecting a communication link adjustment, the system no longer relies on control instructions to modify configuration information. Instead, it directly changes the interface attributes of the first host or the second host based on parameter information. This may include operations such as updating the MAC address table, adjusting the working mode of the network card, or reconfiguring the flow table of the virtual switch. The direct application of parameter information changes avoids configuration inconsistency problems caused by inappropriate execution timing of control instructions, ensuring the timeliness and accuracy of network configuration.
[0059] Through the above embodiments, while ensuring that network configuration information can be updated and adjusted in a timely manner, it effectively prevents configuration conflicts that may occur when the communication link state changes, improving the stability and security of the system. This dynamic adjustment strategy based on parameter information not only adapts to the real-time changes of the network environment but also ensures the consistency of network configuration and the high availability of communication links in a direct-connected host architecture, providing a more flexible and reliable network management solution for small-scale deployments in a hyper-converged environment.
[0060] In an exemplary embodiment, the method for regulating a target policy for sending target data between a first host and a second host based on a network card bonding mode includes: when it is determined that the network card bonding modes of the first host and the second host are both active-backup policy modes, determining the network card information of the network cards carried by the first host and the second host based on first configuration information, where the network card information at least includes: the network card names of the primary network cards and the standby network cards in the first host and the second host; identifying the differences between the network card information and the original network card information pre-stored in the converged networking system; and determining the target policy to be enabled according to the difference results.
[0061] In an exemplary embodiment, determining the target policy to be enabled according to the difference results includes: when the difference results indicate that there are no changes in the connections of the primary network cards and the standby network cards between the first host and the second host, determining that the data transmission interfaces of the first host and the second host are working properly, and the first target policy is to be executed, where the first target policy is to enable the data transmission interface to perform target data transmission; when the difference results indicate that there is at least one connection change in the connections of the primary network cards and the standby network cards between the first host and the second host, determining that the data transmission interfaces of the first host and the second host are working abnormally, and the second target policy is to be executed, where the second target policy is to suspend the use of the data transmission interface and instruct the second host to perform a primary-standby network card switching operation for adjusting interface parameters.
[0062] In an embodiment, the converged networking system regulates the data transmission strategy by analyzing the network card binding modes of two hosts. If both modes are the active backup strategy, the system will compare the current network card information with the pre-stored information. When there is no change, the first strategy for normal data transmission is enabled; if a connection change is detected, the second strategy is executed, that is, data transmission is paused and the standby network card is triggered to switch to ensure link reliability. This mechanism dynamically adjusts the data path in a hyper-converged network without a switch, avoiding communication failures caused by configuration mismatches and improving the network's adaptability and stability.
[0063] In an exemplary embodiment, after determining that the data transmission interfaces of the first host and the second host are working properly and the first target strategy is to be executed, the method further includes: obtaining the first address corresponding to the first host and the second address corresponding to the second host; in the case where the character length of the first address is greater than or equal to the character length of the second address, prohibiting the activation of the primary / standby network card switching operation corresponding to the first host; in the case where the character length of the first address is less than the character length of the second address, determining to perform the primary / standby network card switching operation on the first host.
[0064] Optionally, the converged networking system first obtains the address information of the first host and the second host, which usually refers to the MAC address, which is a hardware address used to uniquely identify a device in the network. Next, the converged networking system compares the character lengths of these two addresses. It should be noted that the "character length" can be understood as the representation length of the MAC address, that is, the size of the address value. However, usually the length of the MAC address is fixed (for example, when represented in hexadecimal, it is usually 12 characters). When some parts of the MAC address are zero, the zero characters can be omitted, resulting in different actual display lengths. Based on the comparison result of the address lengths, if the address length of the first host is greater than or equal to that of the second host, the converged networking system will prohibit the first host from switching the primary / standby network card. This is intended to avoid the possible link instability or communication failure caused by both parties switching the network card roles simultaneously. On the contrary, if the address length of the first host is less than that of the second host, the converged networking system will determine that the first host needs to perform the primary / standby network card switching operation. This mechanism ensures that when the data transmission interface is working properly, only one party will perform the primary / standby network card switching, which not only simplifies the network management process but also improves the network's stability and reliability, avoiding the short-term communication interruption caused by both parties switching simultaneously, and providing a more intelligent and flexible network link management solution in a hyper-converged environment, especially in a scenario without a switch.
[0065] Through the above embodiments, not only the intelligent synchronization of network configuration information is achieved, but also conflicts that may occur during network configuration synchronization are effectively avoided by comparing the address lengths, ensuring the continuity and reliability of communication between the two hosts.
[0066] In an exemplary embodiment, a target policy for regulating the transmission of target data between a first host and a second host based on a network card bonding mode includes: when it is determined that the network card bonding modes of both the first host and the second host are in the dynamic link aggregation mode, determining the working status information of the primary network card and the standby network card in the first host and the second host based on the first configuration information; when the working status information indicates that at least one host has an abnormality, disabling the currently enabled network cards of the first host and the second host, and waiting to execute a third target policy, where the third target policy is to use network cards other than the disabled network cards to transmit the target data between the first host and the second host.
[0067] In an alternative embodiment, the converged networking system adopts an intelligent regulation strategy based on the network card bonding mode (dynamic link aggregation mode) to ensure the reliability and efficiency of data transmission between the first host and the second host. Specifically, when the network cards of both hosts are bonded through dynamic link aggregation (mode4), the converged networking system will, based on the first configuration information, i.e., the current network configuration status, monitor and determine the working status information of the network cards, including but not limited to the network card rate, duplex setting, error rate, and LACP (Link Aggregation Control Protocol, abbreviated as LACP, link aggregation control protocol) negotiation status, etc. Specifically, the process is as follows:
[0068] In the dynamic link aggregation mode, the converged networking system periodically checks the working status of the primary network card and the standby network card in the first host and the second host. This includes but is not limited to checking the physical connection status of the network interface, the negotiation result of the LACP protocol, the traffic status of the network interface, etc. The converged networking system analyzes the working status information. If it is found that there is an abnormality in the network card on at least one host, such as a physical connection interruption, an LACP negotiation failure, or a network card failure, etc., the currently enabled network cards will be immediately disabled. This action aims to prevent data from being transmitted through the problematic link and avoid data loss or communication delay. After detecting the abnormality and disabling the relevant network cards, the converged networking system will automatically switch to the third target policy. This policy uses network cards other than the disabled network cards to transmit data. This usually means that the converged networking system will select another normally working network card as the new data transmission link to maintain the communication continuity between the first host and the second host. If both hosts have multiple network cards, the converged networking system will select the standby network card with the best status for data transmission.
[0069] By implementing the above-described embodiments, it is possible to automatically adapt to changes in the network environment. Especially in the multi-network card dynamic link aggregation mode, it can quickly detect and respond to network card anomalies, ensuring high availability and high efficiency of data transmission. Even in a converged networking environment without using a physical switch, it can effectively manage and maintain network links, guaranteeing service continuity and user experience. This mechanism is particularly important for application scenarios that require high bandwidth and low latency, as it can automatically identify and eliminate network faults without sacrificing performance, maintaining the stable transmission of data streams.
[0070] In an exemplary embodiment, before obtaining the target packet carrying the first configuration information, the above method further includes: determining the communication type deployed between the first host and the second host; and activating a target service for generating the target packet when the communication type indicates that the target object is set to no-switch communication in the converged networking system.
[0071] In this exemplary embodiment, the converged networking system first identifies the communication type adopted between the first host and the second host. When it is confirmed that the communication type is the no-switch direct connection mode, the converged networking system will automatically activate a specific service, which is responsible for creating and sending the target packet. The target packet contains the first configuration information for real-time synchronization of the configuration status of the network interfaces of the two hosts, such as the primary / backup status of the network cards, MAC addresses, binding modes, etc. Activating the target service is a key step to ensure network configuration consistency and high availability of the communication link between the two hosts in a no-switch environment. In short, the converged networking system automatically adjusts the service status according to the communication type, thereby effectively managing and transmitting configuration information in a specific network architecture, avoiding network faults and optimizing data communication.
[0072] In an exemplary embodiment, when a communication link has been established between the first host and the second host, after determining the target packet carrying the first configuration information, the above method further includes: obtaining the real-time transmission quality between the first host and the second host; increasing the sending frequency of the target packet and increasing the packet transmission duration of the target packet when the real-time transmission quality is less than the preset transmission quality; and decreasing the sending frequency of the target packet and decreasing the packet transmission duration of the target packet when the real-time transmission quality is greater than or equal to the preset transmission quality.
[0073] In this embodiment, after the communication link is established between the two hosts, the converged networking system not only obtains the packets carrying the configuration information, but also dynamically monitors the real-time transmission quality of the link. If the detected transmission quality is lower than the preset standard, the converged networking system will take measures to increase the sending frequency of the packets and extend the transmission duration of the packets to enhance the stability of the link and ensure the timely and accurate synchronization of the configuration information. Conversely, if the transmission quality meets or exceeds the preset standard, the converged networking system will reduce the packet sending frequency and shorten the transmission duration to reduce the network load and optimize the communication efficiency. This dynamic adjustment strategy can balance the timeliness of information synchronization and the effective utilization of network resources according to the actual network situation, and improve the flexibility and reliability of the switchless hyper-converged networking.
[0074] In one exemplary embodiment, after obtaining the real-time transmission quality between the first host and the second host, the method further includes: parsing the real-time transmission quality; generating a first warning message for prompting to switch the operating network card of the first host when the parsing result indicates that the transmission of the first host is abnormal; and generating a second warning message for prompting to switch the operating network card of the second host when the parsing result indicates that the transmission of the second host is abnormal.
[0075] In this exemplary embodiment, the converged networking system not only obtains and monitors the real-time transmission quality between the first host and the second host, but also further parses this data to determine whether the network transmission state is abnormal. The parsing process may include, but is not limited to, calculating key performance indicators such as the packet loss rate, latency, and jitter. If the parsing result indicates that the data transmission of the first host is abnormal, such as an increase in the packet loss rate or an increase in latency, the converged networking system will generate a first warning message, prompting that it is necessary to switch the currently operating network card of the first host, which may be switched from the primary network card to the standby network card to restore the communication quality. Similarly, if the data transmission of the second host is abnormal, the converged networking system generates a second warning message, indicating that the second host performs the corresponding network card switch. The generation and processing of these warning messages enable the switchless hyper-converged networking to actively detect and respond to network failures, ensure the continuity and high efficiency of data transmission through rapid network card switching, thereby improving the overall robustness of the network and the user experience. This intelligent monitoring and response mechanism based on real-time transmission quality is particularly important for maintaining the normal operation of the network in a high-load or unstable environment.
[0076] In one exemplary embodiment, after the communication link is established between the first host and the second host and before determining the target packet carrying the first configuration information, the method further includes: deploying sub-controllers in the first host and the second host; obtaining the original network card information of the corresponding nodes of different hosts before networking through the sub-controllers; and storing the original network card information in the target database of the main controller associated with the converged networking system, where the sub-controllers are connected to the main controller.
[0077] Sub - controllers are respectively deployed inside the first host and the second host. These sub - controllers, as nodes for data collection and preliminary processing, are responsible for monitoring and obtaining the original network card information of the hosts, including the name of the network card, MAC address, current binding mode, etc. The sub - controllers start working immediately after deployment, collecting the network card information of the hosts before network formation, which reflects the initial state of the network configuration. The collected information is not limited to the currently active network cards, but should also include all available network interfaces to comprehensively understand the initial structure and capabilities of the network. The collected original network card information is then sent to the main controller associated with the converged networking system and stored in the target database of the main controller. There is a connection relationship between the main controller and the sub - controllers, and they communicate through the management network. The target database of the main controller is used to store the key configuration and status data of the system, including but not limited to network card information, network interface status, link quality, etc., for the system to perform fault detection, performance optimization, and configuration information synchronization.
[0078] Through the above - mentioned embodiments, the deployment and communication mechanism of the sub - controllers and the main controller ensures that in a hyper - converged networking without switches, the original state information of the network can be accurately recorded and managed, providing basic data support for subsequent network monitoring, fault switching, and configuration information synchronization. By centrally managing this information, the main controller can more effectively allocate and optimize network resources, improving the intelligent level of the entire system during network configuration changes and fault recovery processes. This architecture can help the system maintain a stable communication link in a complex network environment, ensuring business continuity and data transmission security.
[0079] In an exemplary embodiment, after obtaining the original network card information of the corresponding nodes of different hosts before network formation through the sub - controllers, the above - mentioned method further includes: when the original network card information also contains the usage records and fault records of each network card in different hosts, evaluating the remaining service life of the network card according to the usage records and fault records; determining the update time for replacing the network card hardware of different hosts according to the remaining service life and the normal service life corresponding to the network card.
[0080] In an alternative embodiment, after the converged networking system obtains the original network card information of different hosts before network formation through the sub - controllers, it further uses the network card usage records and fault records in this information for in - depth analysis and prediction of the network card health status. The specific steps are as follows:
[0081] Step 42. Collect usage records and fault records: The original network card information not only includes the basic configuration and status of the network card, but also contains detailed usage records (such as data transfer volume, running time, etc.) and fault records (such as the number of anomalies, fault types, etc.). These records provide a comprehensive perspective on the actual operation of the network card and are important data sources for evaluating the health status of the network card and predicting the remaining service life.
[0082] Step 44. Evaluate the remaining service life: The converged networking system evaluates the remaining service life of each network card by using data analysis and prediction algorithms based on the collected usage and fault records. Generally, the evaluation of the remaining service life will consider factors such as the wear degree of the network card, the relationship between the failure rate and time, and the type and model of the network card. This evaluation process aims to give early warnings of possible network card failures, avoid sudden network interruptions, and improve the stability and reliability of the converged networking system.
[0083] Step 46. Determine the update time: After evaluating the remaining service life of the network card, the converged networking system will compare it with the normal service life of the network card. The normal service life refers to the time that the network card is expected to continue running under the condition of no obvious faults and reasonable use. Based on the comparison between the remaining service life and the normal service life, the converged networking system determines the replacement time of the network card on each host, that is, the update time. If the remaining service life is much lower than the normal service life, the converged networking system may plan to replace the network card hardware in advance to ensure that the network device is updated before a failure and avoid service interruption. On the contrary, if the remaining service life is close to the normal service life, the converged networking system can postpone the update, effectively utilize the existing hardware resources, and reduce unnecessary cost expenditures.
[0084] Through the above embodiments, the mechanism for evaluating the remaining service life of the network card based on usage records and fault records and determining the update time enables the hyper-converged networking solution without a switch to not only focus on the immediate network performance and fault switching, but also be able to manage the life cycle of network hardware prospectively. By means of predictive maintenance strategies, it reduces the impact of hardware failures on network services, while reasonably planning the hardware update cycle to achieve efficient utilization of resources and cost control. This mechanism is especially applicable to network environments that require high availability and long-term stable operation, such as data centers, enterprise internal networks, etc. Through intelligent hardware management, it improves the robustness and economy of the overall network architecture.
[0085] In an exemplary embodiment, after sending a target update message to synchronize and adjust the configuration information of the first host and the second host in the running state, the above method further includes: determining the adjustment results of the first host and the second host; and identifying the target update message according to the adjustment results to set the usage duration of the target update message.
[0086] In an exemplary embodiment, identifying a target update message according to an adjustment result includes: when the adjustment result indicates that the adjustment of the first host or the second host fails, identifying the target update message as an invalid message; when the adjustment result indicates that the adjustments of both the first host and the second host are successful, identifying the target update message as a valid message.
[0087] Among them, the execution subject of the above steps may be a main controller, a terminal, etc., but is not limited thereto.
[0088] To facilitate understanding of the implementation manners of the present application, relevant scenarios are now explained, but this does not limit the present application.
[0089] Figure 3 FIG. 10 is a topological schematic diagram of a general hyper-converged network according to an embodiment of the present application. In this environment, there are two nodes in total: host 1 (i.e., host1) and host 2 (i.e., host2). Each of the two hosts has three types of networks: a management network, a service network, and a storage network. Among them, the management network is a network used by users to control the converged networking system, synchronize configurations between nodes of the converged networking system, and complete user operation instructions. The service network is generally provided for virtual machines. Users using virtual machines can access the service network to enable communication between virtual machines and other nodes or networks outside the converged networking environment. The storage network is an internal network of the converged networking system used to connect each host node, so that the storage of these hosts logically forms a storage pool, which is used as the storage resource of the converged networking system and allocated to other resources such as virtual machines. Among these three networks, the management network generally does not require a very high bandwidth, and an ordinary gigabit network (1G) can meet the requirements, but it needs to have high reliability. The service network generally depends on the specific business requirements of users. If there is a large amount of data transmission such as video backup in the business, a bandwidth of 10 Gigabit (10G) or even higher (25G) needs to be configured. If it is just some ordinary data transmission without high bandwidth requirements, a gigabit network can also meet the conditions. For the storage network, because it involves reading, writing, backup, etc. of virtual machine disks, the bandwidth requirement is relatively high. Generally, a bandwidth of 10 Gigabit starts, and 25G is also a commonly used bandwidth. The bandwidth mentioned here does not only refer to the rate upper limit of the network card, but the rates of all devices in the entire link, such as network cards, optical fibers, physical switches, etc. need to be satisfied. Therefore, the investment for users is also relatively large.
[0090] Networks of the same type need to communicate with each other. For example, Figure 3In the traditional design of the shown topology diagram, the connection between hosts needs to be forwarded through a physical switch. In order to improve network reliability or increase network bandwidth, each network often uses dual network cards and accesses the physical switch through binding. Usually, these two network cards are respectively connected to two physical switches. When a physical switch or a network card fails, the traffic can completely communicate normally through the other network card to ensure the reliability of the link. When binding two network cards, there are multiple binding modes. Generally, only mode1 and mode4 are the most commonly used. Among them, mode1 is the active backup strategy, and the specific mode is that only one device is in the active state. When one fails, the other immediately switches from backup to the main device. This mode provides fault tolerance. Mode4 is the IEEE 802.3ad dynamic link aggregation mode, and the specific mode is to create an aggregation group that shares the same speed and duplex settings. This mode provides fault tolerance. Each device needs to re-acquire speed and full-duplex support based on the driver; if a switch is used, the switch also needs to enable the 802.3ad mode.
[0091] It should be noted that in the Mode1 mode, only one network card is working, and the other network card is in a standby state and is enabled when a failure occurs. In the mode4 mode, the switch also needs to make corresponding configurations to bind the two network cards into an aggregation group. The two network cards interact and negotiate with the switch through LACP packets to complete the link aggregation. The actual traffic will exist in both network cards. When a network card fails, all traffic will switch to be sent through one of the network cards. In fact, both of the above two states have the same problem, that is, the original direct interaction object of the network card is the physical switch.
[0092] Figure 4 It is a schematic diagram of the traffic forwarding path when binding dual network cards in a general hyper-converged network according to an embodiment of the present application. As Figure 4 shown, in the mode1 mode, the two network cards of a certain type (management / business / storage) network of host a are bound together and logically become a network port. In this case, only one main network port is receiving and sending packets. Suppose port a1 is the main network port, then its traffic may flow along one of the paths of 1-1 or 1-2, which depends on which network port is the main network port in host b. If b1 is the main network port, then the traffic flows along 1-1; if b2 is the main network port, then the traffic flows along 1-2; similarly, when a2 is the main network port of host a, there are also two types of traffic. So there are a total of 4 possible traffic flows. However, when not using a switch (mainly for the storage network and some business networks, because users need to control and manage the hyper-converged system through the management network, so the management network still needs a switch), but directly connecting the network ports of two hosts one by one, as Figure 9As shown in the figure: there are only two traffic paths. When the a1 network card is the primary network card, the b1 network card must also be the primary network card; when the a2 network card is the primary network card, the b2 network card must also be the primary network card. Otherwise, when the primary network card of host a is connected to the backup network card of host b, the network between the two hosts will be disconnected (the host will not send data packets from the backup network card, nor will it hand over the service data packets received on the backup network card to the relevant applications). Since the selection of the primary and backup network cards on the host is random at the beginning, and when the network fluctuates, the primary and backup network cards will be automatically switched, and users can also manually control the switching of the primary and backup. However, there is no mechanism between the two hosts to ensure the consistency of the primary and backup between them. Therefore, when using mode1, there is a 50% probability that the two hosts will be disconnected.
[0093] In mode4 bonding mode, both network cards can send and receive traffic, and the two network cards can establish link aggregation through LACP packets. However, if one network card fails, a link can no longer be used to send and receive data. This situation is the same as mode1, and the hosts on both sides also need to maintain consistency.
[0094] Therefore, the above-mentioned ordinary hyper-converged network cannot operate in a scenario where no switches are used at all and some users of the business network do not use switches. In order to solve the above problems, an optional embodiment of the present application proposes a minimalist hyper-converged network topology diagram without switches. Figure 5 is a schematic diagram of a switch-free simplified hyper-converged network topology according to an embodiment of the present application, such as Figure 5 As shown. A mechanism is set up for the simplified hyper-converged network to ensure that two hosts periodically send messages to each other to notify each other of their specific configurations. This mechanism will also immediately notify the other party of its configuration changes when some special configurations change. Using such a mechanism, the links of both hosts can respond in time when active switching or failover occurs to avoid network interruption. This fusion system mechanism includes the following modules: message sending module, message receiving module, and configuration change module.
[0095] Optional, message sending module, this module designs a new layer 2 message format, the specific format is as follows Figure 6 As shown, Figure 6It is a schematic structural diagram of an IFACESYND message format according to an embodiment of the present application; specifically, in the header of the Ethernet frame, there is a type field used to indicate what type of message is encapsulated in the middle. For example, 0x0806 is used to represent an ARP message, and 0x0800 is used to represent an IP message. In the present application, 0xC001, which has not been used currently, is used to represent the IFACESYND message defined in the present application, and the IFACESYND unit is encapsulated in the Ethernet frame. In the IFACESYND unit defined in the present application, it is further divided into multiple records. Each record can use up to 32 bytes (byte, each byte includes 8 bits). Among them, the first 3 bits of the first byte represent the type of this record (a total of 8 types), and the 4th to 8th bits represent the length of the data part of this record (a total of 32 bytes can be represented). The specific value is set according to the content length of the actually encapsulated data field, so that the receiver can recover each record from the message after receiving the message. The data part of each record is used to carry the true information of different items of the current device. Because the content of these item information is different, they may have different lengths. The following regulations are made for these record types in the present application: The first 3 bits can represent 8 record types as shown in Table 1 respectively:
[0096] Table 1
[0097]
[0098] Among them, "name" represents the name of the current device (network card), "states" represents the status of the network card, "mac_addr" represents the MAC address of the current device, and "bond_type" represents whether the current bond belongs to the ovs type or the linux bond. "bond_name" represents the current bond name, "bond_mode" represents the mode of the bond, "active_slave" represents the current primary network card (valid when ovsbond is active-backup or linux bond is mode1), and "slave_name" represents all the network cards in the bond to which the current device belongs, separated by spaces. Among them, "slave_name" can appear repeatedly in the message in the form of multiple records because there are two or more slave network cards in a bond. The above is the definition of the message format used when sending the message. The specific content of the message still needs to be collected or defined: Destination MAC address: Use the multicast address 01:80:c2:00:00:a0. Source MAC address: That is, the MAC address of the current device; The records such as "name", "states", and "mac_addr" in the DEVAD unit correspond to the name, status, and MAC address set for the current network card, which can be obtained using simple linux commands such as ifconfig or iplink, or from the configuration file of the current network card. The subsequent fields of "bond_type", "bond_name", "bond_mode", "active_salve", and "slave_name" are closely related to the function of this application and can be obtained from the configuration files of network cards and bonds in linux, or through... After the message sending module collects these data, it fills in the corresponding information into Figure 6 the IFACESYND message shown, encapsulates them into an Ethernet frame, and finally sends them out by this network card. The message sending module starts to calculate at this time and re-collects and sends the above data every 30 seconds. This module runs continuously in the form of a service as long as the user selects the no-switch deployment method when deploying the hyper-converged system.
[0099] Optionally, the message receiving module Figure 7 is a schematic diagram of a separation of control and forwarding network used in hyper-convergence according to an embodiment of the present application; as Figure 7As shown in the figure, after the host network cards of the business network or storage network are bound, they will be connected to a virtual switch. In fact, this switch is an OVS switch that supports the OpenFlow protocol. Through the OpenFlow protocol (i.e., open flow protocol), the network can actually be divided into a control layer and a forwarding layer. The control layer sends a forwarding flow table to the virtual switch through the OpenFlow protocol to control the flow of data packets in the virtual switch. The forwarding layer is only responsible for forwarding the instructions of the control layer and does not make any decisions. Figure 8 As shown in the figure: Network establishment or traffic filtering between virtual machines is done by the control layer sending flow tables to the forwarding layer, and then the forwarding layer sends the virtual machine traffic to the destination port. This is the forwarding principle of the SDN network. This principle can be used to design the receiving module. Figure 8 is a schematic diagram of IFACESYND message interaction according to an embodiment of the present application, such as Figure 8 As shown in the figure, each host in the hyper-convergence has this virtual switch, and these switches are connected to the controller through the local proxy of the controller in the host. In this way, a flow table is sent down to the virtual switches in the two hosts through the controller. The content of the flow table is as follows:
[0100] In all traffic entering the virtual machine from the bond interface, the data packets with type 0xC001 in the layer 2 frame header are forwarded to the controller for analysis. If both parties are set to mode 1, after receiving this data packet, the controller obtains the name of the network card encapsulated in the data packet, bond_name, active_slave, and whether the bond_name and active_slave corresponding to the corresponding virtual switch in this node are directly connected (the original direct connection data is set when the hyper-converged system is deployed and saved after passing the system verification). If not, the message sending module immediately sends the network card related information of this host to the other party. And start to compare the MAC address of this node with the MAC address of the other node. If the MAC address of this node is smaller, the configuration change module starts to switch the master and backup of the corresponding bond on this node. If the MAC address of this node is larger, no operation is performed. The purpose of this is to prevent both parties from finding that there is a problem with the link at the same time and switching at the same time, which will make the fault unable to be eliminated. If both parties are set to mode 4, after receiving this data packet, the controller obtains the name of the network card encapsulated in the data packet, bond_name, state. If the state state is not 0, it means that there is a problem with the state of the other party's network card. Then the configuration change module is directly called to set the state of the network card of this host that is directly connected to the other party's problematic network card to down and no longer use it.
[0101] Optionally, the function of the configuration change module is relatively simple, and the specific functions are as follows: If the current node is configured with mode1, when the packet receiving module of this node calls the configuration change module, the master-backup switch operation is performed. If it is configured with mode4, the network card status is set to down, and the system will no longer send data through this network card.
[0102] To more clearly elaborate on the content of this application, the entire process will be elaborated in detail next.
[0103] The deployment of the hyper-converged system is a relatively complex process. At the beginning of the deployment, if the service network or the storage network (which can be a separate storage network or both without switches at the same time, determined by the user's actual situation) is deployed without switches, then because the physical network (the optical fiber and optical module between the hosts) between the two hosts has been connected, and the connection between the current storage network or service network has been determined. Therefore, when deploying, it is necessary to select how the network cards between each pair of hosts are connected. Figure 9 It is a schematic diagram of the traffic path during the binding of dual network cards in a minimalist hyper-converged network without switches according to an embodiment of the present application; as Figure 9 shown, a1-b1, a2-b2. These settings are to tell the system which two ports can communicate with each other, and nothing else, because there is no switch. Then the system monitors these configurations. In the system, because IPv6 is automatically started, the controller will randomly select a host and send an IPv6 ping packet from the specified network card, such as a1, to the direct-connected network card of another host, such as the IPv6 address of b1. If there is a response, it means that the user's configuration is correct. If there is no response, it means that the network is not connected, and the user needs to re-enter until the detection passes. The IPv6 address used here is obtained by the controller local proxy deployed in each host as shown in Figure 9 shown in each node. The controller proxy deployed in each host can receive the instructions of the controller and also receive which network card of the other party corresponds to a certain network card in this host. For example, the a1 card in this host corresponds to the b1 card of the other party. Then, according to the instructions, the virtual switch is configured accordingly. Then, the system saves these data until the user actively modifies it (such as modifying the previously saved configuration after changing the port connected to the optical fiber). These data can be queried by the controller in the subsequent process.
[0104] After the deployment is completed, if the system detects that the user has configured a switchless deployment during deployment, it will automatically start the ifacesynd service on the local machine. This service enables a specific network card (the network card configured by the user during deployment) to periodically send IFACESYND messages externally (since it is a direct connection, it is sent to the corresponding network card of another host) using the aforementioned message sending module. This message carries information such as the name, bond name, and bond mode as described above.
[0105] At the same time, in addition to starting the above service, when the system detects that the user has configured a switchless deployment during deployment, it will also send instructions to the controller agents on each host through the controller (the controller is deployed on the host, logically independent but actually deployed in host 1 or host 2, and the controller can drift between the two nodes and seamlessly switch services. The controller connects to each host through the management network) to issue flow tables in the message receiving module to intercept the IFACESYND messages sent by the other party and transfer the intercepted messages to the controller agent. Both hosts will send and receive IFACESYND messages.
[0106] The controller agent analyzes the message. If both parties are in mode1, it will then compare with its own configuration and the configuration sent by the controller. Finally, it will independently issue corresponding instructions. For example, after analyzing the IFACESYND message received by network card a1, the controller code finds that the other party is network card b2, which does not match the configuration (a1 - b1) sent by the controller to itself, indicating that the user has modified the wiring after the deployment but has not made corresponding modifications to the configuration. In this case, it is necessary to notify the controller and stop this service until the user has completed the modification. If they match, then the controller agent checks whether it is the primary network card (active_slave) of the bond, and then checks whether the other party's network card is the primary network card in the bond of the other host. If the two are inconsistent, it means that the primary network card of one host is connected to the backup network card of the other host. Then one of them needs to switch. Finally, the controller agent compares the MAC address of this network card with the MAC address of the network card directly connected to the other party. If its own MAC is larger, no modification is made. If the MAC of its own network card is smaller, it will switch the network card of this host according to the network card correspondence sent by the controller to make the primary network card of this host consistent with the other party.
[0107] If both parties are in mode4, it is necessary to check whether the state carried in the message is normal. If it is an abnormal state, it means that there is a problem with the state of the card directly connected to this network card by the other party, and then this card of its own will also be set to the DOWN state, so that this host will no longer send or receive data through this network card, and this link is equivalent to no longer existing, and only the good link is used.
[0108] In summary, through the process of the above overall embodiments, the technical effect of establishing a reliable and bandwidth-guaranteed link between two hosts without passing through a physical switch can be achieved.
[0109] In summary, through a minimalist hyper-converged networking method without a switch, a mechanism is used to ensure that without a switch, two hosts notify each other of their specific configurations by periodically sending messages. This mechanism will also immediately notify the other party of any configuration changes when certain special configurations change. Using such a mechanism, the links between the two hosts can respond in a timely manner during active or failure handovers, avoiding network interruptions. At the same time, this message is an Ethernet layer 2 message, which is periodically sent by the network card and only carries configuration information related to itself; the interaction between the hosts can complete the sending of the message and only receive and process this type of message designed in the above embodiments among multiple messages. Furthermore, other hosts can compare the configurations through the messages to determine whether the configurations of both parties can communicate normally. When the configurations of both parties do not match the expectations, a method of determining which party should make adjustments based on the MAC is used to avoid the problem that communication failures cannot be eliminated due to both parties making adjustments. By adopting the above implementation methods, the reliability and stability of the network are greatly improved.
[0110] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present application.
[0111] In this embodiment, a configuration information synchronization device is also provided. This device is used to implement the above embodiments and preferred implementation methods, and those that have been described will not be repeated here. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0112] Figure 10 is a structural block diagram of the configuration information synchronization device according to an embodiment of the present application, as Figure 10 shown, the device includes:
[0113] A determination module 1002, configured to determine a target message carrying first configuration information when a communication link has been established between a first host and a second host, where the target message is used to synchronize configuration information between the first host and the second host;
[0114] A regulation module 1004, configured to confirm a network card binding mode between the first host and the second host based on the first configuration information, and regulate a target policy for sending target data between the first host and the second host based on the network card binding mode;
[0115] A modification module 1006, configured to determine a control instruction for adjusting a first interface attribute corresponding to the first host or a second interface attribute corresponding to the second host according to the target policy, and modify the first configuration information based on the control instruction to obtain second configuration information;
[0116] A synchronization module 1008, configured to use the second configuration information to replace the first configuration information as the content carried in the target message, obtain a target update message, and send down the target update message to synchronize and adjust the configuration information of the first host and the second host in the running state.
[0117] With the above device, on the basis that a communication link has been established between the first host and the second host, real-time synchronization of configuration information is achieved by sending and receiving target messages, ensuring that even in a direct connection environment without a switch, high availability and high performance of the network can be maintained. Further, a target message carrying the first configuration information is determined and sent for synchronizing configuration data between two hosts; then, the binding mode of the network cards on both sides is confirmed based on the first configuration information included in the message (such as mode1 or mode4), and the data sending policy is regulated accordingly to ensure reliable data transmission and timely response to faults; subsequently, a control instruction is dynamically generated according to the target policy to adjust the network interface attributes of the first host or the second host to respond to configuration changes or network anomalies; finally, a target update message is generated through the updated second configuration information to achieve instant synchronization and update of the configuration information and maintain the consistency of the network configuration and optimize the network operation efficiency.
[0118] In an exemplary embodiment, the above determination module is further configured to obtain a message format template between the first host and the second host; the message format template includes: a frame header field, an interface synchronization message field, and a frame check sequence field; fill the message format template with target bytes corresponding to the first configuration information, and encapsulate the filled message format template in an Ethernet frame to obtain a target message.
[0119] In an exemplary embodiment, the above-mentioned determination module is further configured to determine the byte lengths corresponding to different types of fields in the message format template and the target number of records allowed for the interface synchronization message fields; divide the filling positions of different types of fields in the message format template according to the byte lengths and the target number; and complete the filling of the message format template based on the filling positions and the target bytes corresponding to the first configuration information.
[0120] In an exemplary embodiment, the above-mentioned determination module is further configured to parse the first configuration information, and determine the target source address corresponding to the first host, the target destination address corresponding to the second host, and multiple configuration records between the first host and the second host according to the parsing result. Each configuration record at least includes: the configuration subtype corresponding to each host, the length of the configuration record corresponding to each host, and the data of the configuration record corresponding to each host; fill the frame header fields in the message format template according to the target source address and the target destination address, where the frame header fields at least include: destination address, source address, and type field; the type field is used to indicate the type of the encapsulated bytes in the current message format template; and fill the interface synchronization message fields in the message format template according to the multiple configuration records.
[0121] In an exemplary embodiment, the above-mentioned device further includes: a recording module, configured to record the initial sending time of the target message after determining the target message carrying the first configuration information; calculate the synchronization period of the target message based on the initial sending time and a preset interval duration, where the preset interval duration is a time configuration parameter in the deployed converged networking system, and the synchronization period is used to indicate the frequency of repeated synchronization of the target message between the first host and the second host.
[0122] In an exemplary embodiment, the above-mentioned device further includes: an instruction module, configured to determine a control instruction for adjusting the first interface attribute corresponding to the first host or the second interface attribute corresponding to the second host according to a target policy, and receive parameter information input by an operation and maintenance object before modifying the first configuration information based on the control instruction to obtain the second configuration information; determine whether the communication link between the first host and the second host is adjusted according to the parameter information; allow the use of the control instruction to modify the first configuration information when the communication link is not adjusted; prohibit the use of the control instruction to modify the first configuration information when the communication link has been adjusted, and change the first interface attribute corresponding to the first host or the second interface attribute corresponding to the second host based on the parameter information.
[0123] In an exemplary embodiment, the above-mentioned regulation module is further configured to, when determining that the network card binding modes of the first host and the second host are both active backup policy modes, determine the network card information of the network cards carried by the first host and the second host based on the first configuration information, where the network card information at least includes: the network card names of the primary network cards and the standby network cards in the first host and the second host; identify the differences between the network card information and the original network card information pre-stored in the converged networking system; and determine the target policy to be enabled according to the difference results.
[0124] In an exemplary embodiment, the above-mentioned regulation module is further configured to, when the difference results indicate that there are no changes in the primary network card connection and the standby network card connection between the first host and the second host, determine that the data transmission interfaces of the first host and the second host are working properly, and the first target policy to be executed, where the first target policy is to enable the data transmission interface to perform target data transmission; when the difference results indicate that there is at least one connection change in the primary network card connection and the standby network card connection between the first host and the second host, determine that the data transmission interfaces of the first host and the second host are working abnormally, and the second target policy to be executed, where the second target policy is to suspend the use of the data transmission interface and instruct the second host to perform the primary-standby network card switching operation of adjusting the interface parameters.
[0125] In an exemplary embodiment, the above-mentioned device further includes: an operation module, configured to, after determining that the data transmission interfaces of the first host and the second host are working properly and the first target policy is to be executed, obtain the first address corresponding to the first host and the second address corresponding to the second host; when the character length of the first address is greater than or equal to the character length of the second address, prohibit activating the primary-standby network card switching operation corresponding to the first host; when the character length of the first address is less than the character length of the second address, determine to perform the primary-standby network card switching operation on the first host.
[0126] In an exemplary embodiment, the above-mentioned regulation module is further configured to, when determining that the network card binding modes of the first host and the second host are both dynamic link aggregation modes, determine the working state information of the primary network card and the standby network card in the first host and the second host based on the first configuration information; when the working state information indicates that at least one host has an abnormality, disable the currently enabled network cards of the first host and the second host, and the third target policy to be executed, where the third target policy is to use other network cards except the disabled network cards to perform the transmission of target data between the first host and the second host.
[0127] In an exemplary embodiment, the above device further includes: an activation module, configured to determine the communication type deployed between the first host and the second host before obtaining a target message carrying first configuration information; and activate a target service for generating the target message when the communication type indicates that the target object is set to no-switch communication in the converged networking system.
[0128] In an exemplary embodiment, the above device further includes: a transmission module, configured to determine the real-time transmission quality between the first host and the second host after determining a target message carrying first configuration information when a communication link has been established between the first host and the second host; increase the sending frequency of the target message and increase the message transmission duration of the target message when the real-time transmission quality is less than a preset transmission quality; and decrease the sending frequency of the target message and decrease the message transmission duration of the target message when the real-time transmission quality is greater than or equal to the preset transmission quality.
[0129] In an exemplary embodiment, the above device further includes: an alarm module, configured to parse the real-time transmission quality after obtaining the real-time transmission quality between the first host and the second host; generate a first alarm message for prompting to switch the operating network card of the first host when the parsing result indicates that the first host has an abnormal transmission; and generate a second alarm message for prompting to switch the operating network card of the second host when the parsing result indicates that the second host has an abnormal transmission.
[0130] In an exemplary embodiment, the above device further includes: a storage module, configured to deploy a sub-controller in the first host and the second host before determining a target message carrying first configuration information when a communication link has been established between the first host and the second host; obtain the original network card information of corresponding nodes of different hosts before networking through the sub-controller; and store the original network card information in a target database of a main controller associated with the converged networking system, where the sub-controller is connected to the main controller.
[0131] In an exemplary embodiment, the above device further includes: a replacement module, configured to evaluate the remaining service life of a network card according to the usage record and the fault record after obtaining the original network card information of corresponding nodes of different hosts before networking through the sub-controller when the original network card information further includes the usage record of each network card and the fault record of each network card in different hosts; and determine the update time for replacing the network card hardware of different hosts according to the remaining service life and the normal service life corresponding to the network card.
[0132] In an exemplary embodiment, the above device further includes: an identification module, configured to send a target update message to synchronize and adjust the configuration information of the first host and the second host in the running state, and then determine the adjustment results of the first host and the second host; identify the target update message according to the adjustment results to set the usage duration of the target update message.
[0133] In an exemplary embodiment, the above identification module is further configured to identify the target update message as an invalid message when the adjustment result indicates that the adjustment of the first host or the second host fails; and identify the target update message as a valid message when the adjustment result indicates that both the first host and the second host are adjusted successfully.
[0134] It should be noted that the above-mentioned various modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or, the above-mentioned various modules are respectively located in different processors in any combination form.
[0135] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. Wherein, the computer program is configured to execute the steps in any one of the above method embodiments when running.
[0136] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: USB flash drive, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disk, magnetic disk or optical disc and other various media that can store computer programs.
[0137] An embodiment of the present application also provides an electronic device, including a memory and a processor. A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0138] Optionally, Figure 11 is a block diagram of the computer system structure of the electronic device according to the embodiment of the present application. As Figure 11As shown, computer system 800 includes a central processing unit 801 (CPU), which can perform various appropriate actions and processes according to programs stored in read-only memory 802 (ROM) or programs loaded from storage section 808 into random access memory 803 (RAM). In random access memory 803, various programs and data required for system operation are also stored. The central processing unit 801, read-only memory 802, and random access memory 803 are connected to each other via bus 804. Input / output interface 805 (Input / Output interface, i.e., I / O interface) is also connected to bus 804.
[0139] The following components are connected to input / output interface 805: input section 806 including a keyboard, a mouse, etc.; output section 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and speakers, etc.; storage section 808 including a hard disk, etc.; and communication section 809 including a network interface card such as a local area network card, a modem, etc. Communication section 809 performs communication processing via a network such as the Internet. Drive 810 is also connected to input / output interface 805 as needed. Removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on drive 810 as needed so that a computer program read from it can be installed into storage section 808 as needed.
[0140] In an exemplary embodiment, the above electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the above processor, and the input / output device is connected to the above processor.
[0141] An embodiment of the present application also provides a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0142] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium. The non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0143] An embodiment of this application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to execute the steps in any one of the above method embodiments.
[0144] Specific examples in this embodiment may refer to the examples described in the above embodiments and exemplary implementation manners, and will not be repeated here.
[0145] Obviously, those skilled in the art should understand that the above modules or steps of this application can be implemented by a general-purpose computing device. They can be centralized on a single computing device or distributed on a network composed of multiple computing devices. They can be implemented by program codes executable by the computing device. Thus, they can be stored in a storage device and executed by the computing device. And in some cases, the steps shown or described can be executed in a different order from here, or they can be separately fabricated into individual integrated circuit modules, or multiple modules or steps among them can be fabricated into a single integrated circuit module to be implemented. In this way, this application is not limited to any specific combination of hardware and software.
[0146] The above are only the preferred embodiments of this application and are not used to limit this application. For those skilled in the art, this application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the principle of this application shall be included in the protection scope of this application.
Claims
1. A method for synchronizing configuration information, characterized in that: include: In a case where a communication link has been established between the first host and the second host, determining a target message carrying first configuration information, wherein the target message is used to synchronize configuration information between the first host and the second host; Confirming a network card binding mode between the first host and the second host based on the first configuration information, and adjusting a target policy for sending target data between the first host and the second host based on the network card binding mode; Determine, according to the target policy, a control instruction for adjusting a first interface attribute corresponding to the first host or a second interface attribute corresponding to the second host, and modify the first configuration information based on the control instruction to obtain second configuration information; The first configuration information is replaced by the second configuration information as the content carried by the target message, a target update message is obtained, and the target update message is sent down to synchronously adjust the configuration information of the first host and the second host in the running state.
2. The method for synchronizing configuration information according to claim 1, characterized in that: Determining a target message carrying the first configuration information includes: Acquire a message format template between the first host and the second host; wherein the message format template includes: a frame header field, an interface synchronization message field, and a frame check sequence field; The message format template is filled using the target bytes corresponding to the first configuration information, and the filled message format template is encapsulated in an Ethernet frame to obtain a target message.
3. The method for synchronizing configuration information according to claim 2, characterized in that: Filling the message format template using the target byte corresponding to the first configuration information includes: Determine the byte lengths corresponding to different types of fields in the message format template and the target number of records allowed by the interface synchronization message field; Divide the filling positions of different types of fields in the message format template according to the byte length and the target quantity; The filling of the message format template is completed based on the filling position and the target byte corresponding to the first configuration information.
4. The method for synchronizing configuration information according to claim 3, characterized in that: The filling of the message format template is completed based on the filling position and the target byte corresponding to the first configuration information, including: Parse the first configuration information, and determine, according to the parsing result, a target source address corresponding to the first host, a target destination address corresponding to the second host, and multiple configuration records between the first host and the second host, wherein each configuration record at least includes: a configuration subtype corresponding to each host, a length of a configuration record corresponding to each host, and data of a configuration record corresponding to each host; Filling the frame header field in the message format template according to the target source address and the target destination address, wherein the frame header field includes at least: a destination address, a source address, and a type field; the type field is used to indicate the type of the middle encapsulation byte of the current message format template; The interface synchronization message field in the message format template is filled according to the multiple configuration records.
5. The method for synchronizing configuration information according to claim 1, characterized in that: After determining the target message carrying the first configuration information, the method further includes: Recording the initial sending time of the target message; The synchronization period of the target message is calculated based on the initial sending time and the preset interval duration, wherein the preset interval duration is a time configuration parameter in a deployed converged networking system, and the synchronization period is used to indicate the frequency of repeated synchronization of the target message between the first host and the second host.
6. The method for synchronizing configuration information according to claim 1, characterized in that: Determining, according to the target policy, a control instruction for adjusting a first interface attribute corresponding to the first host or a second interface attribute corresponding to the second host, and modifying the first configuration information based on the control instruction, before obtaining the second configuration information, the method further includes: Receive parameter information input by the operation and maintenance object; Determining whether a communication link between the first host and the second host is adjusted according to the parameter information; In the case where the communication link is not adjusted, allowing the control instruction to be used to modify the first configuration information; In the case where the communication link has been adjusted, it is prohibited to use the control instruction to modify the first configuration information, and the first interface attribute corresponding to the first host or the second interface attribute corresponding to the second host is changed based on the parameter information.
7. The method for synchronizing configuration information according to claim 1, characterized in that: Regulating a target strategy for sending target data between the first host and the second host based on the network card binding mode includes: In the case where it is determined that the network card binding modes of the first host and the second host are both active backup strategy modes, determining the network card information of the network cards carried by the first host and the second host based on the first configuration information, wherein the network card information at least includes: the network card name of the primary network card and the network card name of the backup network card in the first host and the second host; Identify the difference between the network card information and the original network card information pre-stored in the converged networking system; The target policy to be enabled is determined based on the difference results.
8. The method for synchronizing configuration information according to claim 7, characterized in that: Determine the target policy to be enabled based on the difference results, including: When the difference result indicates that there is no change in the primary network card connection and the backup network card connection between the first host and the second host, it is determined that the data transmission interface between the first host and the second host is operating normally, and a first target policy is to be executed, wherein the first target policy is to enable the data transmission interface to perform target data transmission; when the difference result indicates that there is at least one connection change in the primary network card connection and the backup network card connection between the first host and the second host, it is determined that the data transmission interface between the first host and the second host is operating abnormally normally, and a second target policy is to be executed, wherein the second target policy is to suspend the use of the data transmission interface, and instruct the second host to perform the primary-backup network card switching operation to adjust the interface parameters.
9. The method for synchronizing configuration information according to claim 7, characterized in that: After determining that the data transmission interface between the first host and the second host is working normally and the first target policy is to be executed, the method further includes: Obtaining a first address corresponding to the first host and a second address corresponding to the second host; when the character length of the first address is greater than or equal to the character length of the second address, prohibiting activation of the primary and standby network card switching operation corresponding to the first host; When the character length of the first address is less than the character length of the second address, it is determined to perform a primary and backup network card switching operation on the first host.
10. The method for synchronizing configuration information according to claim 1, characterized in that: Regulating a target strategy for sending target data between the first host and the second host based on the network card binding mode includes: When it is determined that the network card binding modes of the first host and the second host are both dynamic link aggregation modes, determining working status information of the primary network card and the backup network card in the first host and the second host based on the first configuration information; When the working status information indicates that at least one host is abnormal, the network cards currently enabled by the first host and the second host are disabled, and a third target policy is to use other network cards except the disabled network card to transmit target data between the first host and the second host.
11. The method for synchronizing configuration information according to claim 1, characterized in that: Before acquiring the target message carrying the first configuration information, the method further includes: determining a type of communication deployed between the first host and the second host; In a case where the communication type indicates that the target object is set to switchless communication in the converged networking system, a target service for generating a target message is activated.
12. The method for synchronizing configuration information according to claim 1, characterized in that: In the case where the first host and the second host have established a communication link, after determining the target message carrying the first configuration information, the method further includes: Acquire real-time transmission quality between the first host and the second host; When the real-time transmission quality is less than the preset transmission quality, increasing the sending frequency of the target message and increasing the message transmission time of the target message; When the real-time transmission quality is greater than or equal to the preset transmission quality, the sending frequency of the target message is reduced, and the message transmission duration of the target message is shortened.
13. The method for synchronizing configuration information according to claim 12, characterized in that: After obtaining the real-time transmission quality between the first host and the second host, the method further includes: analyzing the real-time transmission quality; If the analysis result indicates that the first host has abnormal transmission, generating a first alarm message for prompting to switch the network card running the first host; When the analysis result indicates that the transmission of the second host is abnormal, a second alarm message is generated to prompt switching of the network card running the second host.
14. The method for synchronizing configuration information according to claim 1, characterized in that: In the case where the first host and the second host have established a communication link, before determining the target message carrying the first configuration information, the method further includes: Deploy sub-controllers in the first host and the second host; Obtaining original network card information of nodes corresponding to different hosts before networking through the sub-controller; The original network card information is stored in a target database of a main controller associated with the converged networking system, wherein the sub-controller is connected to the main controller.
15. The method for synchronizing configuration information according to claim 14, characterized in that: After obtaining original network card information of nodes corresponding to different hosts before networking through the sub-controller, the method further includes: When the original network card information further includes a usage record of each network card in different hosts and a fault record of each network card, evaluating the remaining service life of the network card according to the usage record and the fault record; The update time for replacing the network card hardware of different hosts is determined according to the remaining service life and the normal service life corresponding to the network card.
16. The method for synchronizing configuration information according to claim 1, characterized in that: After sending the target update message for synchronously adjusting the configuration information of the first host and the second host in the running state, the method further includes: Determining an adjustment result of the first host and the second host; The target update message is marked according to the adjustment result to set the usage time of the target update message.
17. The method for synchronizing configuration information according to claim 16, characterized in that: The target update message is marked according to the adjustment result, including: If the adjustment result indicates that the adjustment of the first host or the second host fails, marking the target update message as an invalid message; When the adjustment result indicates that both the first host and the second host are adjusted successfully, the target update message is marked as a valid message.
18. A device for synchronizing configuration information, characterized in that: include: A determination module, configured to determine a target message carrying first configuration information when a communication link has been established between the first host and the second host, wherein the target message is used to synchronize configuration information between the first host and the second host; a control module, configured to confirm a network card binding mode between the first host and the second host based on the first configuration information, and to control a target policy for sending target data between the first host and the second host based on the network card binding mode; a modification module, configured to determine, according to the target policy, a control instruction for adjusting a first interface attribute corresponding to the first host or a second interface attribute corresponding to the second host, and modify the first configuration information based on the control instruction to obtain second configuration information; A synchronization module is used to replace the first configuration information with the second configuration information as the carried content of the target message, obtain a target update message, and send the target update message to synchronously adjust the configuration information of the first host and the second host in the running state.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 17 when executed by a processor.
20. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 17 are implemented.
Citation Information
Patent Citations
A method and equipment for communication between virtual machines
CN109710423A
Network card configuration method and device and computer storage medium
CN112448839A