A method and system for cross-domain management of DNS server IP addresses

By using SNMP Get operations to detect the DNS server status in a hierarchical manner, combined with backup device binding and route publishing, the problems of long failover time and IP conflicts in cross-data center deployment of DNS servers are solved, achieving second-level fault recovery and stability improvement.

CN123123097APending Publication Date: 2026-11-17CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611092290.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-22
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, when DNS servers are deployed in different locations and data centers, traditional monitoring methods have limited detection dimensions, high false alarm rates, and cannot achieve rapid failover. Furthermore, IP address conflicts are likely to occur after recovery, affecting the stability of DNS services.

Method used

The system employs SNMP Get operations to acquire basic OID information and DNS service-specific OID information in a layered manner. Combined with a two-stage judgment mechanism, it verifies the status of the network layer, operating system layer, and DNS application layer. By binding the target IP address to the backup device and publishing the route, it achieves fully automated closed-loop management and control of IP address online monitoring, alarm, backup, and revocation across broadcast domains.

Benefits of technology

It achieves a fully automated closed loop from fault detection to recovery, shortening the fault switching time from minutes to seconds, avoiding misjudgments and IP address conflicts, and ensuring the stability and rapid recovery of DNS services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123123097A_ABST
    Figure CN123123097A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for cross-domain management of DNS server IP addresses, relating to the field of network operation and maintenance technology. The method includes: performing an SNMP Get operation on the target IP address at a preset period; determining the network layer status based on the response status of the basic OID information; determining the DNS application layer status based on the return value of the DNS service-specific OID information; when the network layer is initially determined to be unreachable or the DNS application layer service is abnormal, performing the SNMP Get operation again; if the network layer is still unreachable or the DNS application layer service is abnormal, then determining that the server is offline; instructing a preset backup device to bind to the target IP address, and directing network traffic to the backup device through route advertising. This invention solves the problems of VRRP unavailability and ICMP detection unreliability in DNS remote deployment scenarios, achieving second-level fault takeover of the DNS server IP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network operation and maintenance technology, and in particular to a method and system for cross-domain management of DNS server IP addresses. Background Technology

[0002] With the continuous development of internet services, domain name resolution, as a fundamental link in network access, places extremely high demands on the operational stability and fault response speed of DNS servers. DNS primary and backup nodes generally adopt a geographically distributed deployment model to achieve disaster recovery capabilities. Servers in different data centers and cities belong to different broadcast domains. Once the primary node IP fails, how to quickly complete service takeover and ensure uninterrupted domain name resolution has become a common and urgent problem to be solved in the field of network operation and maintenance.

[0003] Currently, VRRP cluster technology is widely used in the industry to achieve high availability of server IPs. It shares virtual IPs through cluster devices, relies on Layer 2 multicast heartbeat to detect the status of the master node, and automatically completes virtual IP migration when a failure occurs, thereby realizing service switching.

[0004] This technology is widely used in various intranets and local data center service clusters. However, it has limitations. It not only relies on a Layer 2 broadcast domain environment, making it unsuitable for application scenarios where DNS is deployed across different locations and data centers, but also suffers from limited detection dimensions, high false alarm rates, and the inability to perform simple failover. After the master node recovers, it is prone to IP address conflicts, seriously threatening the continuous and stable operation of DNS services. Summary of the Invention

[0005] This invention provides a method and system for cross-domain management of DNS server IP addresses, which can solve the problems of limited detection methods, disconnect between detection and recovery, and narrow applicability of high availability solutions in the prior art. It realizes fully automatic closed-loop management of online monitoring, alarm, offline replacement, and revocation of DNS server IP addresses across broadcast domains.

[0006] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions: Firstly, a method for cross-domain management of DNS server IP addresses is provided. The method includes: performing an SNMP Get operation on a target IP address at a preset period to obtain basic OID information and DNS service-specific OID information corresponding to the target IP address in layers; determining the network layer status of the target IP address based on the response status of the basic OID information; determining the DNS application layer status of the target IP address based on the return value of the DNS service-specific OID information; when it is initially determined that the network layer of the target IP address is unreachable or the DNS application layer service is abnormal, performing the SNMP Get operation again after a preset interval; if the result of the second execution still indicates that the network layer is unreachable or the DNS application layer service is abnormal, then determining that the target IP address is offline; after confirming that the target IP address is offline, instructing a preset backup device to bind to the target IP address, and directing network traffic pointing to the target IP address to the backup device through route advertising.

[0007] The method provided by this invention obtains basic OID information and DNS service-specific OID information in layers through SNMP Get, and verifies network layer reachability, device operating system layer status, and DNS application process status respectively, breaking through the single-dimensional limitation of ICMP Ping, which can only detect network layer connectivity. The judgment mechanism of two SNMP Get operations eliminates false judgments caused by network jitter. After confirming offline, it instructs the backup device to bind to the target IP address and publish routes to realize IP replacement, realizing a fully automatic closed loop from fault detection to fault recovery, and compressing the DNS server fault switching time from minutes to seconds.

[0008] In one possible implementation of the first aspect, the basic OID information includes at least one of system name, system description, and system uptime; the DNS service-specific OID information is used to verify the DNS application process status.

[0009] The method provided by this invention verifies the network layer reachability and operating system layer status of a device through basic OID, and verifies the DNS application process status through DNS service-specific OID, thereby achieving layer-by-layer delimitation of device status and avoiding false alarms of "false online" or "false offline" caused by relying solely on network layer detection.

[0010] In one possible implementation of the first aspect, instructing a preset candidate device to bind the target IP address includes: instructing the candidate device to configure a Loopback interface and bind the target IP address to the Loopback interface.

[0011] The method provided by this invention binds the target IP address through the Loopback interface. By utilizing the characteristics of the Loopback interface as a virtual interface, which does not depend on the physical link status and can be bound to any IP address, the backup device can flexibly bind the IP address that needs to be filled without changing the physical interface configuration.

[0012] In one possible implementation of the first aspect, the route advertising includes advertising a host route to the candidate device via static route injection or a dynamic routing protocol, wherein the host route is a / 32 route, and the cost value of the route advertised by the candidate device is greater than the cost value of the route corresponding to the device where the target IP address was located before it went offline.

[0013] The method provided by this invention enables cross-broadcast domain network traffic guidance by publishing / 32 host routes. The setting of the alternative route cost value being greater than that of the original route ensures that traffic is preferentially switched back to the original device after the original device is restored to online, thus avoiding route oscillation.

[0014] In one possible implementation of the first aspect, the candidate device pre-synchronizes a zone file with the primary DNS server via the DNS standard zone transfer protocol. The zone file is used to enable the candidate device to respond to DNS query requests during IP patching. The zone synchronization is time-independent of the SNMP Get operation.

[0015] The method provided by this invention decouples regional synchronization and SNMP real-time monitoring in terms of timing. Regional synchronization is responsible for batch maintenance of data consistency, while SNMP monitoring is responsible for second-level determination of device online status. The two are independent of each other, ensuring that the timeliness of fault determination is not constrained by the regional synchronization cycle.

[0016] In one possible implementation of the first aspect, the method further includes: periodically performing an SNMP Get operation on the original offline device; when it is detected that the original offline device has been restored to online status, instructing the candidate device to delete the binding of the target IP address and revoke the corresponding route advertisement, so as to realize the IP replacement cancellation.

[0017] The method provided by this invention automatically cancels the replacement after the original offline device is restored to online, avoiding suboptimal routing paths caused by long-term IP address drift, and realizing closed-loop management from replacement to restoration.

[0018] In one possible implementation of the first aspect, detecting that the original offline device has been restored to online includes: comparing the acquired basic OID information with the basic OID information of the last valid record before the original offline device went offline; if the basic OID information is consistent and the DNS service-specific OID information indicates that the service is normal, then it is determined that the original offline device has been restored to online.

[0019] The method provided by this invention determines the recovery status of a device by comparing basic OID information and verifying it with a DNS service-specific OID, thus avoiding the problem that determining recovery based solely on network layer reachability may result in DNS application layer services not being ready.

[0020] In one possible implementation of the first aspect, before instructing the candidate device to delete the binding of the target IP address and revoke the corresponding route advertisement, the method further includes: transmitting back the regional data changes that occurred on the candidate device during the IP replacement period to the original offline device via the DNS standard zone transport protocol, and performing a consistency check.

[0021] The method provided by this invention ensures the integrity and correctness of the regional data after the original device resumes takeover by transmitting the changes in regional data during the offline period back to the original device and performing consistency verification before the replacement is cancelled.

[0022] In one possible implementation of the first aspect, the method further includes: maintaining a multi-IP monitoring queue, performing parallel SNMP Get operations on multiple target IP addresses; and when multiple target IP addresses are simultaneously determined to be offline, performing replacement operations in sequence according to a preset priority order.

[0023] The method provided by this invention ensures that when multiple DNS servers fail simultaneously, the IP address carrying the high-priority domain name service is restored first, avoiding disorderly competition for backup device resources by using multi-IP parallel monitoring and priority order replacement mechanism.

[0024] In one possible implementation of the first aspect, the candidate device and the original offline device are deployed in different broadcast domains; the instruction to bind the preset candidate device to the target IP address includes: sending configuration instructions to the candidate device via SSH protocol or Telnet protocol.

[0025] The method provided by this invention fundamentally avoids the risk of IP address conflict between the original device and the replacement device when the original device is restored to online by deploying the replacement device in different broadcast domains, and solves the secondary failure problem of "inability to roll back after replacement" in the existing replacement scheme in the same broadcast domain.

[0026] Secondly, the present invention provides a cross-domain management system for DNS server IP addresses. The system includes: a monitoring module, configured to perform SNMP Get operations on a target IP address at preset intervals, acquiring basic OID information and DNS service-specific OID information corresponding to the target IP address in layers, determining the network layer status of the target IP address based on the response status of the basic OID information, and determining the DNS application layer status of the target IP address based on the return value of the DNS service-specific OID information; and a confirmation module, configured to, when it is initially determined that the network layer of the target IP address is unreachable or the DNS application layer service is abnormal, wait a preset interval before re-executing SNMP. If a Get operation is executed again and the result still indicates that the network layer is unreachable or the DNS application layer service is abnormal, then the target IP address is determined to be offline. The replacement module is used to confirm that the target IP address is offline, instruct a preset candidate device to bind to the target IP address, and redirect network traffic pointing to the target IP address to the candidate device through route advertising. The cancellation module is used to periodically execute SNMPGet operations on the original offline device. When it is detected that the original offline device has been restored to online, it instructs the candidate device to delete the binding of the target IP address and cancel the corresponding route advertising, so as to realize the IP replacement cancellation.

[0027] Thirdly, an electronic device is provided, the electronic device including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any implementation of the first aspect.

[0028] Fourthly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform a method as described in any implementation of the first aspect.

[0029] Understandably, the beneficial effects of the system of the second aspect, the electronic device of the third aspect, and the computer-readable storage medium of the fourth aspect provided above can be referenced to the beneficial effects of the first aspect and any of its possible design embodiments, which will not be repeated here. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a method for cross-domain management of DNS server IP addresses provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a control system provided in an embodiment of the present invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be described below with reference to the accompanying drawings. In the description of the present invention, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. The "or" in the present invention is merely a description of the relationship between the related objects, indicating that three relationships can exist. For example, A or B can represent: A alone, A and B simultaneously, and B alone. A and B can be singular or plural. Furthermore, in the description of the present invention, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items.

[0032] Furthermore, to facilitate a clear description of the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that the terms "first" and "second" are not necessarily different.

[0033] In this embodiment of the invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in this embodiment of the invention should not be construed as superior or more advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner for ease of understanding.

[0034] With the continuous development of internet services, domain name resolution, as a fundamental link in network access, places extremely high demands on the operational stability and fault response speed of DNS servers. DNS primary and backup nodes generally adopt a geographically distributed deployment model to achieve disaster recovery capabilities. Servers in different data centers and cities belong to different broadcast domains. Once the primary node IP fails, how to quickly complete service takeover and ensure uninterrupted domain name resolution has become a common and urgent problem to be solved in the field of network operation and maintenance.

[0035] Currently, VRRP cluster technology is widely used in the industry to achieve high availability of server IPs. It shares virtual IPs through cluster devices, relies on Layer 2 multicast heartbeat to detect the status of the master node, and automatically completes virtual IP migration when a failure occurs, thereby realizing service switching.

[0036] This technology is widely used in various intranets and local data center service clusters. However, it has limitations. It not only relies on a Layer 2 broadcast domain environment, making it unsuitable for application scenarios where DNS is deployed across different locations and data centers, but also suffers from limited detection dimensions, high false alarm rates, and the inability to perform simple failover. After the master node recovers, it is prone to IP address conflicts, seriously threatening the continuous and stable operation of DNS services.

[0037] In view of this, embodiments of the present invention provide a method and system for cross-domain management of DNS server IP addresses. The method includes: performing an SNMP Get operation on a target IP address at a preset period to obtain basic OID information and DNS service-specific OID information corresponding to the target IP address in layers; determining the network layer status of the target IP address based on the response status of the basic OID information; determining the DNS application layer status of the target IP address based on the return value of the DNS service-specific OID information; when it is first determined that the network layer of the target IP address is unreachable or the DNS application layer service is abnormal, waiting for a preset interval before performing the SNMP Get operation again; if the result of the second execution still indicates that the network layer is unreachable or the DNS application layer service is abnormal, then determining that the target IP address is offline; after confirming that the target IP address is offline, instructing a preset backup device to bind to the target IP address, and directing network traffic pointing to the target IP address to the backup device through route advertising.

[0038] The method provided by this invention obtains basic OID information and DNS service-specific OID information in layers through SNMP Get, and verifies network layer reachability, device operating system layer status, and DNS application process status respectively, breaking through the single-dimensional limitation of ICMP Ping, which can only detect network layer connectivity. The judgment mechanism of two SNMP Get operations eliminates false judgments caused by network jitter. After confirming offline, it instructs the backup device to bind to the target IP address and publish routes to realize IP replacement, realizing a fully automatic closed loop from fault detection to fault recovery, and compressing the DNS server fault switching time from minutes to seconds.

[0039] In some embodiments, the DNS server IP address cross-domain management method provided by the present invention can be executed by a DNS server IP address cross-domain management system 100 (hereinafter referred to as management system 100).

[0040] As an example, the control system 100 can be any electronic device 200 with data processing capabilities, such as a general-purpose computer, personal computer, laptop computer, switch, or tablet computer. The specific implementation method of the control system 100 is not limited here.

[0041] Figure 1A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention is shown. The electronic device 200 includes a processor 210, a memory 220, and a communication interface 230.

[0042] Processor 210 may include one or more processing cores. Processor 210 connects to various parts within electronic device 200 using various interfaces and lines, and performs various functions and processes data of electronic device 200 by running or executing instructions, programs, code sets, or instruction sets stored in memory 220, and by calling data stored in memory 220. Optionally, processor 210 may be implemented using at least one of the following hardware forms: Central Processing Unit (CPU), Graphics Processing Unit (GPU), Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA).

[0043] The memory 220 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 220 may include a non-transitory computer-readable storage medium. The memory 220 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 220 may include a program storage area. This program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described above, etc.

[0044] Communication interface 230 is used to communicate with other devices, equipment or communication networks, such as data storage devices, image processing devices or Ethernet, wireless access network (RAN), wireless local area network (WLAN), etc.

[0045] In terms of physical implementation, the aforementioned devices (such as processor 210, memory 220, and communication interface 230) can each be devices within the same device (such as a laptop computer). Alternatively, at least two of these devices can be located within the same device, i.e., as different devices within the same device, similar to the deployment of devices or components in a distributed system.

[0046] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments of the present invention, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0047] The following description, in conjunction with the accompanying drawings, illustrates a method for cross-domain management of DNS server IP addresses provided by an embodiment of the present invention.

[0048] Figure 2 This is a flowchart illustrating a method for cross-domain management of DNS server IP addresses provided in an embodiment of the present invention. Optionally, this method can be... Figure 1 The illustrated electronic device 200 performs this method, which includes the following steps: S1. Perform an SNMP Get operation on the target IP address at a preset period to obtain the basic OID information and DNS service-specific OID information corresponding to the target IP address in layers. Determine the network layer status of the target IP address based on the response status of the basic OID information, and determine the DNS application layer status of the target IP address based on the return value of the DNS service-specific OID information.

[0049] Specifically, the target IP address is the IP address of a DNS server. DNS servers can be categorized into authoritative servers, recursive servers, and caching servers based on their role in the domain name resolution system. An authoritative DNS server stores zone data for a specific domain name and provides authoritative answers. Its IP address is directly registered in the NS record of the corresponding domain name. The recursive resolver initiates a DNS query through this IP address to obtain the resolution result for the requested domain name. The unreachability of the authoritative DNS server's IP address will directly cause the resolution of all domain names it manages to fail, resulting in a wide-ranging impact and severe consequences. Therefore, the application requirement of this invention is particularly prominent for authoritative DNS servers. It should be noted that the technical solution provided by this invention is applicable to cross-domain management of the IP addresses of various DNS servers, including authoritative DNS servers, and is not limited by the server's role in the domain name resolution system. This IP address is directly registered in the NS record of the domain name, and the recursive resolver initiates a DNS query through this IP address. The unreachability of the target IP address will directly cause domain name resolution failure; therefore, its online status needs to be continuously monitored at the second level.

[0050] It should be noted that the SNMP Get operation is performed on UDP port 161. An SNMP Get operation refers to the process where the management terminal sends an SNMP GetRequest message to the managed device to request the reading of data corresponding to a specified OID node in the device's management information base. The SNMP Get operation is a single request-response interaction; the management terminal sends one GetRequest message each time, and the managed device returns a corresponding GetResponse message carrying the current value of the requested OID. Unlike the SNMP GetNext or SNMP GetBulk operations, which can traverse the MIB tree in a single operation, the SNMP Get operation only obtains the precise value of the specified OID, without incurring additional MIB tree traversal overhead, and the response message size is controllable. In this invention, the layered acquisition of basic OID information and DNS service-specific OID information in the SNMP Get operation means: the first layer acquires the basic OID reflecting the device identifier and operating status (such as sysName.0, sysDescr.0, sysUpTime.0); the second layer acquires the specific OID reflecting the DNS application process status; the two OIDs are either combined in the same GetRequest message or requested independently in multiple messages, depending on the managed device's support for the SNMP protocol. Unlike ICMP Ping, in the default policy configuration of carrier networks and enterprise firewalls, the SNMP service port (UDP 161) is usually open or whitelisted, while ICMP Echo Requests are often dropped or rate-limited by default. Therefore, in the network environment where this solution is deployed, SNMP Get has a higher detection success rate than ICMP Ping.

[0051] SNMP Get performs status verification by reading OID information from the device's MIB database in a hierarchical manner, unlike ICMP which can only detect the single dimension of network layer connectivity.

[0052] In one possible implementation, the basic OID information includes at least one of the following: system name (sysName.0), system description (sysDescr.0), and system uptime (sysUpTime.0). The system name and system description are used to verify network layer reachability and basic device identity information, while the system uptime is used to determine the device's operating system layer status: if the sysUpTime.0 return value goes to zero or changes drastically, it is determined that the device's operating system has restarted; if the sysUpTime.0 return value stops increasing, combined with the return value of the DNS service-specific OID, it is determined that the device's operating system is frozen and the DNS application process has stopped responding.

[0053] DNS service-specific OID information is used to verify the status of DNS application processes. For example, taking the BIND DNS server as an example, the DNS service-specific OID is 1.3.6.1.4.1.8072.2.3.2.1.0. If this OID returns "stopped" or unreachable, it indicates an abnormality in the DNS application layer.

[0054] The aforementioned basic OID information and DNS service-specific OID information constitute the layered detection system of this invention, with a progressively layered relationship between them: the basic OID information is located at the bottom layer of detection, responsible for verifying network layer reachability and the operating status of the device's operating system layer; the DNS service-specific OID information is located at the top layer of detection, responsible for verifying the actual working status of the DNS application process. Determining online status solely based on basic OID information has the following limitations: when the device's network layer is reachable and the operating system is running normally, the basic OID can be returned normally, but the DNS application process may have stopped responding due to configuration errors, process freezes, or resource exhaustion. In this case, determining online status solely based on the basic OID will result in a "false online" misjudgment, leading to missed fault detections. Conversely, if online status is determined solely based on the DNS service-specific OID, when an SNMP Agent or device operating system malfunction causes the DNS service-specific OID to fail to return, it is impossible to distinguish whether the fault is at the network layer, operating system layer, or DNS application layer, which is detrimental to subsequent root cause localization. Therefore, this invention jointly determines the fault level by combining the response status of the basic OID information with the return value of the DNS service-specific OID information: if the basic OID has no response, the network layer is directly determined to be unreachable; if the basic OID responds normally but the DNS service-specific OID indicates that the service has stopped, the DNS application layer service is determined to be abnormal. Any abnormality in either of these two methods triggers the subsequent confirmation process. This layered detection and joint determination mechanism enables this invention to delineate the fault level, avoiding both the "false online" false negatives of simple network layer detection and the confusion of fault levels in simple application layer detection.

[0055] If the SNMP Get request times out or receives no response, it is preliminarily determined that the SNMP management channel for the target IP address is unreachable. Possible causes include network layer unreachability, device operating system layer abnormality, or SNMP Agent process abnormality. If the DNS service's dedicated OID returns a status value indicating that the DNS service is stopped, it is determined that the DNS application layer service is abnormal. Meeting any of the above conditions preliminarily determines that the target IP address is offline or that the DNS application service is abnormal.

[0056] S2. When the network layer of the target IP address is initially determined to be unreachable or the DNS application layer service is abnormal, the SNMP Get operation is executed again after a preset interval. If the result of the second execution still indicates that the network layer is unreachable or the DNS application layer service is abnormal, the target IP address is determined to be offline.

[0057] Transient network fluctuations (such as a sudden increase in packet loss rate, a sudden increase in latency, or an exacerbation of network jitter, but the duration does not exceed the timeout threshold for a single SNMP Get operation) may cause a single SNMP Get operation to time out, resulting in a false judgment. To avoid such false judgments, the system initiates a re-judgment process (which can also be understood as a secondary confirmation mechanism) after initially determining offline status.

[0058] In one possible implementation, the preset interval is determined based on the failover time requirements of the DNS service, with an upper limit of no more than 10 seconds and a lower limit of no less than 1 second. For DNS server scenarios, the preset interval is typically 2-5 seconds. The basis for choosing this interval range is that DNS servers have stringent SLA requirements for failover time (usually on the order of seconds). An excessively long interval will prolong the service interruption period, while an excessively short interval cannot effectively eliminate network jitter that lasts for a slightly longer period.

[0059] The SNMP Get operation, executed again, will retrieve the aforementioned hierarchical OID information. If the operation still fails to obtain valid information, it confirms that the SNMP management channel for the target IP address remains unreachable; if the DNS service-specific OID still indicates that the service is stopped, it confirms that the DNS application layer service remains abnormal. If any of the above conditions are met, it is confirmed that the IP patching process needs to be initiated.

[0060] The re-evaluation mechanism significantly reduces the probability of misjudgment in a single detection, effectively avoiding unnecessary IP padding operations and IP address drift caused by momentary network anomalies.

[0061] S3. After confirming that the target IP address is offline, instruct the preset backup device to bind to the target IP address, and redirect network traffic pointing to the target IP address to the backup device through route advertising.

[0062] In one possible implementation, the system automatically triggers an alarm after confirming that the target IP address is offline.

[0063] Specifically, in a DNS server scenario, the target IP address is dedicated to hosting DNS services. If this IP address goes offline or the DNS application process malfunctions, it indicates that the DNS service is unavailable. Alarm methods include, but are not limited to, audible and visual alarms, SMS, DingTalk, email, and Syslog log push notifications. Simultaneously, alarm logs are generated, containing information such as the offline IP address, offline time, number of consecutive failures, and the device's last response OID information.

[0064] Furthermore, after triggering an alarm, the system automatically performs an IP replacement operation: it sends configuration instructions to a preset candidate device via SSH or Telnet protocol, instructing the candidate device to bind to the target IP address.

[0065] It should be noted that the embodiments of the present invention do not impose any particular restrictions on the specific implementation of sending instructions to the candidate device. The SSH and Telnet protocols mentioned above are merely exemplary remote configuration methods. In practical applications, configuration instructions can also be sent to the candidate device through the following methods or any combination thereof: issuing configuration via the NETCONF protocol, calling via the RESTCONF interface, executing via automated operation and maintenance tools such as Ansible or SaltStack, asynchronously delivering configuration tasks via message queues (such as Kafka or RabbitMQ), remote procedure calls via gRPC, or triggering the candidate device to perform binding operations via cloud platform API interfaces. Any communication method that enables the candidate device to receive and execute the instruction to bind the target IP address can be used to implement the instruction function described in the present invention, and the embodiments of the present invention do not impose any particular restrictions on this. Furthermore, the implementation of the instruction does not depend on the specific network topology relationship between the control system and the candidate device. The control system and the candidate device can be deployed on the same local area network or communicate across the public network. The communication link between the two can use methods such as dedicated lines, VPN tunnels, or TLS encrypted channels to ensure the security and reliability of instruction transmission.

[0066] Furthermore, the backup device pre-synchronizes the zone files with the primary DNS server using the DNS standard zone transfer protocol (AXFR / IXFR) to ensure zone data consistency. Zone synchronization follows the DNS protocol standard and is performed periodically according to the SOA record refresh interval (typically 15 minutes to 1 hour), independent of the second-level SNMP Get operation in terms of timing. SNMP monitoring is responsible for real-time determination of "device online status," while zone synchronization is responsible for batch maintenance of "data consistency." When the primary device goes offline due to a fault, SNMP monitoring can trigger a replacement within seconds, and the periodic delay of zone synchronization does not affect the timeliness of fault determination.

[0067] In one possible implementation, binding the target IP address on the backup device involves configuring a Loopback interface on the backup device and binding the target IP address to the Loopback interface. There are three reasons for choosing a Loopback interface: First, a Loopback interface is a virtual interface, independent of the physical link status, and therefore more stable than a physical interface; second, a Loopback interface can bind any IP address, regardless of the network segment where the backup device is located; and third, DNS service software (such as BIND) can be configured to listen on all interfaces or specify a Loopback interface, and the source address of response packets is automatically set to the Loopback binding address.

[0068] After completing the binding of the target IP address, the backup device redirects network traffic destined for that target IP address to the backup device via route advertising. In one possible implementation, route advertising includes publishing host routes to the backup device via static route injection or dynamic routing protocols (such as OSPF or BGP). These host routes are / 32 routes, and the cost value of the routes published by the backup device is greater than the cost value of the routes corresponding to the devices where the target IP address was located before it went offline. Through route advertising, DNS query traffic in the network destined for the offline IP address is redirected to the backup device.

[0069] In DNS server scenarios, DNS query requests are stateless UDP / TCP packets, requiring no source address verification. After receiving the request through the physical interface, the backup device returns a DNS response packet with the IP address bound to the Loopback interface as the source address. The backup device directly responds to DNS query requests based on the synchronized zone file, thus achieving IP address replacement.

[0070] Taking DNS servers as an example: the primary DNS server (IP 203.0.113.10, deployed in a Beijing data center) and the backup DNS server (deployed in a Shanghai data center, with all zone files pre-synchronized via AXFR / IXFR protocols) are located in different broadcast domains. The monitoring host periodically uses SNMP Get to detect the primary DNS server's basic OID and DNS service-specific OID. When the primary server goes offline due to a failure or the DNS application process malfunctions, the monitoring host, after confirmation, sends a configuration command to the Shanghai backup server via SSH, instructing it to configure the loopback0 address 203.0.113.10 / 32 and publish a / 32 host route via OSPF (with the cost value set higher than the original route). Afterward, all DNS queries sent by recursive resolvers to 203.0.113.10 will be automatically routed to the Shanghai backup server. Because the DNS protocol is a stateless service and the backup server has pre-synchronized zone files, no additional data synchronization is required to directly respond to queries, achieving seamless switching within seconds.

[0071] S4. Periodically perform SNMP Get operations on the original offline device. When it is detected that the original offline device has been restored to online, instruct the candidate device to delete the binding of the target IP address and cancel the corresponding route advertisement, so as to realize the cancellation of IP replacement.

[0072] During the IP replacement period, the system continuously performs periodic SNMP Get operations on the original offline devices to monitor whether they have returned to online.

[0073] In one possible implementation, the method for detecting whether a previously offline device has returned to online is as follows: The acquired basic OID information (sysName.0, sysDescr.0, sysUpTime.0) is compared with the basic OID information of the last valid record before the device went offline. If the basic OID information matches and the DNS service-specific OID information indicates normal service, then the device is determined to have returned to online. This dual-verification mechanism avoids the problem of determining recovery solely based on network layer reachability, which might lead to DNS application layer services not yet being ready.

[0074] After determining that the original offline device has returned to the online state, before the replacement is revoked, the system first transmits the area data changes that occurred on the candidate device during the IP replacement period back to the original offline device via the DNS standard area transfer protocol, and performs consistency verification. Specifically, the primary device prioritizes obtaining incremental change data from the candidate device via IXFR (based on the sequence number difference in the SOA record of the candidate device). If IXFR fails due to a large sequence number difference or transmission interruption, AXFR is triggered to have the candidate device transmit the complete area file back. The primary device performs consistency verification on the transmitted data (such as comparing the area file checksum or SOA sequence number). After the verification passes, the system instructs the candidate device to perform the replacement revocation operation: delete the binding of the target IP address (such as deleting the Loopback interface and the bound IP address), and revoke the corresponding route advertisement (stop / 32 host route advertisement or adjust the route cost value).

[0075] It should be noted that the backup device and the original offline device are deployed in different broadcast domains. Because the backup device and the original device are not in the same broadcast domain, the original device will not fail to function properly after resuming operation due to IP address conflicts, thus resolving the secondary failure problem of "inability to roll back after backup" in existing backup schemes within the same broadcast domain. Furthermore, since the cost value of the backup route is greater than that of the original route, network traffic automatically and preferentially switches back to the original device after the original device resumes operation, achieving a smooth traffic migration.

[0076] In one possible implementation, the method provided by the embodiments of the present invention further includes: Maintain a multi-IP monitoring queue and perform parallel SNMP Get operations on multiple target IP addresses; when multiple target IP addresses are simultaneously determined to be offline, perform replacement operations in sequence according to a preset priority order.

[0077] In actual DNS server operation and maintenance scenarios, monitoring hosts typically need to monitor the IP addresses of multiple DNS servers simultaneously. The system maintains a multi-IP monitoring queue, performs parallel SNMP Get operations on each target IP address, and the monitoring and judgment process for each IP address runs independently without blocking each other.

[0078] When multiple target IP addresses are simultaneously determined to be offline, the system performs the replacement operation in sequence according to a preset priority order to avoid competition for replacement device resources (CPU, memory, bandwidth) when multiple IPs are replaced at the same time.

[0079] In one possible implementation, the priority order is determined based on the importance level, traffic volume, or SLA level of the DNS domain name carried by each target IP address, ensuring that high-priority DNS services are restored first. For example, the authoritative server IP carrying core business domain names has higher priority than the authoritative server IP carrying secondary business domain names.

[0080] As can be seen from the above, the method provided by the embodiments of the present invention replaces ICMP Ping with SNMP Get layered OID operation to realize three-dimensional status detection of network layer, operating system layer and application layer, eliminates false judgments of instantaneous network jitter through re-judgment mechanism, realizes cross-broadcast domain IP replacement by instructing candidate devices to bind IP addresses and publish routes, and realizes automatic cancellation of replacement through periodic recovery detection.

[0081] This invention can also be understood as follows: It employs SNMP Get layered acquisition of basic OID and DNS service-specific OID, achieving a higher detection success rate compared to ICMP under the default policies of operator networks. Furthermore, it can verify the status of the network layer, operating system layer, and DNS application layer separately, solving the detection blind spot problem of traditional Ping probes. A re-judgment mechanism eliminates interference from instantaneous network jitter, significantly reducing the false alarm rate. The use of Loopback interface binding and cross-broadcast domain routing for IP replacement breaks through VRRP's limitations on Layer 2 broadcast domains and eliminates the need to pre-install cluster software on the monitored device and the backup device. The replacement cancellation mechanism, combining backup device deployment in different broadcast domains with periodic SNMP recovery detection, fundamentally avoids IP address conflicts when the original device recovers.

[0082] The foregoing mainly describes the solutions of the embodiments of the present invention from a methodological perspective. It is understood that, in order to achieve the above-mentioned functions, the control system 100 includes at least one of the hardware structures and software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of the present invention.

[0083] In this embodiment of the invention, the control system 100 can be divided into functional units according to the above method example. For example, the control system 100 can be divided into functional units corresponding to each function, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0084] For example, Figure 3 This diagram illustrates a hardware structure of a control system according to an embodiment of the present invention. The control system 100 includes: a monitoring module 110, configured to perform SNMP Get operations on a target IP address at preset intervals, hierarchically acquire basic OID information and DNS service-specific OID information corresponding to the target IP address, determine the network layer status of the target IP address based on the response status of the basic OID information, and determine the DNS application layer status of the target IP address based on the return value of the DNS service-specific OID information; a confirmation module 120, configured to, when the network layer of the target IP address is initially determined to be unreachable or the DNS application layer service is abnormal, wait a preset interval and then perform the SNMP Get operation again; if the result of the second execution still indicates that the network layer is unreachable or the DNS application layer service is abnormal, then determine that the target IP address is offline; a replacement module 130, configured to, after confirming that the target IP address is offline, instruct a preset backup device to bind to the target IP address and redirect network traffic pointing to the target IP address to the backup device through route advertising; and a cancellation module 140, configured to periodically perform SNMP operations on the original offline device. When the GET operation detects that the original offline device has been restored to online status, it instructs the candidate device to delete the binding of the target IP address and revoke the corresponding route publication, thereby realizing the cancellation of IP replacement.

[0085] It should be understood that specific descriptions of the above-mentioned optional methods can be found in the foregoing method embodiments, and will not be repeated here. Furthermore, explanations of any of the control systems 100 provided above, as well as descriptions of their beneficial effects, can be found in the corresponding method embodiments described above, and will not be repeated here.

[0086] This invention also provides a computer-readable storage medium storing at least one computer instruction, which is loaded and executed by a processor to implement the methods of the various embodiments described above. Explanations of the relevant content and descriptions of the beneficial effects of any of the computer-readable storage media provided above can be found in the corresponding embodiments described above, and will not be repeated here.

[0087] This invention also provides a chip. This chip integrates a control circuit for implementing the functions of the aforementioned control system 100 and one or more ports. Optionally, the functions supported by this chip are as described above and will not be repeated here.

[0088] Those skilled in the art will understand that the program for implementing all or part of the steps of the above embodiments, which can be executed by a program instructing related hardware, can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a random access memory, etc. The processing unit or processor mentioned above can be a central processing unit, a general-purpose processor, an application-specific integrated circuit (ASIC), a microprocessor (DSP), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.

[0089] This invention also provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform any of the methods described in the above embodiments. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this invention is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., SSD), etc.

[0090] It should be noted that the devices for storing computer instructions or computer programs provided in the embodiments of the present invention, such as, but not limited to, the aforementioned memory, computer-readable storage medium, and communication chip, are all non-transitory. Those skilled in the art should recognize that the functions described in the embodiments of the present invention in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable storage medium or transmitted as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium accessible to general-purpose or special-purpose computers.

[0091] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for cross-domain management of DNS server IP addresses, characterized in that, include: An SNMP Get operation is performed on the target IP address at a preset period to obtain the basic OID information and DNS service-specific OID information corresponding to the target IP address in layers. The network layer status of the target IP address is determined based on the response status of the basic OID information, and the DNS application layer status of the target IP address is determined based on the return value of the DNS service-specific OID information. When the network layer of the target IP address is initially determined to be unreachable or the DNS application layer service is abnormal, the SNMP Get operation is executed again after a preset interval. If the result of the second execution still indicates that the network layer is unreachable or the DNS application layer service is abnormal, the target IP address is determined to be offline. After confirming that the target IP address is offline, the system instructs a preset backup device to bind to the target IP address and redirects network traffic destined for the target IP address to the backup device via route advertising.

2. The method according to claim 1, characterized in that, The basic OID information includes at least one of the following: system name, system description, and system uptime; the DNS service-specific OID information is used to verify the DNS application process status.

3. The method according to claim 1, characterized in that, The instruction to bind a preset backup device to the target IP address includes: instructing the backup device to configure a Loopback interface and bind the target IP address to the Loopback interface.

4. The method according to claim 1, characterized in that, The route publication includes publishing host routes pointing to the candidate device through static route injection or dynamic routing protocols. The host routes are / 32 routes, and the cost value of the routes published by the candidate device is greater than the cost value of the route corresponding to the device where the target IP address was located before it went offline.

5. The method according to claim 1, characterized in that, The backup device pre-synchronizes the zone file with the primary DNS server via the DNS standard zone transfer protocol. The zone file is used to enable the backup device to respond to DNS query requests during IP patching. The zone synchronization and the SNMP Get operation are independent of each other in timing.

6. The method according to claim 1, characterized in that, The method further includes: An alarm will be automatically triggered once the target IP address is confirmed to be offline.

7. The method according to claim 1, characterized in that, The method further includes: The system periodically performs SNMP Get operations on the original offline device. When it detects that the original offline device has been restored to online status, it instructs the candidate device to delete the binding of the target IP address and revoke the corresponding route advertisement, thereby realizing the cancellation of IP replacement.

8. The method according to claim 7, characterized in that, The detection that the previously offline device has been restored to online status includes: The acquired basic OID information is compared with the basic OID information of the last valid record before the original offline device went offline. If the basic OID information is consistent and the DNS service-specific OID information indicates that the service is normal, it is determined that the original offline device has been restored to online status.

9. The method according to claim 7, characterized in that, Before instructing the candidate device to delete the binding of the target IP address and revoke the corresponding route advertisement, the method further includes: The DNS standard zone transfer protocol is used to transmit the zone data changes that occur on the candidate device during the IP replacement period back to the original offline device, and a consistency check is performed.

10. The method according to claim 1, characterized in that, The method further includes: Maintain a multi-IP monitoring queue and perform parallel SNMP Get operations on multiple target IP addresses; When multiple target IP addresses are simultaneously determined to be offline, the replacement operation is performed sequentially according to the preset priority order.

11. The method according to claim 1, characterized in that, The backup device and the original offline device are deployed in different broadcast domains; The instruction to bind the preset candidate device to the target IP address includes: Configuration commands are sent to the candidate device via SSH or Telnet protocols.

12. A DNS server IP address cross-domain management system, characterized in that, include: The monitoring module is used to perform SNMP Get operations on the target IP address at a preset period, obtain the basic OID information and DNS service-specific OID information corresponding to the target IP address in layers, determine the network layer status of the target IP address based on the response status of the basic OID information, and determine the DNS application layer status of the target IP address based on the return value of the DNS service-specific OID information. The confirmation module is used to wait a preset interval and execute the SNMP Get operation again when the network layer of the target IP address is initially determined to be unreachable or the DNS application layer service is abnormal. If the result of the second execution still indicates that the network layer is unreachable or the DNS application layer service is abnormal, then the target IP address is determined to be in an offline state. The backup module is used to confirm that the target IP address is offline, instruct a preset backup device to bind to the target IP address, and redirect network traffic pointing to the target IP address to the backup device through route advertising; The cancellation module is used to periodically perform SNMP Get operations on the original offline device. When it is detected that the original offline device has been restored to online, it instructs the candidate device to delete the binding of the target IP address and cancel the corresponding route advertisement, so as to realize the cancellation of IP replacement.

13. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the DNS server IP address cross-domain management method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to implement the DNS server IP address cross-domain management method as described in any one of claims 1-11.