Method and system for fast ip address handover based on conflict detection

By pre-configuring a backup IP address pool on the client side and utilizing fast ARP detection and connection migration technology, the network interruption problem caused by IP address conflicts was resolved, enabling fast and seamless IP address switching and improving the reliability of network communication and user experience.

CN123035187APending Publication Date: 2026-11-03INNER MONGOLIA BAOTOU STEEL UNION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611171749.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies suffer from time-consuming switching processes after detecting IP address conflicts, leading to network communication interruptions, and are unable to achieve seamless switching, especially in critical business scenarios.

Method used

When the network client initializes, it pre-acquires a local backup address pool and, through fast ARP detection and connection migration technology, immediately switches to the backup IP address when an IP address conflict is detected, while maintaining the original network connection, sending a switch notification to the central management node, and performing resource management to update the IP status.

Benefits of technology

It enables rapid IP address switching at the millisecond or second level, minimizing network communication interruption time, maintaining the continuity of existing network connections, improving user experience, and reducing network burden.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123035187A_ABST
    Figure CN123035187A_ABST
Patent Text Reader

Abstract

The application provides a conflict detection-based IP address fast switching method and system, which comprises the following steps: when a network client detects an IP address conflict, the network client verifies whether a target backup IP address in a local backup address pool is occupied in a current network segment; when the target backup IP address is not occupied in the current network segment, the network client switches a main IP address of a network interface from a conflict IP to the target backup IP address; after the IP address is switched, the original socket is bound to a new IP address, or a TCP session is maintained through a connection migration technology; after receiving a switching notification message, a central management node updates a new main IP state from "pre-occupation" to "has been allocated", marks a conflict old IP address as "conflict" and isolates the conflict old IP address, and selects a new IP address from a global address pool as a new backup address of the network client. The application can realize millisecond or second level fast switching to a backup IP address, so as to minimize network communication interruption time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer network communication technology, and more specifically, to a method and system for fast IP address switching based on conflict detection. Background Technology

[0002] Currently, IP address conflicts can prevent affected devices from conducting normal network communication, leading to business interruptions and a degraded user experience. In critical business scenarios (such as online transactions, video conferencing, and industrial control), even brief network outages are unacceptable.

[0003] The shortcomings of existing switching mechanisms are as follows: First, reliance on DHCP reacquisition: When a client detects an IP conflict (e.g., through ARP probing or receiving a conflict packet), the traditional approach is to release the current IP address and re-initiate a Discover-Request process to the DHCP server. This process involves multiple network round trips, is time-consuming (usually several seconds or even tens of seconds), and during this time, the device is in an IP-less state, with communication completely interrupted. Second, manual switching: For devices configured with static IP addresses, administrators need to manually configure a new IP address, which is slow and prone to errors. Third, lack of seamless integration: With existing methods, after switching IP addresses, all existing network connections (TCP sessions, etc.) are interrupted due to the change in IP address, requiring the application layer to re-establish connections, making "seamless" switching impossible. Therefore, there is an urgent need for a technical solution that can complete IP address switching at an extremely fast speed after a conflict is detected while maintaining existing network connections as uninterrupted as possible. Summary of the Invention

[0004] To address the aforementioned problems, the present invention aims to provide a method and system for fast IP address switching based on conflict detection.

[0005] Methods for fast IP address switching based on conflict detection include:

[0006] Step 1: During network client initialization, obtain the primary IP address and the local backup address pool; wherein, the local backup address pool contains at least one backup IP address;

[0007] Step 2: When the network client detects an IP address conflict, it verifies with the local backup address pool whether the target backup IP address is already in use within the current network segment;

[0008] Step 3: When the target backup IP address is not occupied in the current network segment, switch the primary IP address of the network interface from the conflicting IP address to the target backup IP address;

[0009] Step 4: After switching IP addresses, bind the original socket to the new IP address, or maintain the TCP session through connection migration technology;

[0010] Step 5: After the IP address switch is completed, the network client sends a switch notification message to the central management node;

[0011] Step 6: After receiving the handover notification message, the central management node updates the status of the new primary IP from "pre-occupied" to "allocated", marks the conflicting old IP address as "conflicted" and isolates it, and selects a new IP address from the global address pool as the new backup address for the network client.

[0012] Preferably, in step 2, the network client determines whether there is an IP address conflict by continuously and actively probing ARP, listening to DHCP NAK packets, or detecting duplicate gratuitous ARP packets.

[0013] Preferably, in step 5, the network client also sends a **gratuitousARP message** in the local network to announce the new IP-MAC binding relationship so that the network switch can update the corresponding MAC address table.

[0014] This invention also provides a fast IP address switching system based on conflict detection, comprising:

[0015] The backup address acquisition module is used to acquire the primary IP address and the local backup address pool during network client initialization; wherein, the local backup address pool contains at least one backup IP address;

[0016] The address occupancy determination module is used by the network client to verify whether the target backup IP address is occupied in the current network segment when an IP address conflict is detected.

[0017] The address switching module is used to switch the primary IP address of the network interface from the conflicting IP address to the target backup IP address when the target backup IP address is not occupied in the current network segment.

[0018] The network maintenance module is used to bind the original socket to the new IP address after switching IP addresses, or to maintain the TCP session through connection migration technology.

[0019] The notification module is used to send a switching notification message from the network client to the central management node after the IP address switch is completed.

[0020] The resource management module is used by the central management node to update the status of the new primary IP from "pre-occupied" to "allocated" after receiving the handover notification message, mark the conflicting old IP address as "conflicted" and isolate it, and select a new IP address from the global address pool as the new backup address for the network client.

[0021] The present invention also provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, characterized in that the computer program, when executed by the processor, implements the steps in the above-described method for fast IP address switching based on conflict detection.

[0022] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps in the above-described method for fast IP address switching based on conflict detection.

[0023] The beneficial effects of the IP address fast switching method and system based on conflict detection provided by the present invention are as follows: Compared with the prior art, the present invention can achieve a fast switch to a backup IP address in milliseconds or seconds, so as to minimize network communication interruption time.

[0024] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 The diagram illustrates the composition and interaction of the system provided in this embodiment of the invention.

[0027] Figure 2 A timing flowchart provided by an embodiment of the present invention is shown;

[0028] Figure 3 This invention illustrates a flowchart of the client-side fast proxy switching process provided in an embodiment of the invention.

[0029] Figure 4 This diagram illustrates the transformation of IP address status in the central management node, as provided in an embodiment of the present invention. Detailed Implementation

[0030] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0031] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0032] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0033] Please see Figure 1-4 Methods for fast IP address switching based on conflict detection include:

[0034] Step 1: During network client initialization, obtain the primary IP address and the local backup address pool; wherein, the local backup address pool contains at least one backup IP address;

[0035] Step 2: When the network client detects an IP address conflict, it verifies with the local backup address pool whether the target backup IP address is already in use within the current network segment;

[0036] Step 3: When the target backup IP address is not occupied in the current network segment, switch the primary IP address of the network interface from the conflicting IP address to the target backup IP address;

[0037] Step 4: After switching IP addresses, bind the original socket to the new IP address, or maintain the TCP session through connection migration technology;

[0038] Step 5: After the IP address switch is completed, the network client sends a switch notification message to the central management node;

[0039] Step 6: After receiving the handover notification message, the central management node updates the status of the new primary IP from "pre-occupied" to "allocated", marks the conflicting old IP address as "conflicted" and isolates it, and selects a new IP address from the global address pool as the new backup address for the network client.

[0040] In practical applications, the IP address fast switching method based on conflict detection of the present invention includes the following steps:

[0041] S1: Preparation phase: Pre-configure the backup address pool and synchronize the state.

[0042] *When a network client (terminal, server, etc.) initializes, in addition to obtaining the primary IP address, it also pre-obtains one or more backup IP addresses from a central management node (such as an enhanced DHCP server) or through local policies, forming a local "backup address pool".

[0043] *The client synchronizes the status of its spare address pool with the central management node to ensure that the server knows that these spare addresses have been "pre-reserved" and will not be allocated to other devices, but are in a "pending activation" state at the protocol level.

[0044] S2: Conflict Detection and Fast Triggering

[0045] The client uses various mechanisms, such as continuous active ARP probing, listening to DHCPNAK packets, or detecting duplicate gratuitousARP packets, to detect IP conflicts in real time or near real time.

[0046] Once a conflict is confirmed, the client immediately generates a quick switch trigger event without going through the full DHCP release process.

[0047] S3: Parallel verification and switchover execution:

[0048] *The moment a conflict is detected, the client selects an alternate IP address from its local alternate address pool in parallel.

[0049] * While selecting an alternative IP address, the client sends a fast ARP probe to that IP address to confirm in a very short time (milliseconds) that the address is not occupied in the current network segment.

[0050] Once verification is successful, the client immediately switches the primary IP address of its network interface from the conflicting IP to the backup IP. This process is implemented at the operating system kernel level, bypassing standard upper-layer configuration interfaces to reduce switching latency.

[0051] S4: Connection Maintenance and Notification

[0052] To maintain the continuity of existing network connections, clients do not immediately reset the network stack after switching IP addresses. Instead, they utilize the operating system's routing table and socket mechanisms to attempt to bind the original socket to the new IP address, or maintain the TCP session through connection migration techniques (such as the TCP-based MPTCP concept).

[0053] *After the switchover is complete, the client immediately sends a lightweight quick notification message to the central management node, informing it that the switchover from IP-A to IP-B has been completed, and requesting that a new spare IP be assigned to it to supplement the local address pool.

[0054] The client will also send a gratuitousARP message on the local network to announce the new IP-MAC binding, so that the network switch can quickly update its MAC address table.

[0055] S5: Post-event verification and resource management:

[0056] After receiving the switchover notification from the client, the central management node officially updates the status of the new primary IP (IP-B) from "pre-assigned" to "assigned" and marks the conflicting old IP (IP-A) as "conflicted" and isolates it.

[0057] The central management node selects a new IP address from the global address pool as the new backup address for the client and sends it to the client, completing the closed loop of the entire fast switchover.

[0058] The present invention also provides a fast IP address switching device based on conflict detection, comprising:

[0059] (1) Client-side fast proxy switching: A software module residing in the kernel or user space of the client's operating system, responsible for conflict detection, local backup address pool management, fast ARP verification and IP switching.

[0060] (2) Intelligent address management server: an enhanced DHCP or IPAM server responsible for allocating primary IPs and pre-allocating backup IPs, and synchronizing address status with clients.

[0061] (3) Fast Notification Channel: A lightweight communication protocol (e.g., a custom UDP-based protocol) used between the client and the server to transmit fast switching notifications and requests for new backup addresses.

[0062] like Figure 1As shown, the client module comprises four core components: a conflict detection agent, an IP switching executor, a local configuration library, and a communication interface. It is responsible for real-time monitoring of local IP status and rapid switching decisions. The server module consists of an IP address management core, a conflict arbitration engine, a central IP address pool, and a policy configuration library, enabling unified management and conflict arbitration of global IP resources. The system achieves state synchronization and collaborative decision-making between the client and server through a two-way communication mechanism.

[0063] like Figure 2 As shown in the sequence diagram, this sequence diagram details the entire process of the system from conflict detection to handover completion. The client detects conflicts by periodically sending gratuitous ARP requests, and immediately alerts the server upon detecting a conflict. Upon receiving the conflict alert, the server executes an arbitration algorithm and allocates a new address from the IP address pool. The client receives the new address, performs a handover operation, and ensures a successful handover through connectivity verification, ultimately completing state synchronization. The entire process embodies the design principles of rapid response and closed-loop control.

[0064] Figure 3 The client-side rapid proxy switching employs a state machine design pattern to automate the entire process from conflict detection to successful switching. After initialization, the proxy enters a continuous monitoring state, identifying IP conflicts through various detection methods (ARP probing, ICMP Ping detection, etc.). Upon detection, it selects an appropriate response strategy (immediate switching / planned switching) based on the conflict level (high risk / low risk). The switching execution phase includes four steps: configuration backup, new address request, application configuration, and connectivity verification, ensuring the security and reliability of the switching operation. Finally, regardless of whether the switching is successful or not, the proxy notifies the server of its status and records detailed logs, forming a complete management loop.

[0065] Figure 4 This demonstrates the state transition process of IP addresses within the central management node, covering the cyclical transitions between available, pre-allocated, allocated, conflicted, and available states. IP addresses in the central management node follow strict state transition rules. An address initially enters the "available" state, then the "pre-allocated" state upon receiving an allocation request, and transitions to "allocated" after client confirmation. When a client successfully connects and uses the IP address, the state changes to "in use." When the system detects an IP conflict, it forces the address into the "conflicted" state regardless of whether it is in the "allocated" or "in use" state. After the conflict is resolved, the address can either revert to "allocated" or be directly released to the "available" state. This state mechanism ensures the rigor of IP address allocation and the timeliness of conflict handling.

[0066] The process of the present invention will be further described below with reference to specific embodiments:

[0067] (1) A Server-X server starts up, obtains the primary IP address 192.168.1.10 from the intelligent address management server, and reserves the backup IP addresses 192.168.1.20 and 192.168.1.21.

[0068] (2) The client quickly switches proxies and continuously listens to ARP cache and network packets.

[0069] (3) When a new device is incorrectly configured with 192.168.1.10, the Server-X agent determines that a conflict has occurred by receiving an ARPRequest packet with its target IP as itself.

[0070] (4) The agent immediately triggers the switching process:

[0071] 1. Select 192.168.1.20 from the local standby pool.

[0072] 2. Send an ARP probe to 192.168.1.20 in parallel. If no response is received within 50ms, the address is determined to be available.

[0073] 3. Through kernel calls, the primary IP is immediately removed from 192.168.1.10, and 192.168.1.20 is configured as the primary IP. The entire process is completed within 100 milliseconds.

[0074] 4. Send a quick notification to the intelligent address management server via a pre-established UDP connection: "Server-XMAC:XX:XX:XX:XX:XX:XX switched from 192.168.1.10 to 192.168.1.20".

[0075] 5. Send GratuitousARP to announce the new IP-MAC binding.

[0076] (5) Database connections or video streaming sessions running on the server are not interrupted due to the extremely fast switching speed and the application of connection persistence technology. Only slight jitter occurs.

[0077] (6) The intelligent address management server receives the notification, updates the record, and sends a new backup IP (such as 192.168.1.30) to Server-X.

[0078] According to specific embodiments of the present invention, the following technical effects are disclosed:

[0079] The beneficial effects of this invention are as follows:

[0080] (1) Extremely high switching speed: Through the “pre-configured backup IP” and “parallel verification” mechanisms, the IP address switching time is reduced from the traditional several seconds to the millisecond or sub-second level, which greatly reduces the service interruption time.

[0081] (2) Connection persistence capability: By using connection migration or socket rebinding technology, the survival of TCP long-lived connections is maintained as much as possible, achieving “seamless” or “micro-perceptible” switching at the business level and improving the user experience.

[0082] (3) Reduce network load: It avoids the complete DHCP reacquisition process (Discover, Offer, Request, Ack) and only interacts with the server through lightweight notification messages, reducing broadcast traffic and processing overhead in the network.

[0083] (4) Automation and intelligence: The entire detection, decision-making, switching and notification process is fully automated, requiring no manual intervention, and realizing self-healing of network faults.

[0084] (5) Efficient use of resources: The "pre-occupancy" mechanism of the spare address not only ensures the immediate availability of the address during the switchover, but also avoids the long-term waste of the address, thus achieving a balance between security and efficiency.

[0085] This invention also provides a fast IP address switching system based on conflict detection, comprising:

[0086] The backup address acquisition module is used to acquire the primary IP address and the local backup address pool during network client initialization; wherein, the local backup address pool contains at least one backup IP address;

[0087] The address occupancy determination module is used by the network client to verify whether the target backup IP address is occupied in the current network segment when an IP address conflict is detected.

[0088] The address switching module is used to switch the primary IP address of the network interface from the conflicting IP address to the target backup IP address when the target backup IP address is not occupied in the current network segment.

[0089] The network maintenance module is used to bind the original socket to the new IP address after switching IP addresses, or to maintain the TCP session through connection migration technology.

[0090] The notification module is used to send a switching notification message from the network client to the central management node after the IP address switch is completed.

[0091] The resource management module is used by the central management node to update the status of the new primary IP from "pre-occupied" to "allocated" after receiving the handover notification message, mark the conflicting old IP address as "conflicted" and isolate it, and select a new IP address from the global address pool as the new backup address for the network client.

[0092] The present invention also provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, characterized in that the computer program, when executed by the processor, implements the steps in the above-described method for fast IP address switching based on conflict detection.

[0093] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps in the above-described method for fast IP address switching based on conflict detection.

[0094] Compared with the prior art, the beneficial effects of the APT encrypted traffic detection system based on multi-dimensional feature analysis provided by the present invention are the same as those of the IP address fast switching method based on conflict detection described in the above technical solutions, and will not be repeated here.

[0095] The present invention also provides an electronic device, including a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor. The transceiver, the memory, and the processor are connected via the bus. The computer program, when executed by the processor, implements the steps in the aforementioned conflict-detection-based fast IP address switching method. Compared with the prior art, the beneficial effects of the electronic device provided by the present invention are the same as those of the conflict-detection-based fast IP address switching method described above, and will not be elaborated further here.

[0096] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps in the above-described method for fast IP address switching based on conflict detection. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present invention are the same as the beneficial effects of the method for fast IP address switching based on conflict detection described in the above-described technical solution, and will not be repeated here.

[0097] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for fast IP address switching based on conflict detection, characterized in that, include: Step 1: During network client initialization, obtain the primary IP address and the local backup address pool; wherein, the local backup address pool contains at least one backup IP address; Step 2: When the network client detects an IP address conflict, it verifies with the local backup address pool whether the target backup IP address is already in use within the current network segment; Step 3: When the target backup IP address is not occupied in the current network segment, switch the primary IP address of the network interface from the conflicting IP address to the target backup IP address; Step 4: After switching IP addresses, bind the original socket to the new IP address, or maintain the TCP session through connection migration technology; Step 5: After the IP address switch is completed, the network client sends a switch notification message to the central management node; Step 6: After receiving the handover notification message, the central management node updates the status of the new primary IP from "pre-occupied" to "allocated", marks the conflicting old IP address as "conflicted" and isolates it, and selects a new IP address from the global address pool as the new backup address for the network client.

2. The method for fast IP address switching based on conflict detection according to claim 1, characterized in that, In step 2, the network client determines whether there is an IP address conflict by continuously and actively probing ARP, listening to DHCP NAK messages, or detecting duplicate gratuitous ARP messages.

3. The method for fast IP address switching based on conflict detection according to claim 2, characterized in that, In step 5, the network client also sends a **gratuitous ARP message** in the local network to announce the new IP-MAC binding relationship so that the network switch can update the corresponding MAC address table.

4. A fast IP address switching system based on conflict detection, characterized in that, include: The backup address acquisition module is used to acquire the primary IP address and the local backup address pool during network client initialization; wherein, the local backup address pool contains at least one backup IP address; The address occupancy determination module is used by the network client to verify whether the target backup IP address is occupied in the current network segment when an IP address conflict is detected. The address switching module is used to switch the primary IP address of the network interface from the conflicting IP address to the target backup IP address when the target backup IP address is not occupied in the current network segment. The network maintenance module is used to bind the original socket to the new IP address after switching IP addresses, or to maintain the TCP session through connection migration technology. The notification module is used to send a switching notification message from the network client to the central management node after the IP address switch is completed. The resource management module is used by the central management node to update the status of the new primary IP from "pre-occupied" to "allocated" after receiving the switchover notification message, mark the conflicting old IP address as "conflicted" and isolate it, and select a new IP address from the global address pool as the new backup address for the network client.

5. An electronic device comprising a bus, a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the transceiver, the memory, and the processor are connected via the bus, characterized in that, When the computer program is executed by the processor, it implements the steps in the method for fast IP address switching based on conflict detection as described in any one of claims 1-3.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps in the IP address fast switching method based on conflict detection as described in any one of claims 1-3.