A method, device and storage medium for detecting IP conflict in a data center

By collecting and synchronizing the IP-MAC address information of computing nodes in the cloud computing environment, and judging and blocking illegal messages, fault problems caused by IP address conflicts are solved and the stability and reliability of the cloud platform are improved.

CN114884922BActive Publication Date: 2024-10-01JINAN INSPUR DATA TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202210461300.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-28
Publication Date
2024-10-01
Estimated Expiration
2042-04-28

AI Technical Summary

Technical Problem

In a cloud computing environment, IP address conflicts may cause the failure of computing nodes, virtual machines, or management nodes, affecting business stability. Existing technologies cannot effectively avoid failures caused by IP conflicts between third-party device configurations and data center node IPs.

Method used

By collecting the IP addresses and MAC addresses of all computing nodes, the IP-MAC address pair data is formed, synchronized to each computing node, and judged whether the received message comes from a legal address. If not, the message is blocked and covered by alarms and ARP broadcasts. Resolve IP conflicts.

Benefits of technology

It effectively avoids host disconnection, downtime and service interruption caused by IP conflicts between third-party equipment configuration and data center node IP, and improves the operational stability and reliability of the cloud platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114884922B_ABST
    Figure CN114884922B_ABST
Patent Text Reader

Abstract

The present application relates to the field of cloud computing technology, and discloses a method, device, and storage medium for detecting IP conflicts in a data center. The method includes: collecting the IP addresses and MAC addresses of all computing nodes; the IP address and MAC address of each computing node correspond one to one; forming IP-MAC address pair data of each computing node; synchronizing all collected IP-MAC address pair data to each computing node, so that the computing node can determine whether the received message comes from the MAC address in the IP-MAC address pair data; if so, forward the message; if not, determine that there is an IP conflict between the message and the computing node, and shield the message. In this way, the messages sent by the third-party IP conflict device can be effectively shielded, and the host disconnection, downtime, service interruption and other faults caused by the conflict between the IP configured by the third-party device and the node IP in the data center can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cloud computing technology, and in particular to an IP conflict detection method, device and storage medium in a data center. Background Art

[0002] With the development of cloud computing technology, more and more virtual machines are running in various cloud platforms. Any management node, computing node, virtual machine and other network devices of each cloud platform can be accessed through IP addresses. However, if two devices use the same IP address at the same time, an IP conflict will occur. If the IP conflict occurs in the computing node of the cloud platform, the management network of the computing node will be affected by the IP conflict, which may cause disconnection and cause a significant impact on the business. If the IP conflict occurs in the virtual machine, the business running on the virtual machine will be affected. In more serious cases, if the IP conflict occurs in the management node, the entire cloud platform will be affected by the IP conflict and become uncontrollable. Therefore, in the cloud platform, IP conflict protection is a relatively important and practical function, which is of great significance to improving the stability of the cloud platform operation.

[0003] At present, each data center has several hosts, each of which has one or more IP addresses, but each IP address can only appear on one host at a time; these hosts are connected to each other through network devices, such as switches and routers, to form a network. Due to a large number of users or misconfiguration, the same IP address may be used by different hosts or network devices at the same time in the entire network. At this time, if a third device wants to communicate with this IP, it may be connected to an unexpected device, or the data being transmitted may be suddenly interrupted, and the network connection may be intermittent.

[0004] Therefore, how to effectively avoid the occurrence of the above situation is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method, device and storage medium for detecting IP conflicts in a data center, which can effectively shield messages sent by third-party IP conflict devices and avoid faults caused by conflicts between IP configured by third-party devices and node IPs in the data center. The specific scheme is as follows:

[0006] A method for detecting IP conflicts in a data center, comprising:

[0007] Collecting the IP addresses and MAC addresses of all computing nodes; the IP address and MAC address of each computing node correspond one to one;

[0008] Forming IP-MAC address pair data of each computing node;

[0009] All the collected IP-MAC address pair data are synchronized to each of the computing nodes so that the computing node can determine whether the received message comes from the MAC address in the IP-MAC address pair data; if so, the message is forwarded; if not, it is determined that there is an IP conflict between the message and the computing node, and the message is shielded.

[0010] Preferably, in the IP conflict detection method in the data center provided by the embodiment of the present invention, while shielding the message, it also includes:

[0011] The user is prompted in the form of an alarm that there is an IP conflict in the network; the content of the alarm includes the IP address and MAC address of the message with the IP conflict, and the MAC address corresponding to the IP address in the IP-MAC address pair data.

[0012] Preferably, in the IP conflict detection method in the data center provided by the embodiment of the present invention, after forming the IP-MAC address pair data of each computing node, it also includes:

[0013] Periodically check and collect whether the IP addresses and MAC addresses of all computing nodes have changed;

[0014] When the IP address or MAC address of the computing node changes, the IP-MAC address pair data corresponding to the computing node is updated.

[0015] Preferably, in the IP conflict detection method in the data center provided by the embodiment of the present invention, all the collected IP-MAC address pair data are synchronized to each of the computing nodes so that the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data, including:

[0016] All the collected IP-MAC address pair data are synchronized to the local proxy device of each computing node, so that the local proxy device converts the IP-MAC address pair data into a flow table, and the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data according to the flow table.

[0017] Preferably, in the IP conflict detection method in the data center provided by the embodiment of the present invention, the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data according to the flow table, including:

[0018] The local proxy device sends the flow table to the virtual switch of the computing node;

[0019] The virtual machine switch matches the flow table with the received message to obtain the type, IP address and MAC address of the message. When the message is of ARP type, it directly determines whether the corresponding relationship between the obtained IP address and MAC address is in the IP-MAC address pair data.

[0020] Preferably, in the IP conflict detection method in the data center provided by the embodiment of the present invention, determining that there is an IP conflict between the message and the computing node and shielding the message includes:

[0021] The message is sent to a message monitoring system so that the message monitoring system can determine whether there is an IP conflict between the message and the computing node. If so, an ARP broadcast is automatically sent to cover the message.

[0022] Preferably, in the IP conflict detection method in the data center provided by the embodiment of the present invention, after automatically sending the ARP broadcast to cover the message, it also includes:

[0023] The relevant data of IP conflict is recorded in the cache.

[0024] Preferably, in the above-mentioned IP conflict detection method in the data center provided by the embodiment of the present invention, after recording the relevant data of the IP conflict in the cache, it also includes:

[0025] A timer and a data comparator are used to regularly compare the data recorded in the cache of the message monitoring system, and different alarm information is sent to the user according to the data changes.

[0026] An embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein when the processor executes a computer program stored in the memory, the method for detecting IP conflicts in a data center as provided in the embodiment of the present invention is implemented.

[0027] An embodiment of the present invention further provides a computer-readable storage medium for storing a computer program, wherein when the computer program is executed by a processor, the method for detecting IP conflicts in a data center as provided in the embodiment of the present invention is implemented.

[0028] It can be seen from the above technical scheme that the present invention provides a method for detecting IP conflict in a data center, including: collecting IP addresses and MAC addresses of all computing nodes; one-to-one correspondence between the IP address and the MAC address of each computing node; forming IP-MAC address pair data of each computing node; synchronizing all collected IP-MAC address pair data to each computing node, so that the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data; if so, forwarding the message; if not, determining that there is an IP conflict between the message and the computing node, and shielding the message.

[0029] The IP conflict detection method in the above-mentioned data center provided by the present invention collects the IP and MAC address information of all computing nodes in the data center, and uses this information as a basis for judging whether the message received during the communication process comes from a legitimate address, and synchronizes it to all computing nodes. The computing nodes can effectively shield the messages sent by the third-party IP conflicting devices through this information, and avoid the host disconnection, downtime, service interruption and other faults caused by the conflict between the IP configured by the third-party device and the node IP in the data center.

[0030] In addition, the present invention also provides corresponding equipment and computer-readable storage medium for the IP conflict detection method in the data center, further making the above method more practical, and the equipment and computer-readable storage medium have corresponding advantages. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0032] Figure 1 A flow chart of a method for detecting IP conflicts in a data center provided by an embodiment of the present invention;

[0033] Figure 2 A schematic diagram of the data center structure provided by an embodiment of the present invention;

[0034] Figure 3 A schematic diagram of the internal modules of a computing node provided by an embodiment of the present invention;

[0035] Figure 4 A flowchart of the message monitoring system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In practical applications, the premise for two terminals (such as a host or a virtual machine) to communicate is to know the hardware physical address (Media Access Control Address, MAC) of the opposite device or gateway device, that is, before sending a communication message, the MAC address corresponding to the IP of a certain device that communicates with itself must be found first, and then the message will be forwarded in the form of a data frame through a network card, a network cable, a switch and other devices. The headers of these data frames are filled with the source MAC address and the destination MAC address information. In the MAC address query, the message used is called the Address Resolution Protocol (Address Resolution Protocol, ARP). Normal ARP messages are divided into request messages and response messages, and there are also types such as free ARP messages. Based on this and in view of the above-mentioned problems existing in the current background technology, the present invention utilizes the property that all communications need to be resolved through ARP messages first, and provides an IP conflict detection method in a data center, by which the host disconnection, downtime, service interruption and other faults caused by the conflict between the IP configured by the third-party device and the node IP in the data center can be avoided.

[0037] For ease of understanding, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] The present invention provides a method for detecting IP conflicts in a data center. Figure 1 As shown, the following steps are included:

[0039] S1. The management node collects the IP addresses and MAC addresses of all computing nodes; the IP address and MAC address of each computing node correspond one to one;

[0040] It should be noted that the present invention is mainly applied to virtualized or hyper-converged data centers. Figure 2 This is the scenario in which the present invention is applied. Each data center contains a management center and several computing nodes. Each computing node may have one or more virtual machines. The management node is connected to the computing node through a physical switch. Each virtual machine is also connected through its business network and its uplink and physical switch. In the entire link, if a device is connected to the switch or an adjacent switch and is configured with the same IP address as a computing node or virtual machine, an IP conflict will occur. Then the conflicted virtual machine or host will become unavailable.

[0041] Generally, after the management node and the computing node are installed, the computing node and the management node are combined into a whole by adding a host to the management node, which is a data center. Specifically, when executing step S1, in the process of adding a host to the management node, the management node can call an interface to collect data from each computing node. The main content of the collection is the IP address and MAC address, and they are guaranteed to be one-to-one corresponding.

[0042] S2. The management node forms IP-MAC address pair data of each computing node based on the collected IP addresses and MAC addresses;

[0043] Specifically, the IP-MAC address pair data formed in step S2 is a combination of an IP address and a corresponding MAC address. All IP-MAC address pair data will be used as a basis for judging whether the message received in the subsequent communication process is a legal MAC address. For the convenience of description, when the MAC address of the message is the MAC address in the IP-MAC address pair data, it is defined as legal, otherwise, when the MAC address of the message is not the MAC address in the IP-MAC address pair data, it is defined as illegal.

[0044] Preferably, the IP-MAC address pair data is recorded in the database of the management node for subsequent use. The database may also include the IP address and MAC address of the management node itself, which may be recorded in the following manner:

[0045] Management node A: IP_A: MAC_A; management node B: IP_B: MAC_B;

[0046] The other computing nodes X also have one-to-one corresponding records: computing node X: IP_X: MAC_X.

[0047] These IP-MAC address pair data are all recorded in one-to-one correspondence, and there is no phenomenon that a certain IP address corresponds to multiple MAC addresses or a set of MAC addresses. This makes the present invention more accurate in the subsequent illegal message identification, and consumes less computing resources and is more efficient during identification.

[0048] S3, the management node synchronizes all collected IP-MAC address pair data to each computing node;

[0049] Specifically, after the data collection is completed, the management node synchronizes the collected data to each computing node, so that the computing node has the ability to identify whether the MAC address corresponding to a certain IP address is legal or illegal.

[0050] S4. The computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data; if so, the message is forwarded; if not, it is determined that there is an IP conflict between the message and the computing node, and the message is shielded.

[0051] It is understandable that if the IP address and MAC address can be identified as legal, they can be directly forwarded normally. Messages other than these MAC addresses are illegal. In addition, in the whole process of the present invention, only the ARP message is identified, and other types of messages do not need to be identified, and other messages do not need to be further identified.

[0052] In the IP conflict detection method in the above-mentioned data center provided by the embodiment of the present invention, by collecting the IP and MAC address information of all computing nodes in the data center, and using this information as a basis for judging whether the message received during the communication process comes from a legitimate address, and synchronizing it to all computing nodes, the computing nodes can effectively shield the messages sent by the third-party IP conflicting devices through this information, and avoid the host disconnection, downtime, service interruption and other faults caused by the conflict between the IP configured by the third-party device and the node IP in the data center.

[0053] Furthermore, in a specific implementation, in the IP conflict detection method in the above-mentioned data center provided in an embodiment of the present invention, after executing step S2 to form the IP-MAC address pair data of each computing node, it may also include: periodically checking and collecting whether the IP addresses and MAC addresses of all computing nodes have changed; when the IP address or MAC address of the computing node changes, updating the IP-MAC address pair data corresponding to the computing node.

[0054] Specifically, since users can add or delete computing nodes in the data center at any time, or modify the IP address of the computing node, which causes the IP-MAC information synchronized to the computing node by the management node to become invalid, the management node also needs to collect information about users adding, deleting or modifying the IP address and MAC address of the computing node, and synchronize it to each computing node in a timely manner.

[0055] The above steps are a periodic task. Every 5 minutes, the management node checks whether the collected data has changed compared to 5 minutes ago. If it has changed, the new data will be sent to each computing node. That is, in the process of executing step S3 data sending, the IP-MAC address pair data updated in the above steps needs to be sent to each computing node synchronously, so that the computing node has the basis for identifying whether the message is sent by a legitimate device.

[0056] Next, in order to describe the detection process of the embodiment of the present invention in detail, the internal modules of the computing node are first described. Figure 3As shown, each computing node has a local agent to receive the configuration sent by the management node and apply these configurations to the virtual switch. The computing node also has at least one virtual switch. The virtual switch provides a network for the node to connect to the management network on the one hand, and provides a network for the virtual machine of the node on the other hand. Any message entering the host needs to be forwarded by the virtual switch. The present invention uses this feature to identify the incoming and outgoing messages and actively discover illegal ARP messages.

[0057] In specific implementation, in the IP conflict detection method in the above-mentioned data center provided in an embodiment of the present invention, steps S3 and S4 synchronize all collected IP-MAC address pair data to each computing node, and the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data. Specifically, it may include: first, synchronizing all collected IP-MAC address pair data to the local proxy device of each computing node; then, the local proxy device converts the IP-MAC address pair data into a flow table, and the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data according to the flow table.

[0058] It should be noted that in the cloud platform, whether it is the traffic of the management network or the business network, after passing through the physical network card and receiving the data, these data will flow through the virtual bridge device. Each virtual bridge device is controlled by a controller running in each computing node. This controller can convert certain configurations into flow tables. By applying the flow table to these bridges, the data packets flowing through the bridge can be filtered, intercepted or modified, and responded on behalf of others. If it is a legal address, the ARP message will be forwarded normally to complete the subsequent communication work; if it is illegal, the ARP will be discarded to prevent the host from learning this IP address, which is an illegal MAC address, thereby affecting normal communication. In the present invention, a local proxy device is used to convert the IP-MAC address pair data received in step S3 into a flow table.

[0059] In specific implementation, in the IP conflict detection method in the above-mentioned data center provided by an embodiment of the present invention, in the above-mentioned steps, the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data according to the flow table, which can specifically include: first, the local proxy device sends the flow table to the virtual switch of the computing node; then, the virtual machine switch matches the flow table with the received message, obtains the type, IP address and MAC address of the message, and when the message is of ARP type, directly determines whether the correspondence between the obtained IP address and MAC address is in the IP-MAC address pair data.

[0060] Specifically, in the process of sending the flow table, the proxy device sends the converted flow table to the virtual switch; after these flow tables are sent to the virtual switch, when there is another message entering the host, these flow tables will be matched first. In the present invention, these flow table rules are mainly divided into two categories: the first category is to match the type, IP address and MAC address of the message; when the message is of ARP type, the IP address and MAC address are the IP-MAC address pair data received by the proxy, the virtual machine forwards this type of message normally. The second category is to match the ARP message type and IP address, but cannot match the MAC address, and the message can be sent to the message monitoring system for processing; that is, for the ARP message of a certain IP that cannot be matched in the first category, that is, it is sent by other MAC addresses, it needs to be handed over to the message monitoring system for further processing, and the message monitoring is mainly to analyze and process the message; these two rules are applied to the virtual switch, thereby ensuring that all ARP messages entering the host through the virtual switch are legal and there will be no IP conflict.

[0061] Furthermore, in a specific implementation, in the IP conflict detection method in the above-mentioned data center provided in an embodiment of the present invention, step S4 determines whether there is an IP conflict between the message and the computing node, and shields the message, which may specifically include: sending the message to a message monitoring system so that the message monitoring system determines whether there is an IP conflict between the message and the computing node, and if so, automatically sending an ARP broadcast coverage message.

[0062] It should be understood that because the device that illegally holds a certain IP generally notifies the MAC address corresponding to this IP in the form of broadcasting, although the host or virtual machine in this system can correctly identify the illegal MAC address and block this MAC address through the above configuration, it is impossible to distinguish which one is the legal MAC address for other network devices such as hosts, virtual machines or gateways that are not in this system. This will cause other devices to connect to this host or virtual machine because their own ARP table records the MAC address of the illegal device, thus mistakenly connecting to the illegal device. In this case, the computing node updates and covers the ARP message based on the monitored information to ensure that the ARP table of all network devices in this layer 2 network always records the legal MAC address, and automatically and timely refreshes the ARP records of other devices in the entire network. Specifically, after the automatic monitoring system detects that there is an IP conflict between the message and the computing node, it can automatically send its own correct ARP broadcast to cover the illegal ARP record in this segment to ensure that the host in this cluster communicates normally with other network devices outside the cluster.

[0063] Furthermore, the above method can ensure that all devices can be accessed correctly, but conflicting devices still exist, and this security risk still needs to be fundamentally eliminated. Therefore, in the IP conflict detection method in the above data center provided by the embodiment of the present invention, when an illegal ARP message is detected, while executing step S4 to shield the message, it can also include: prompting the user in the form of an alarm that there is an IP conflict in the network. The content of the alarm may include the IP address and MAC address of the message with the IP conflict, and the MAC address corresponding to the IP address in the IP-MAC address pair data; it can also be understood that the content of the alarm includes the IP address of the host or virtual machine, the illegal MAC address, and the legal MAC address. In this way, timely warnings are issued to prompt users of the MAC of the conflicting device, which can fundamentally ensure that the conflicting device is promptly checked and located, greatly improving the reliability of the data center and avoiding failures and the troubleshooting costs caused by failures.

[0064] In specific implementation, in the IP conflict detection method in the data center provided by the embodiment of the present invention, after automatically sending the ARP broadcast coverage message, it can also include: recording the relevant data of the IP conflict in the cache for use when sending the alarm message. Afterwards, a timer and a data comparator can also be used to regularly compare the data recorded in the cache of the message monitoring system, and send different alarm information to the user according to the data changes.

[0065] Figure 4 The flowchart of the message monitoring system is shown. The main purpose of this process is to send IP alarm information to users. When a conflicting message is sent to the monitoring system, the system begins to obtain information such as the IP address and MAC address in the message. First, determine whether the message conflicts with the IP of the host. If not, discard the message and do not perform other actions. This is to ensure that not all computing nodes can send alarm information to users, but only the conflicted computing node can send it once.

[0066] If the computing node finds that an IP conflict has occurred with the local node, it will record the information of the conflict and save it in the program cache. There are two types of information in the program cache, new_ipmac_dict and old_ipmac_dict:

[0067]

[0068] All conflict information received will be saved in new_ipmac_dict. For example, the above indicates that a conflict has occurred in the IP 172.16.1.1, and the MAC address of the conflicting illegal device is: 00:22:44:66:88:11.

[0069] There is a conflict in the IP 172.16.1.2. There are two conflicting illegal device MAC addresses: 22:aa:ee:11:22:33 and 44:99:88:66:55:44.

[0070] In addition to saving data, because the ARP message just received can be shielded for the computing node of this data center without any failure, for external devices, such as gateways, or a user who wants to connect to this computing node, the computing node MAC address corresponding to this IP in its ARP table has been overwritten by an incorrect MAC address. Therefore, in order to update the ARP table that has been overwritten by an illegal MAC in a third-party device, a free ARP message needs to be sent. The free ARP message is used to broadcast its own MAC address to let other devices in this network know the MAC corresponding to its IP. In this way, it can be ensured that all network devices except this data center can access the computing node normally.

[0071] When the conflict is detected for the first time, if the timer has not been started, it is necessary to start the timer; the timer can check the data in the current cache every 10 minutes.

[0072] When conflicting data is found in the cached new_ipmac_dict, it is compared with the old_ipmac_dict data through the data comparator, and different alarm information is sent to the user based on the comparison result.

[0073] The data comparator compares new_ipmac_dict and old_ipmac_dict and has the following three results: ADD, DELETE, and UPDATE. ADD means that relative to old_ipmac_dict, new_ipmac_dict has a new IP-MAC address pair. DELETE means that relative to old_ipmac_dict, one or all IP-MAC address pairs in new_ipmac_dict have been deleted. UPDATE means that relative to old_ipmac_dict, the MAC address corresponding to a certain IP in new_ipmac_dict has changed. The above comparison results may appear at the same time. For example, when the results contain both ADD and DELETE, it means that relative to old_ipmac_dict, new_ipmac_dict has a new IP-MAC address and a certain IP-MAC address has been deleted.

[0074] When DELETE occurs and there is no ADD, a message to eliminate the alarm is sent and old_ipmac_dict is cleared; otherwise, when DELETE and / or UPDATE occurs, a message to eliminate the alarm is sent first, and then a new alarm message is sent, and old_ipmac_dict is replaced with new_ipmac_dict; otherwise, when ADD occurs, a new alarm message is sent, and old_ipmac_dict is replaced with new_ipmac_dict; finally, new_ipmac_dict is cleared to continue to save new IP conflict information in the new timing period.

[0075] If the above alarm or alarm clearing message is an alarm message sent, the message content is the content of new_ipmac_dict as described in step 2. The format is as follows:

[0076]

[0077] Among them, ip_conflict_msg indicates that the type of message is an alarm message, and can also be eliminate_ip_conflict_msg, which means eliminating the alarm message. The following is the specific IP and MAC address of the conflict. When the type is an alarm message, fill in the content of new_ipmac_dict here; when the type is an alarm message, it is taken from old_ipmac_dict here.

[0078] For example, the alarm cancellation message is used to cancel the alarm information issued before, and the alarm content is old_ipmac_dict. In this way, the IP address alarm that has not conflicted again within a timing period can be automatically eliminated.

[0079] It should be pointed out that the present invention can shield illegal messages by correctly identifying the MAC addresses of each host or virtual machine in this data center, so that the MAC table in each host or virtual machine is not covered by illegal messages, ensuring normal communication within the cluster; at the same time, when the host detects an IP address conflict, it will actively send out a correct ARP broadcast to ensure that the host in this cluster communicates normally with other network devices outside the cluster. In addition to ensuring normal communication, the system will also detect warnings in a timely manner to fundamentally ensure that conflicts can be promptly checked. In order to complete the above process, the present invention defines an alarm format, and also uses a timer and a data comparator to regularly compare the cached recorded data. And according to data changes, different alarm information is sent to the user.

[0080] Correspondingly, an embodiment of the present invention further discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, the IP conflict detection method in the data center disclosed in the above embodiment is implemented.

[0081] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0082] Furthermore, the present invention also discloses a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the aforementioned disclosed method for detecting IP conflicts in a data center is implemented.

[0083] For more specific processes of the above method, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0084] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device and storage medium disclosed in the embodiment, since they correspond to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0085] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0086] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0087] In summary, an IP conflict detection method in a data center provided by an embodiment of the present invention includes: collecting IP addresses and MAC addresses of all computing nodes; the IP address and MAC address of each computing node correspond one to one; forming IP-MAC address pair data of each computing node; synchronizing all collected IP-MAC address pair data to each computing node, so that the computing node determines whether the received message comes from the MAC address in the IP-MAC address pair data; if so, forwarding the message; if not, determining that there is an IP conflict between the message and the computing node, and shielding the message. In this way, by collecting the IP and MAC address information of all computing nodes in this data center, and using this information as a basis for judging whether the message received during the communication process comes from a legitimate address, and synchronizing it to all computing nodes, the computing node can effectively shield the message sent by the third-party IP conflict device through this information, and avoid the host disconnection, downtime, service interruption and other faults caused by the conflict between the IP configured by the third-party device and the node IP in the data center. In addition, the present invention also provides a corresponding device and a computer-readable storage medium for the IP conflict detection method in the data center, which further makes the above method more practical, and the device and the computer-readable storage medium have corresponding advantages.

[0088] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0089] The IP conflict detection method, device and storage medium in the data center provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for detecting IP conflicts in a data center, characterized in that: Management nodes used in data centers include: In the process of adding a host, the interface is called to collect data from each computing node, and the IP addresses and MAC addresses of all the computing nodes are collected; the IP address and MAC address of each computing node correspond one to one; According to the collected IP addresses and MAC addresses, IP-MAC address pair data of each computing node is formed and recorded in the database of the management node; Periodically check and collect whether the IP addresses and MAC addresses of all computing nodes have changed; When the IP address or MAC address of the computing node changes, updating the IP-MAC address pair data corresponding to the computing node; Synchronizing all the IP-MAC address pair data to a local proxy device of each of the computing nodes, so that the local proxy device converts the IP-MAC address pair data into a flow table, and sends the flow table to the virtual switch of the computing node; The virtual switch matches the flow table with the received message to obtain the type, IP address and MAC address of the message. When the message is of ARP type, it directly determines whether the correspondence between the obtained IP address and MAC address is in the IP-MAC address pair data; if so, the message is forwarded; if not, it is determined that there is an IP conflict between the message and the computing node, and the message is shielded.

2. The method for detecting IP conflicts in a data center according to claim 1, characterized in that: While shielding the message, it also includes: The user is prompted in the form of an alarm that there is an IP conflict in the network; the content of the alarm includes the IP address and MAC address of the message with the IP conflict, and the MAC address corresponding to the IP address in the IP-MAC address pair data.

3. The method for detecting IP conflicts in a data center according to claim 2, characterized in that: Determining that there is an IP conflict between the message and the computing node, and shielding the message, includes: The message is sent to a message monitoring system so that the message monitoring system can determine whether there is an IP conflict between the message and the computing node. If so, an ARP broadcast is automatically sent to cover the message.

4. The method for detecting IP conflicts in a data center according to claim 3, characterized in that: After automatically sending the ARP broadcast to cover the message, the method further includes: The relevant data of IP conflict is recorded in the cache.

5. The method for detecting IP conflicts in a data center according to claim 4, characterized in that: After recording the relevant data of the IP conflict in the cache, it also includes: A timer and a data comparator are used to regularly compare the data recorded in the cache of the message monitoring system, and different alarm information is sent to the user according to the data changes.

6. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the processor implements the IP conflict detection method in a data center as claimed in any one of claims 1 to 5 when executing the computer program stored in the memory.

7. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the method for detecting IP conflicts in a data center according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Communication device provided with arp function

    CN101185292A

  • DHCP (dynamic host configuration protocol) service providing method, device and system

    CN105657081A

  • Method for preventing cloud platform IP and MAC forgery

    CN107612843A

  • Implementation method and system of dynamic host configuration protocol

    CN108833613A

  • Method, system and device for defending IP conflict of management network and storage medium

    CN114221928A