Method, apparatus, device, system and storage medium for detecting server status

CN115208783BActive Publication Date: 2026-10-16HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110393387.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-13
Publication Date
2026-10-16
Estimated Expiration
2041-04-13

AI Technical Summary

Technical Problem

[0004]相关技术中,一般的探测机制是通过客户前置设备(customer premiseequipment,CPE)进行拨号感知,当CPE连续多次拨号无响应时主网络设备才会判定DHCP服务器为不可用状态,进而切换到备用的DHCP服务器上,该探测机制需要借助CPE等第三方设备去探测DHCP服务器的状态,时效性和可靠性较差

Benefits of technology

[0052]It should be understood that the beneficial effects achieved by the technical solutions of the fourth to fifteenth aspects of the embodiments of this application and the corresponding possible implementations can be referred to the above-described technical effects of the first to third aspects and their corresponding possible implementations, and will not be repeated here.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208783B_ABST
    Figure CN115208783B_ABST
Patent Text Reader

Abstract

The application discloses a method, device, equipment, system and storage medium for detecting server state, and relates to the technical field of communication. The method comprises the following steps: a first network device sends a detection packet to at least one remote server, wherein the detection packet comprises a dynamic host configuration protocol (DHCP) packet or an internet protocol version 6 dynamic host configuration protocol (DHCPv6) packet; and the first network device determines the state of the at least one remote server according to the response of the at least one remote server. The method directly sends the detection packet to the remote server through the first network device to detect the state of the remote server. The detection method does not need to pass through a third-party device, directly detects the state of the server, improves the efficiency of detecting the state of the server, further improves the switching efficiency of the server, and makes the perception of the state of the server more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to methods, apparatus, devices, systems and storage media for detecting server status. Background Technology

[0002] To enhance the reliability of users and services when accessing the network, high availability (HA) mechanisms are being deployed more and more widely. HA refers to deploying multiple network devices that act as backups for each other. The running network device is the primary network device, and the others are backup network devices. If the primary network device fails and cannot start, one of the backup network devices will quickly and automatically start and run, thus ensuring the normal operation of the entire network system.

[0003] In addition, to enable users to access the network, a Dynamic Host Configuration Protocol (DHCP) server assigns Internet Protocol (IP) addresses and lease information to users. During the user access process, the main network device needs to probe the status of the DHCP server to determine whether the DHCP server is available.

[0004] In related technologies, the general detection mechanism is to use customer premises equipment (CPE) to dial in and detect the status of the DHCP server. When the CPE dials in repeatedly without response, the main network device will determine that the DHCP server is unavailable and then switch to the backup DHCP server. This detection mechanism requires the use of third-party devices such as CPE to detect the status of the DHCP server, which has poor timeliness and reliability. Summary of the Invention

[0005] This application provides a method, apparatus, device, system, and storage medium for detecting server status to solve problems in related technologies.

[0006] In a first aspect, a method for detecting server status is provided. Taking a first network device executing the method as an example, the method includes: the first network device sending a probe message to the at least one remote server, the probe message including a DHCP message or a DHCPv6 message; the first network device determining the status of the at least one remote server based on the response of the at least one remote server.

[0007] The method of sending probe messages to a remote server through a first network device to detect the status of the remote server does not require third-party devices and directly detects the server status, thereby improving the efficiency of detecting the server status, thus improving the server switching efficiency and making the perception of the server status more accurate.

[0008] In one possible implementation, the first network device determines the status of the at least one remote server based on the response status of the at least one remote server, including: the first network device determines the number of response timeouts corresponding to each of the at least one remote server based on the response status of the at least one remote server, and determines the status of the at least one remote server based on the number of response timeouts.

[0009] Determining the remote server's status by counting response timeouts, rather than directly based on the response information, can reduce misjudgments of the remote server's status.

[0010] In one possible implementation, the first network device determines the response timeout count for each of the at least one remote server based on the response status of the at least one remote server, including: for any of the at least one remote server, in response to receiving a response packet corresponding to the probe packet returned by the at least one remote server, and the IP address in the response packet points to the first network device, setting the response timeout count for the at least one remote server to an initial value.

[0011] In response to receiving a response message corresponding to the probe message returned by any of the remote servers, and the IP address in the response message does not point to the first network device, the response timeout count corresponding to any of the remote servers is increased by a first value.

[0012] In response to not receiving a response message corresponding to the probe message from any of the remote servers, the response timeout count for any of the remote servers is increased by a second value.

[0013] In one possible implementation, determining the status of the at least one remote server based on the number of response timeouts includes: determining that the remote server corresponding to the number of response timeouts is available if the number of response timeouts is less than a reference threshold; and determining that the remote server corresponding to the number of response timeouts is unavailable if the number of response timeouts is equal to or greater than the reference threshold.

[0014] In one possible implementation, after the first network device determines the status of the at least one remote server based on the response of the at least one remote server, the method further includes: in response to the status of the primary remote server among the at least one remote servers being unavailable, activating the remote server among the at least one remote servers that is in an available state as the primary remote server, wherein the primary remote server is the remote server that provides services to the primary network device.

[0015] In one possible implementation, the first network device is the main network device in the communication system, and the communication system further includes a second network device as a backup network device. The method further includes: the first network device sending indication information to the second network device, the indication information being used to enable the second network device to determine the status of the at least one remote server, and determining whether to stop the automatic lease renewal service based on the status of the at least one remote server.

[0016] The second network device determines whether to stop the automatic lease renewal service based on the status of at least one remote server. If the primary remote server among the at least one remote server is unavailable, the automatic lease renewal service is stopped, thus resolving the issue of the second network device, which serves as a backup network device, remaining offline.

[0017] In one possible implementation, the indication information includes the number of response timeouts corresponding to each of the at least one remote server, or the indication information includes the status corresponding to each of the at least one remote server.

[0018] In one possible implementation, the method further includes: in response to satisfying the primary / backup switchover condition, the first network device switches to become the backup network device.

[0019] In one possible implementation, after the first network device switches to the backup network device, the number of response timeouts recorded on the first network device for each of the at least one remote server remains unchanged.

[0020] The unchanged number of response timeouts ensures that even in the event of a primary / backup switch, the first network device that becomes the backup network device can still determine whether to stop the automatic lease renewal service based on the status of at least one remote server, thus solving the problem of the first network device, which is the backup network device, not going offline.

[0021] In one possible implementation, the primary / backup switchover condition includes at least one of the following: a failure of the first network device, a link failure between the primary network device and the primary remote server among the at least one remote servers.

[0022] In one possible implementation, the first network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay device.

[0023] Secondly, a method for detecting server status is provided. Taking the execution of the method by a remote server as an example, the method includes: the remote server receiving a probe message sent by a first network device, the probe message including a DHCP message or a DHCPv6 message; in response to the remote server being available, returning a response message corresponding to the probe message to the first network device according to the probe message.

[0024] The remote server responds to the probe message sent by the first network device, enabling the first network device to probe the status of the remote server. This probe method does not require a third-party device; the first network device directly probes the server status, improving the efficiency of probing the server status, thereby improving the server switching efficiency and making the perception of the server status more accurate.

[0025] In one possible implementation, the first network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay device.

[0026] Thirdly, a method for detecting server status is provided. Taking the execution of the method by a second network device as an example, the method includes: the second network device receiving indication information sent by a first network device; and the second network device determining the status of at least one remote server based on the indication information.

[0027] The second network device determines the status of the remote server through the indication information sent by the first network device, and determines whether to stop the automatic lease renewal service based on the status of the remote server. This method solves the problem of backup network devices not going offline in the communication system by detecting the status of the remote server, and avoids unnecessary bandwidth waste.

[0028] In one possible implementation, the indication information includes the number of response timeouts corresponding to at least one remote server; the second network device determines the status of at least one remote server based on the indication information, including: determining that the remote server corresponding to the number of response timeouts is available if the number of response timeouts is less than a reference threshold; and determining that the remote server corresponding to the number of response timeouts is unavailable if the number of response timeouts is equal to or greater than the reference threshold.

[0029] In one possible implementation, the indication information includes the status corresponding to at least one remote server; the second network device determines the status of at least one remote server based on the indication information, including: the second network device determines the status of at least one remote server based on the status corresponding to at least one remote server.

[0030] In one possible implementation, after the second network device determines the status of at least one remote server based on the indication information, the method further includes: determining whether to stop the automatic lease renewal service based on the status of at least one remote server.

[0031] In one possible implementation, determining whether to stop the automatic lease renewal service based on the status of at least one remote server includes: in response to the status of the primary remote server among the at least one remote server being available, the second network device performs the automatic lease renewal service; in response to the status of the primary remote server among the at least one remote server being unavailable, the second network device stops the automatic lease renewal service, wherein the primary remote server is the remote server that provides services to the first network device.

[0032] Once the second network device determines that the primary remote server among at least one remote server is unavailable, it will stop the automatic lease renewal service, thereby avoiding the problem of the second network device, which serves as a backup network device, not going offline after its expiration date.

[0033] In one possible implementation, the method further includes: in response to the fulfillment of the primary / backup switchover conditions, the second network device switches to become the primary network device.

[0034] In one possible implementation, after the second network device is switched to the primary network device, the number of response timeouts for at least one remote server recorded on the second network device remains unchanged.

[0035] The unchanged number of response timeouts ensures that even in the event of a primary / backup switch, the first network device that becomes the backup network device can still determine whether to stop the automatic lease renewal service based on the status of at least one remote server, thus solving the problem of the first network device, which is the backup network device, not going offline.

[0036] In one possible implementation, the switching conditions include at least one of the following: a failure of the first network device, a failure of the link between the first network device and at least one of the primary remote servers.

[0037] In one possible implementation, the second network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay device.

[0038] Fourthly, an apparatus for detecting server status is provided, for performing the method in the first aspect or any possible implementation thereof. Specifically, the apparatus for detecting server status includes a module for performing the method in the first aspect or any possible implementation thereof.

[0039] Fifthly, an apparatus for detecting server status is provided, for performing the method in the second aspect or any possible implementation thereof. Specifically, the apparatus for detecting server status includes a module for performing the method in the second aspect or any possible implementation thereof.

[0040] Sixthly, an apparatus for detecting server status is provided, for performing the method in the third aspect or any possible implementation thereof. Specifically, the apparatus for detecting server status includes a module for performing the method in the third aspect or any possible implementation thereof.

[0041] In a seventh aspect, a network device is provided, comprising: a processor coupled to a memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor to enable the network device to implement the method for detecting server status as described above.

[0042] As an exemplary embodiment, the processor may be one or more, and the memory may be one or more.

[0043] As an exemplary embodiment, the memory may be integrated with the processor, or the memory may be disposed separately from the processor.

[0044] In specific implementation, the memory can be a non-transitory memory, such as read-only memory (ROM), which can be integrated with the processor on the same chip or set on different chips. The embodiments of this application do not limit the type of memory or the way the memory and processor are set.

[0045] Eighthly, a communication device is provided, comprising: a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive signals and transmit signals. When the processor executes the instructions stored in the memory, the communication device performs the method of the first aspect or any possible implementation of the first aspect, or performs the method of the second aspect or any possible implementation of the second aspect, or performs the method of the third aspect or any possible implementation of the third aspect.

[0046] In a ninth aspect, a system for detecting server status is provided, the system for detecting server status including a first network device, a remote server, and a second network device;

[0047] The first network device is configured to perform the method described in the first aspect or any possible implementation of the first aspect, the remote server is configured to perform the method described in the second aspect or any possible implementation of the second aspect, and the second network device is configured to perform the method described in the third aspect or any possible implementation of the third aspect.

[0048] In a tenth aspect, a computer-readable storage medium is provided, the storage medium storing at least one instruction, the instruction being loaded and executed by a processor to enable a computer to implement the method for detecting server status as described above.

[0049] In an eleventh aspect, a computer program (product) is provided, the computer program (product) comprising: computer program code, which, when executed by a computer, causes the computer to perform the methods described in the foregoing aspects.

[0050] In a twelfth aspect, a chip is provided, including a processor for retrieving and executing instructions stored in a memory, causing a communication device on which the chip is mounted to perform the methods of the above aspects.

[0051] In a thirteenth aspect, another chip is provided, comprising: an input interface, an output interface, a processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are connected via an internal connection path, and the processor is used to execute code in the memory, wherein when the code is executed, the processor is used to perform the methods in the foregoing aspects.

[0052] It should be understood that the beneficial effects achieved by the technical solutions of the fourth to fifteenth aspects of the embodiments of this application and the corresponding possible implementations can be referred to the above-described technical effects of the first to third aspects and their corresponding possible implementations, and will not be repeated here. Attached Figure Description

[0053] Figure 1 A schematic diagram of an implementation environment for detecting server status provided in an embodiment of this application;

[0054] Figure 2 A flowchart illustrating a method for detecting server status provided in an embodiment of this application;

[0055] Figure 3 A flowchart illustrating a method for detecting server status provided in an embodiment of this application;

[0056] Figure 4 A flowchart illustrating a method for detecting server status provided in an embodiment of this application;

[0057] Figure 5 A flowchart illustrating a method for detecting server status provided in an embodiment of this application;

[0058] Figure 6 An interactive schematic diagram illustrating a method for detecting server status provided in an embodiment of this application;

[0059] Figure 7 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0060] Figure 8 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0061] Figure 9 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0062] Figure 10 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0063] Figure 11 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0064] Figure 12 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0065] Figure 13 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0066] Figure 14 A schematic diagram of a device for detecting server status provided in an embodiment of this application;

[0067] Figure 15 This application provides a schematic diagram of the structure of a network device according to an embodiment of the present application.

[0068] Figure 16 This application provides a schematic diagram of the structure of a network device according to an embodiment of the present application.

[0069] Figure 17 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation

[0070] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0071] This application provides a method for detecting server status, which can be applied to... Figure 1 The implementation environment shown. For example... Figure 1 As shown, the implementation environment includes at least one client device 101, multiple network devices 102, and multiple remote servers 103.

[0072] For example, remote server 103 can be a DHCP server or a Dynamic Host Configuration Protocol for IPv6 (DHCPv6) server. Remote server 103 assigns IP / IPv6 addresses, prefixes, and network configuration parameters to client device 101. Taking remote server 103 as a DHCP server and client device 101 as a DHCP client as an example, the DHCP server assigns addresses, prefixes, and network configuration parameters to the DHCP client in response to the client's request. If the DHCP client and DHCP server are not in the same subnet, messages sent by the DHCP client and DHCP server can be forwarded through a DHCP relay to achieve cross-network segment service requests, thereby reducing the burden on network administrators and improving the manageability of address allocation. When there are multiple DHCP servers, one DHCP server is in master mode at any given time, while the others are in standby mode. When two DHCP servers are configured, dual-machine hot backup can be achieved, but this is not limited to this; multiple DHCP servers can also be configured to achieve multi-machine hot backup.

[0073] For example, network device 102 can be a broadband remote access server (BRAS), a broadband network gateway (BNG), a control plane (CP), or a DHCP relay. Here, BNG is a gateway device for broadband home users, small business users, etc., to access the internet; BRAS is an access gateway device for broadband network applications; CP is a CP device in a control plane and user plane disaggregated (CU) system; and DHCP relay is a forwarding device connecting DHCP clients and DHCP servers in different subnets. When there are multiple network devices, one network device is in master mode at any given time, while the others are in standby mode. When two network devices are configured, dual-machine hot backup can be achieved, but it is not limited to this; multiple network devices can also be configured to achieve multi-machine hot backup.

[0074] Client device 101 can send an access request to remote server 103 through network device 102. Network device 102 receives the access request from client device 101 and forwards it to remote server 103. Remote server 103 can select an address from the address pool configured under the target domain based on the service information carried in the access request and assign it to client device 101, so that client device 101 can access the network for service communication after being assigned an address. In addition, the primary network device can store the user information corresponding to client device 101 and synchronize this user information to the backup network device to ensure that when multiple network devices 102 switch over from primary to backup, the backup network device can continue to carry the user's services, that is, to ensure that the user's services are not interrupted.

[0075] Combination Figure 1 The implementation environment shown, taking the first network device executing the method as an example, illustrates the method for detecting server status provided in this application embodiment. See also Figure 2 The method includes the following steps 201 and 202.

[0076] Step 201: The first network device sends a probe message to at least one remote server, the probe message including a DHCP message or a DHCPv6 message.

[0077] In one possible implementation, the first network device is a BRAS, BNG, CP, or DHCP relay, and the probe messages include DHCP messages or DHCPv6 messages. The first network device forwards messages from client devices to the remote server. When a client device accesses the network, it requests an IP address from the remote server through the first network device; therefore, the first network device needs to probe the status of the remote server. Typically, the first network device is configured with at least one remote server. At any given time, one of these remote servers provides services to the first network device; this is called the primary remote server. When the first network device detects that the primary remote server is unavailable, it can promptly activate another available remote server as the primary remote server, ensuring the normal operation of the user's network access.

[0078] Because the first network device forwards messages from the client device to the remote server, it cannot actively determine the working status of the remote server. As a result, the first network device's fault perception of the remote server is not accurate enough, and thus it cannot start an available remote server in time to ensure the normal operation of the network system.

[0079] In IP over Ethernet (IPOE) networks, IPOE uses DHCP technology at its core to implement IP user session mechanisms, IP data flow hierarchy mechanisms, and IP session authentication and management mechanisms. The DHCP protocol is a network protocol that allows a server to automatically assign IP addresses and subnet masks to hosts within a specified range of IP addresses. According to the DHCP protocol, a DHCP client can send dial-up messages, such as a DHCP discover message, to the DHCP server. Upon receiving a DHCP discover message, the DHCP server searches for a suitable IP address in its configured address pool, adds the appropriate lease period and other configuration information (such as gateway, Domain Name System server, etc.), constructs a DHCP offer message as a response message, and returns the response message to the DHCP client.

[0080] Therefore, in this embodiment of the application, the first network device adds a mechanism to simulate a client device sending probe messages to a remote server, so that the first network device can detect the status of the remote server without relying on third-party devices such as clients.

[0081] For example, the first network device adds a mechanism to simulate a DHCP client, sending probe messages to the DHCP server. In this case, the probe message is a DHCP message, which includes, but is not limited to, DHCP discover messages or DHCP request messages. According to the DHCP protocol, when the DHCP server is operating normally, it will return a response message to the first network device after receiving the probe message. If the DHCP server malfunctions, it may not receive the probe message, or it may receive the probe message but fail to respond, resulting in the first network device not receiving a response message. Therefore, the first network device can determine the status of the DHCP server based on its response, thus enabling the first network device to actively probe the DHCP server.

[0082] In one possible implementation, this application embodiment does not limit the mechanism by which the first network device adds a simulated client. Besides the mechanism described above for adding a simulated DHCP client according to the DHCP protocol, a mechanism for adding a simulated DHCPv6 client according to the DHCPv6 protocol can also be used. For example, the first network device adds a simulated DHCPv6 client mechanism by sending a probe message to the DHCPv6 server. This probe message is a DHCPv6 message. The DHCPv6 message includes, but is not limited to, DHCPv6 solicit messages or DHCPv6 request messages. The DHCPv6 protocol is a network protocol used to assign IP addresses, IP prefixes, and / or other configurations to IPv6 hosts on an IPv6 network. Similarly, according to the DHCPv6 protocol, when the DHCPv6 server is operating normally, it will return a response message to the first network device after receiving the probe message sent by the first network device. In the event of a DHCPv6 server failure, the DHCPv6 server may not receive the probe message, or it may receive the probe message but fail to respond to it, resulting in the first network device not receiving a response message. Therefore, the first network device can determine the status of the DHCPv6 server based on the response of the DHCPv6 server, thus enabling the first network device to actively probe the DHCPv6 server.

[0083] Optionally, the first network device sending probe messages to at least one remote server includes, but is not limited to: the first network device sending probe messages to at least one remote server according to a probe cycle, or the first network device sending probe messages to at least one remote server according to a probe instruction. The probe cycle can be set based on experience or flexibly adjusted according to the application scenario; the probe instruction can be generated by the first network device according to probe needs, or generated by other devices according to probe needs and sent to the first network device. Optionally, the first network device can send probe messages to at least one remote server in a polling manner, or it can send probe messages to at least one remote server simultaneously. This application embodiment does not limit the method by which the first network device sends probe messages to at least one remote server, as long as it can send probe messages to each of the at least one remote server.

[0084] For example, the first network device sends probe packets to at least one remote server configured on the first network device every 5 seconds. In this way, the first network device continuously probes at least one remote server, and can detect changes in the state of each of the at least one remote server in a timely manner. Therefore, it can select at least one remote server in a timely manner based on the state of the remote server.

[0085] Step 202: The first network device determines the status of at least one remote server based on the response from at least one remote server.

[0086] In one possible implementation, the first network device determines the status of at least one remote server based on whether it receives a response message corresponding to a probe message returned by at least one remote server. If a response message corresponding to a probe message returned by a remote server is received, the remote server is determined to be available; if no response message corresponding to a probe message returned by a remote server is received, the remote server is determined to be unavailable. This method of determining the status of at least one remote server is prone to misjudgment because the failure to receive a response message corresponding to a probe message returned by a remote server may be due to problems such as a communication link being broken or message transmission loss, and is not necessarily due to the unavailability of the remote server. Therefore, this embodiment of the application adopts a method of counting the number of response timeouts. The number of response timeouts represents the degree of probability that the remote server is available or unavailable, and the status of the corresponding remote server can be determined more accurately based on the number of response timeouts.

[0087] In one possible implementation, the first network device determines the status of at least one remote server based on the response of at least one remote server, including: the first network device determines the number of response timeouts corresponding to each of the at least one remote server based on the response of the at least one remote server, and determines the status of at least one remote server based on the number of response timeouts.

[0088] In this embodiment of the application, after the first network device sends a probe message to at least one remote server, each of the at least one remote server will respond to the received probe message. Each remote server may receive different responses under different circumstances. The responses of the remote servers include, but are not limited to, the following three situations.

[0089] Scenario 1: The first network device receives a response message corresponding to the probe message returned by the remote server, and the IP address in the response message points to the first network device.

[0090] In this scenario, if the IP address in the response packet corresponding to the probe packet received by the first network device points to the first network device, it indicates that the response packet is a response to the probe packet sent by the first network device. If the remote server is currently running normally, then the response timeout count corresponding to the remote server is set to its initial value. The initial value represents the count value when no response timeout occurs, and this initial value can be preset, for example, set to 0.

[0091] Scenario 2: The first network device receives a response message corresponding to the probe message returned by the remote server, and the IP address in the response message does not point to the first network device.

[0092] In this second scenario, if the IP address in the response packet corresponding to the probe packet received by the first network device does not point to the first network device, it means that the response packet is not a response to the probe packet sent by the first network device. Therefore, the response timeout count for the remote server is increased by a first value. For example, since the probe packets are sent not only by the first network device but also by client devices or other devices, such as a client device communicating with the remote server through the first network device, the first network device may receive a response packet to a probe packet sent by the client device. In this case, the IP address in the response packet points to the client device. The first value can be preset, for example, set to 1.

[0093] Scenario 3: The first network device does not receive a response message corresponding to the probe message returned by any remote server.

[0094] In this second scenario, if the first network device does not receive a response message corresponding to the probe message, it means that the remote server failed to respond to the probe message sent by the first network device for some reason. In this case, it can be assumed that the remote server may be malfunctioning and not operating normally, and the response timeout count for the remote server is increased by a second value. The second value can be preset, and the first and second values ​​can be the same or different. For example, the second value can be set to be the same as the first value, both being 1.

[0095] Therefore, based on the above three scenarios, the response timeout count for each of the at least one remote server can be determined according to the response status of each remote server. Optionally, a valid time limit for the first network device to receive response packets can be set. Thus, a response packet is only valid if the first network device receives it within the valid time limit; if a response packet is received outside the valid time limit, it is treated as if no response packet was received. The valid time limit can be set based on experience or flexibly adjusted according to the application scenario.

[0096] For example, for one of the at least one remote servers, the probe period is 5 seconds, the reference time is set to 1 second, the initial value is 0, the first value equals the second value of 1. When the first network device sends the probe packet to the remote server, if it receives the corresponding response packet within 1 second, and the IP address in the response packet points to the first network device, the response timeout count for the remote server is reset to 0; if it receives the corresponding response packet within 1 second, but the IP address in the response packet does not point to the first network device, for example, it points to a third-party client device, in which case the first network device is only used for forwarding, the response timeout count for the remote server is incremented by 1; if it does not receive the corresponding response packet within 1 second, the response timeout count for the remote server is directly incremented by 1.

[0097] In one possible implementation, determining the status of at least one remote server based on the number of response timeouts includes: determining the status of the remote server corresponding to the number of response timeouts as available if the number of response timeouts is less than a reference threshold; and determining the status of the remote server corresponding to the number of response timeouts as unavailable if the number of response timeouts is equal to or greater than the reference threshold. The reference threshold can be set empirically or adjusted flexibly according to the application scenario.

[0098] For example, with a reference threshold of 5 and an initial value of 0, and a first value equal to a second value of 1, the first network device determines the status of the remote server based on the number of response timeouts corresponding to the remote server. When the response timeout count is 5, the remote server is determined to be unavailable, indicating that no response packet pointing to the first network device's IP address has been received after 5 consecutive probe packets, thus confirming that the remote server has failed. When the response timeout count is less than 5, there are two possibilities: first, a response packet pointing to the first network device's IP address is received, in which case the response timeout count is 0, indicating that the remote server is operating normally; second, no response packet pointing to the first network device's IP address is received within 4 consecutive probe packets, in which case the response timeout count is an integer greater than 0 and less than 5, indicating that it is currently uncertain whether the remote server has failed, and it is temporarily assumed that the remote server is operating normally. Then, the status of the remote server is further determined based on the response result of the next probe packet.

[0099] In other words, as long as the first network device receives a response message corresponding to the probe message even once, and the IP address in the response message points to the first network device, the previous response timeout counts, regardless of their values, are reset to the initial value, indicating that the remote server is currently available. However, if the first network device fails to receive a response message corresponding to the probe message, or receives a response message but the IP address in the response message does not point to the first network device, the status of the remote server is not immediately determined. Instead, the response to subsequent probe messages is observed several more times. Only if the response to the probe message is not received or a response message is received but the IP address in the response message does not point to the first network device for a consecutive threshold number of references, is the remote server determined to be unavailable. This avoids the misjudgment that a remote server's status as unavailable does not truly represent a fault in the remote server, making fault detection on the remote server more accurate.

[0100] In one possible implementation, after determining that a remote server is unavailable, the first network device continues to send probe packets to that remote server according to the probe cycle. Thus, when the remote server becomes available again, the first network device will detect the recovery result immediately. That is, after the first network device sends a probe packet, it receives a corresponding response packet with an IP address pointing to the first network device. The response timeout count for that remote server is reset to its initial value, and the server's status is updated to available based on the response timeout count. This ensures timely detection of remote server recovery, making the remote server selection algorithm more accurate.

[0101] In one possible implementation, after the first network device determines the status of at least one remote server based on the response of at least one remote server, it further includes: in response to the status of the primary remote server among the at least one remote server being unavailable, activating the remote server among the at least one remote server that is in an available state as the primary remote server. Here, the primary remote server is the remote server that provides services to the primary network device.

[0102] Optionally, in cases where at least one remote server comprises multiple remote servers, after determining the status of at least one remote server based on its response, the first network device will promptly switch over any unavailable primary remote server based on its status. Among the configured multiple remote servers, one provides services to the first network device; this is the primary remote server. If the primary remote server fails, network connection failures and other issues will occur, impacting the user experience. Therefore, upon detecting that the primary remote server is unavailable, another available remote server is immediately switched over to become the primary remote server to ensure normal network operation.

[0103] In one possible implementation, the first network device is the primary network device in the communication system, which also includes a second network device as a backup network device. For example, in a communication system with dual-machine hot standby, the primary network device and the backup network device are mutually backups, and only the primary network device is running at any given time. When the running primary network device fails to start or the link of the running primary network device fails, the other backup network device will quickly and automatically start and switch to become the new primary network device, while the primary network device switches to become the new backup network device.

[0104] In one possible implementation, in response to the fulfillment of the primary / backup switchover conditions, the first network device switches to the backup network device. These conditions include, but are not limited to, at least one of the following: a failure of the first network device, a link failure between the primary network device and at least one of the primary remote servers.

[0105] In this embodiment, the client device requests an IP address from a remote server through a first network device to access the network. The first network device communicates with the remote server to maintain IP address lease information and periodically updates the client device's lease information according to the lease term. The first network device and the second network device communicate to synchronize the IP address status, but the lease terms of the IP addresses maintained by the first and second network devices are different. The second network device does not communicate with the remote server and relies on a timer and an automatic renewal service to maintain the client device's IP address lease information. Therefore, after a primary / backup switch occurs, the first network device, when switching to the backup network device, will restart the timer. This causes the second network device, which has switched to the primary network device, to go offline after its IP address lease expires. However, the client routing of the first network device still exists, and the downlink traffic sent to the client becomes unknown unicast, causing unnecessary bandwidth waste.

[0106] In one possible implementation, see Figure 3 The method also includes step 203.

[0107] Step 203: The first network device sends an instruction message to the second network device. The instruction message is used to enable the second network device to determine the status of at least one remote server and, based on the status of the at least one remote server, determine whether to stop the automatic lease renewal service.

[0108] The indication information includes the number of response timeouts corresponding to at least one remote server, or the indication information includes the status corresponding to at least one remote server, or the indication information includes the number of response timeouts corresponding to at least one remote server and the status corresponding to at least one remote server.

[0109] In this embodiment, the first network device communicates with at least one remote server regarding probe messages to obtain the response timeout counts for each remote server, and determines the status of each remote server based on the response timeout counts. Since the second network device does not communicate with the at least one remote server, it can obtain the response timeout counts or statuses of the at least one remote server from the first network device. Therefore, the second network device can also detect the status of at least one remote server.

[0110] Optionally, if the indication information sent by the first network device includes the response timeout counts corresponding to at least one remote server, the second network device determines the status of at least one remote server based on the obtained response timeout counts, using the method described above for determining the status of at least one remote server based on the response timeout counts. If the indication information sent by the first network device includes the status of at least one remote server, the second network device can directly determine the status based on the status of at least one remote server. The second network device determines whether to stop the automatic lease renewal service based on the status of at least one remote server. If the primary remote server among the at least one remote server is unavailable, the automatic lease renewal service is stopped, resolving the issue of the second network device, acting as a backup network device, remaining offline.

[0111] In one possible implementation, after the first network device switches to the backup network device, the response timeout counts recorded on the first network device for each of the at least one remote server remain unchanged. Thus, if the primary remote server among the at least one remote server is unavailable, even after a primary-to-backup switch, the response timeout counts recorded on the first network device (which becomes the backup network device) remain unchanged and are the same as those recorded on the second network device (which becomes the primary network device). The first network device can still determine that the primary remote server among the at least one remote server is unavailable and thus stop the automatic lease renewal service. Therefore, even after a primary-to-backup switch, the first network device, now the backup network device, can still determine whether to stop the automatic lease renewal service based on the status of at least one remote server, thus resolving the issue of the first network device remaining offline as a backup network device.

[0112] The method provided in this application embodiment sends a probe message to a remote server through a first network device to detect the status of the remote server. This detection method does not require a third-party device and directly detects the server status, which improves the efficiency of detecting the server status, thereby improving the server switching efficiency and making the perception of the server status more accurate.

[0113] Taking the execution of this method on a remote server as an example, the method for detecting server status provided in this application embodiment will be described. See also Figure 4 The method includes the following steps 401 and 402.

[0114] Step 401: The remote server receives a probe message sent by the first network device, which includes a DHCP message or a DHCPv6 message.

[0115] In one possible implementation, the remote server is able to receive probe messages sent by a first network device, wherein the first network device is a BRAS, BNG, CP, or DHCP relay. Exemplarily, probe messages include, but are not limited to, DHCP discover messages, DHCP request messages, DHCPv6 solicit messages, and DHCPv6 request messages.

[0116] Step 402: In response to the remote server's status being available, return a response message corresponding to the probe message to the first network device based on the probe message.

[0117] In this embodiment of the application, the status of the remote server includes, but is not limited to, available and unavailable. In response to the remote server being available, the remote server will respond to the received probe message and return the response message corresponding to the probe message to the first network device.

[0118] For example, the remote server is a DHCP server. The probe message received from the first network device is a DHCP discover message. According to the DHCP protocol, the DHCP server will look up a suitable IP address in the configured address pool, add the corresponding lease period and other configuration information (such as gateway, domain name system server, etc.), construct a DHCP offer message as a response message, and return the response message to the first network device. That is, the IP address in the response message points to the first network device.

[0119] The method provided in this application embodiment allows the remote server to respond to a probe message sent by a first network device, enabling the first network device to detect the status of the remote server. This detection method does not require a third-party device; the first network device directly detects the server status, improving the efficiency of detecting the server status, thereby improving the server switching efficiency and making the perception of the server status more accurate.

[0120] Taking the execution of this method by a second network device as an example, the method for detecting server status provided in this application embodiment will be described. See also Figure 5 The method includes the following steps 501 and 502.

[0121] Step 501: The second network device receives the instruction information sent by the first network device.

[0122] In this embodiment of the application, for a communication system in a dual-machine hot standby scenario, the communication system includes a primary network device and a backup network device, wherein the first network device is the primary network device in the system, and the second network device is the backup network device in the system. Optionally, the primary network device and the backup network device are backups of each other, and only the primary network device runs at any given time. When the running primary network device fails to start or the link of the running primary network device fails, the other backup network device will quickly and automatically start and switch to become the new primary network device, while the primary network device switches to become the new backup network device.

[0123] In one possible implementation, the second network device can receive indication information sent by the first network device. Since the second network device does not communicate with the remote server, it determines the status of the remote server by receiving the indication information sent by the first network device. Optionally, the indication information includes the number of response timeouts corresponding to at least one remote server, or the indication information includes the status corresponding to at least one remote server, or the indication information includes both the number of response timeouts corresponding to at least one remote server and the status corresponding to at least one remote server. The second network device is a BRAS, BNG, CP, or DHCP relay.

[0124] Step 502: The second network device determines the status of at least one remote server based on the instruction information.

[0125] In one possible implementation, the indication information includes the number of response timeouts corresponding to at least one remote server; the second network device determines the status of at least one remote server based on the indication information, including: determining that the remote server corresponding to the number of response timeouts is available if the number of response timeouts is less than a reference threshold; and determining that the remote server corresponding to the number of response timeouts is unavailable if the number of response timeouts is equal to or greater than the reference threshold. The reference threshold can be set empirically or flexibly adjusted according to the application scenario.

[0126] For example, with a reference threshold of 5, when the response timeout count is 5, the remote server is determined to be unavailable. This means that the first network device has not received a response packet pointing to its IP address in 5 consecutive probe packets sent by the first network device, thus confirming that the remote server has failed. When the response timeout count is less than 5, there are two scenarios: First, the first network device receives a response packet pointing to its IP address, and the response timeout count is set to its initial value, for example, 0, indicating that the remote server is operating normally. Second, the first network device has not received a response packet pointing to its IP address within 4 consecutive probe packets, and the response timeout count is an integer greater than 0 and less than 5. This indicates that it is currently uncertain whether the remote server has failed, and it is tentatively assumed to be operating normally. The status of the remote server is then further determined based on the response result of the next probe packet.

[0127] In one possible implementation, the indication information includes the status of at least one remote server; the second network device determines the status of at least one remote server based on the indication information, including: the second network device determining the status of at least one remote server based on the status of at least one remote server. Optionally, the second network device can directly obtain the status of at least one remote server from the first network device without needing to perform further determination.

[0128] In one possible implementation, after the second network device determines the status of at least one remote server based on the instruction information, it further includes: determining whether to stop the automatic lease renewal service based on the status of at least one remote server.

[0129] In one possible implementation, determining whether to stop the automatic lease renewal service based on the status of at least one remote server includes: in response to the status of the primary remote server among the at least one remote server being available, the second network device performs the automatic lease renewal service; in response to the status of the primary remote server among the at least one remote server being unavailable, the second network device stops the automatic lease renewal service, wherein the primary remote server is the remote server that provides services to the primary network device.

[0130] In this embodiment, the client device requests an IP address from a remote server through a first network device to access the network. The first network device communicates with the remote server to maintain IP address lease information and periodically updates the client device's lease information according to the lease term. The first network device and the second network device communicate to synchronize the IP address status, but the lease terms of the IP addresses maintained by the first and second network devices are different. The second network device does not communicate with the remote server and relies on a timer and an automatic renewal service to maintain the client device's IP address lease information. Therefore, after a primary / backup switch occurs, the first network device, when switching to the backup network device, will restart the timer. This causes the second network device, which has switched to the primary network device, to go offline after its IP address lease expires. However, the client routing of the first network device still exists, and the downlink traffic sent to the client becomes unknown unicast, causing unnecessary bandwidth waste.

[0131] In one possible implementation, the second network device switches to become the primary network device in response to the fulfillment of the primary / standby switchover conditions. These conditions include at least one of the following: a failure of the first network device, or a link failure between the primary network device and at least one of the primary remote servers.

[0132] Optionally, after the second network device switches to the primary network device, the response timeout counts recorded on the second network device for each of the at least one remote server remain unchanged. Thus, if the primary remote server among the at least one remote server is unavailable, even if a primary / backup switch occurs, the response timeout counts recorded on the second network device (which becomes the primary network device) remain unchanged and are the same as those recorded on the first network device (which becomes the backup network device). The second network device can then continue sending probe packets to the at least one remote server based on the already recorded response timeout counts, ensuring that the response timeout count reaches a reference threshold. This allows the device to determine that the remote server is unavailable, resulting in more accurate server status awareness.

[0133] In this embodiment, the second network device determines whether to stop the automatic lease renewal service based on the status of at least one remote server. If the primary remote server among the at least one remote server is unavailable, the automatic lease renewal service is stopped, thus resolving the issue of the second network device, acting as a backup network device, remaining offline. Even if a primary / backup switch occurs, the first network device, which becomes the backup network device, can still determine whether to stop the automatic lease renewal service based on the status of at least one remote server, similarly resolving the issue of the first network device, acting as a backup network device, remaining offline.

[0134] The method provided in this application embodiment involves a second network device determining the status of a remote server through an indication message sent by a first network device, and determining whether to stop the automatic lease renewal service based on the status of the remote server. This method solves the problem of backup network devices not going offline in a communication system by detecting the status of the remote server, thus avoiding unnecessary bandwidth waste.

[0135] This application provides a method for detecting server status; see [link to relevant documentation]. Figure 6 This method includes, but is not limited to, the following processes.

[0136] 601. The first network device sends a probe message to the remote server. The probe message includes a DHCP message or a DHCPv6 message.

[0137] The implementation of 601 can be found in the relevant description of 201 above, and will not be repeated here.

[0138] 602, the remote server receives the probe message sent by the first network device.

[0139] The implementation of 602 can be found in the relevant description of 401 above, and will not be repeated here.

[0140] 603 indicates that the remote server is in an available state and returns a response message corresponding to the probe message to the first network device based on the probe message.

[0141] The implementation of 603 can be found in the relevant description of 402 above, and will not be repeated here.

[0142] 604, the first network device determines the status of the remote server based on the response from the remote server.

[0143] The implementation of 604 can be found in the relevant description of 202 above, and will not be repeated here.

[0144] 605. The first network device sends an instruction message to the second network device. The instruction message is used to enable the second network device to determine the status of the remote server and, based on the status of the remote server, to determine whether to stop the automatic lease renewal service.

[0145] The implementation of 605 can be found in the relevant description of 203 above, and will not be repeated here.

[0146] 606, The second network device receives the instruction information sent by the first network device.

[0147] The implementation of 606 can be found in the relevant description of 501 above, and will not be repeated here.

[0148] 607. The second network device determines the status of the remote server based on the instruction information.

[0149] The implementation of 606 can be found in the relevant description of 502 above, and will not be repeated here.

[0150] The above describes a method for detecting server status according to embodiments of this application. Corresponding to the above method, embodiments of this application also provide an apparatus for detecting server status. Figure 7 This is a schematic diagram of a device for detecting server status provided in an embodiment of this application. The device is applied to a first network device, which is the aforementioned... Figure 2 Or the first network device shown in Figure 6. Based on Figure 7 The following modules are shown. Figure 7 The illustrated device for detecting server status is capable of performing all or part of the operations performed by the first network device. It should be understood that the device may include more additional modules than those shown, or may omit some of the modules shown; this application embodiment does not impose limitations in this regard. Figure 7 As shown, the device includes:

[0151] The first sending module 701 is used to send a probe message to at least one remote server, the probe message including a DHCP message or a DHCPv6 message.

[0152] The determination module 702 is used to determine the status of at least one remote server based on the response of at least one remote server.

[0153] In one possible implementation, the determining module 702 is used to determine the number of response timeouts corresponding to at least one remote server based on the response status of at least one remote server, and to determine the status of at least one remote server based on the number of response timeouts.

[0154] In one possible implementation, the determining module 702 is further configured to, for any of the at least one remote server, in response to receiving a response message corresponding to a probe message returned by any remote server, and the Internet Protocol IP address in the response message pointing to the first network device, set the response timeout count corresponding to any remote server to an initial value; in response to receiving a response message corresponding to a probe message returned by any remote server, and the Internet Protocol IP address in the response message not pointing to the first network device, increase the response timeout count corresponding to any remote server by a first value; and in response to not receiving a response message corresponding to a probe message returned by any remote server, increase the response timeout count corresponding to any remote server by a second value.

[0155] In one possible implementation, the determining module 702 is further configured to determine that the state of the remote server corresponding to the number of response timeouts is available in response to the number of response timeouts being less than a reference threshold; and to determine that the state of the remote server corresponding to the number of response timeouts is unavailable in response to the number of response timeouts being equal to or greater than the reference threshold.

[0156] In one possible implementation, see Figure 8 The device also includes:

[0157] The startup module 703 is configured to, in response to the state of the primary remote server among at least one remote server being unavailable, start the remote server among at least one remote server that is in a state of availability as the primary remote server, wherein the primary remote server is the remote server that provides services to the primary network device.

[0158] In one possible implementation, the first network device is the main network device in the communication system, and the communication system also includes a second network device as a backup network device. See [link to relevant documentation]. Figure 9 The device also includes:

[0159] The second sending module 704 is used to send indication information to the second network device. The indication information is used to enable the second network device to determine the status of at least one remote server and determine whether to stop the automatic lease renewal service based on the status of at least one remote server.

[0160] In one possible implementation, the indication information includes the number of response timeouts corresponding to at least one remote server, or the indication information includes the status corresponding to at least one remote server.

[0161] In one possible implementation, see Figure 10 The device also includes:

[0162] The switching module 705 is used to switch to the standby network device in response to the fulfillment of the primary / standby switching conditions.

[0163] In one possible implementation, after switching to the backup network device, the number of response timeouts for at least one remote server recorded on the first network device remains unchanged.

[0164] In one possible implementation, the switching conditions include at least one of the following: failure of the first network device, failure of the link between the primary network device and at least one of the primary remote servers.

[0165] In one possible implementation, the first network device is a BRAS, BNG, CP, or DHCP relay.

[0166] Figure 11This is a schematic diagram of a device for detecting server status provided in an embodiment of this application. The device is applied to a remote server, which is the aforementioned... Figure 4 Or the remote server shown in Figure 6. Based on Figure 11 The following modules are shown. Figure 11 The illustrated device for detecting server status is capable of performing all or part of the operations performed by the remote server. It should be understood that the device may include more additional modules than those shown, or may omit some of the modules shown; this application embodiment does not impose limitations in this regard. Figure 11 As shown, the device includes:

[0167] The receiving module 1101 is used to receive probe messages sent by the first network device, which include DHCP messages or DHCPv6 messages;

[0168] The return module 1102 is used to respond to the remote server's status as available by returning a response message corresponding to the probe message to the first network device based on the probe message.

[0169] In one possible implementation, the first network device is a BRAS, BNG, CP, or DHCP relay.

[0170] Figure 12 This is a schematic diagram of a device for detecting server status provided in an embodiment of this application. The device is applied to a second network device, which is the one described above. Figure 5 Or the second network device shown in Figure 6. Based on Figure 12 The following modules are shown. Figure 12 The illustrated device for detecting server status is capable of performing all or part of the operations performed by the second network device. It should be understood that the device may include more additional modules than those shown, or may omit some of the modules shown; this application embodiment does not impose limitations in this regard. Figure 12 As shown, the device includes:

[0171] The receiving module 1201 is used to receive indication information sent by the first network device;

[0172] The first determining module 1202 is used to determine the status of at least one remote server based on the indication information.

[0173] In one possible implementation, the indication information includes the number of response timeouts corresponding to at least one remote server;

[0174] The first determining module 1202 is used to determine that the status of the remote server corresponding to the number of response timeouts is available when the number of response timeouts is less than a reference threshold; and to determine that the status of the remote server corresponding to the number of response timeouts is unavailable when the number of response timeouts is equal to or greater than the reference threshold.

[0175] In one possible implementation, the indication information includes the status of at least one remote server respectively;

[0176] The first determining module 1202 is used to determine the status of at least one remote server based on the status of at least one remote server respectively.

[0177] In one possible implementation, see Figure 13 The device also includes:

[0178] The second determining module 1203 is used to determine whether to stop the automatic renewal service based on the status of at least one remote server.

[0179] In one possible implementation, the second determining module 1203 is configured to perform automatic lease renewal service in response to the status of the primary remote server among at least one remote server being available; and to stop the automatic lease renewal service in response to the status of the primary remote server among at least one remote server being unavailable, wherein the primary remote server is a remote server that provides services to the primary network device.

[0180] In one possible implementation, see Figure 14 The device also includes:

[0181] The switching module 1204 is used to switch to the primary network device in response to the fulfillment of the primary / backup switchover conditions.

[0182] In one possible implementation, after switching to the primary network device, the number of response timeouts for at least one remote server recorded on the second network device remains unchanged.

[0183] In one possible implementation, the switching conditions include at least one of the following: a failure of the first network device, a failure of the link between the first network device and at least one of the primary remote servers.

[0184] In one possible implementation, the second network device is a BRAS, BNG, CP, or DHCP relay.

[0185] It should be understood that the above Figure 7-14The provided device, in implementing its functions, is only illustrated by the division of the above-described functional modules. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation processes are detailed in the method embodiments, and will not be repeated here.

[0186] See Figure 15 , Figure 15 A schematic diagram of the structure of a network device 2000 provided in an exemplary embodiment of this application is shown. Figure 15 The network device 2000 shown is used to perform the above. Figure 2-6 The methods for detecting server status are illustrated. The network device 2000 is, for example, a switch, a router, etc., and can be implemented using a general bus architecture.

[0187] like Figure 15 As shown, the network device 2000 includes at least one processor 2001, a memory 2003, and at least one communication interface 2004.

[0188] Processor 2001 may be, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the embodiments of this application. For example, processor 2001 includes application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in connection with the embodiments of this invention. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0189] Optionally, the network device 2000 also includes a bus. The bus is used to transfer information between the various components of the network device 2000. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 15 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0190] Memory 2003 may be, for example, read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Memory 2003 may exist independently and be connected to processor 2001 via a bus. Memory 2003 may also be integrated with processor 2001.

[0191] The communication interface 2004 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), or Wireless Local Area Network (WLAN). The communication interface 2004 can include wired and wireless communication interfaces. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a WLAN interface, a cellular network communication interface, or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface, or a combination thereof. In this embodiment, the communication interface 2004 can be used by the network device 2000 to communicate with other devices.

[0192] In a specific implementation, as one example, the processor 2001 may include one or more CPUs, such as... Figure 15 The CPU0 and CPU1 shown are examples of processors. Each of these processors can be a single-core processor or a multi-core processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).

[0193] In a specific implementation, as one example, the network device 2000 may include multiple processors, such as... Figure 15 The processors shown are 2001 and 2005. Each of these processors can be a single-core processor or a multi-core processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).

[0194] In a specific implementation, as one example, the network device 2000 may further include output devices and input devices. The output device communicates with the processor 2001 and can display information in various ways. For example, the output device may be a liquid crystal display (LCD), a light-emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with the processor 2001 and can receive user input in various ways. For example, the input device may be a mouse, keyboard, touchscreen device, or sensor device, etc.

[0195] In some embodiments, memory 2003 stores program code 2010 for executing the solution of this application, and processor 2001 can execute the program code 2010 stored in memory 2003. That is, network device 2000 can implement the method for detecting server status provided in the method embodiment through processor 2001 and program code 2010 in memory 2003. Program code 2010 may include one or more software modules. Optionally, processor 2001 itself may also store program code or instructions for executing the solution of this application.

[0196] In a specific embodiment, the network device 2000 of this application embodiment can correspond to the first network device in the above-described method embodiments. The processor 2001 in the network device 2000 reads instructions from the memory 2003, causing... Figure 15 The network device 2000 shown can perform all or part of the operations performed by the first network device.

[0197] Specifically, the processor 2001 is used to send probe messages, including DHCP messages or DHCPv6 messages, to at least one remote server via a communication interface; and to determine the status of at least one remote server based on the response of the at least one remote server.

[0198] Other alternative implementation methods will not be described in detail here for the sake of brevity.

[0199] For example, the network device 2000 in this application embodiment can correspond to the second network device in the above-described method embodiments. The processor 2001 in the network device 2000 reads instructions from the memory 2003, causing... Figure 15 The network device 2000 shown can perform all or part of the operations performed by the second network device.

[0200] Specifically, the processor 2001 is used to receive indication information sent by the first network device through the communication interface; and to determine the status of at least one remote server based on the indication information.

[0201] Other alternative implementation methods will not be described in detail here for the sake of brevity.

[0202] Network device 2000 can also correspond to the above. Figure 7-14 The device shown is for detecting server status. Each functional module in the device is implemented using software from network device 2000. In other words, the functional modules included in the device for detecting server status are generated by the processor 2001 of network device 2000 reading the program code 2010 stored in memory 2003.

[0203] in, Figure 2-6 The steps of the method for detecting server status shown are completed by integrated logic circuits in the hardware or by instructions in the software form of the processor of the network device 2000. The steps of the method disclosed in the embodiments of this application can be directly implemented by the hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. Since the storage medium is located in memory, the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method; to avoid repetition, these will not be described in detail here.

[0204] See Figure 16 , Figure 16 This invention provides a schematic diagram of the structure of a network device 2100 according to another exemplary embodiment of the present application. Figure 16 The network device 2100 shown is used to perform the above. Figure 2-6 The method for detecting server status shown includes all or part of the operations involved. The network device 2100 is, for example, a switch, a router, etc., and can be implemented using a general bus architecture.

[0205] like Figure 16 As shown, the network device 2100 includes a main control board 2110 and an interface board 2130.

[0206] The main control board, also known as the main processing unit (MPU) or route processor card, is used to control and manage the various components in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes a central processing unit 2111 and a memory 2112.

[0207] Interface board 2130 is also called a line processing unit (LPU), linecard, or service board. Interface board 2130 provides various service interfaces and implements packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc., with Ethernet interfaces including, for example, Flexible Ethernet Clients (FlexE Clients). Interface board 2130 includes: a central processing unit 2131, a network processor 2132, a forwarding table entry memory 2134, and a physical interface card (PIC) 2133.

[0208] The central processing unit 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processing unit 2111 on the main control board 2110.

[0209] Network processor 2132 is used to implement packet forwarding processing. Network processor 2132 can be in the form of a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented using an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA). Specifically, network processor 2132 forwards received packets based on the forwarding table stored in forwarding table entry memory 2134. If the destination address of the packet is the address of network device 2100, the packet is sent to the CPU (such as central processing unit 2131) for processing; if the destination address of the packet is not the address of network device 2100, the next hop and outgoing interface corresponding to the destination address are looked up in the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Uplink packet processing may include: packet ingress interface processing, forwarding table lookup; downlink packet processing may include: forwarding table lookup, etc. In some embodiments, the central processing unit can also perform the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for a forwarding chip on the interface board.

[0210] The physical interface card 2133 is used to implement physical layer interfacing functions. Raw traffic enters the interface board 2130 through this card, and processed packets are sent out from the physical interface card 2133. The physical interface card 2133, also called a daughter card, can be installed on the interface board 2130. It is responsible for converting photoelectric signals into packets, performing validity checks on the packets, and forwarding them to the network processor 2132 for processing. In some embodiments, the central processing unit 2131 can also perform the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, thus eliminating the need for the network processor 2132 in the physical interface card 2133.

[0211] Optionally, network device 2100 includes multiple interface boards. For example, network device 2100 also includes interface board 2140, which includes: a central processing unit 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation methods of each component in interface board 2140 are the same as or similar to those in interface board 2130, and will not be described in detail here.

[0212] Optionally, network device 2100 also includes a switching fabric board 2120. The switching fabric board 2120 can also be called a switch fabric unit (SFU). In cases where the network device has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, interface boards 2130 and 2140 can communicate through the switching fabric board 2120.

[0213] The main control board 2110 and the interface boards are coupled. For example, the main control board 2110, interface boards 2130 and 2140, and the switching network board 2120 communicate with each other via a system bus connected to the system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and interface boards 2130 and 2140, and communication between the main control board 2110 and interface boards 2130 and 2140 is achieved through the IPC channel.

[0214] Logically, network device 2100 includes a control plane and a forwarding plane. The control plane includes a main control board 2110 and a central processing unit 2111, while the forwarding plane includes various components that perform forwarding, such as a forwarding table entry memory 2134, a physical interface card 2133, and a network processor 2132. The control plane performs functions such as router operation, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of network devices. The control plane distributes the generated forwarding tables to the forwarding plane. In the forwarding plane, the network processor 2132 forwards messages received by the physical interface card 2133 based on the forwarding tables distributed by the control plane. The forwarding tables distributed by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.

[0215] It's worth noting that a network device may have one or more main control boards, including a primary and a backup main control board. It may also have one or more interface boards; the more powerful the network device's data processing capabilities, the more interface boards it provides. Each interface board may also have one or more physical interface cards. A switching board may or may not exist; multiple boards can share the load and provide redundancy. In a centralized forwarding architecture, the network device may not need a switching board, as the interface boards handle the entire system's business data processing. In a distributed forwarding architecture, the network device can have at least one switching board, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a distributed architecture network device are greater than those of a centralized architecture network device. Alternatively, the network device can also be a single board, without a switching board. The functions of the interface board and the main control board are integrated on this one board. In this case, the central processing unit (CPU) on the interface board and the CPU on the main control board can be combined into a single CPU to perform the combined functions. This type of network device has lower data exchange and processing capabilities (e.g., low-end switches or routers). The specific architecture adopted depends on the specific network deployment scenario, and no restrictions are imposed here.

[0216] In a specific embodiment, network device 2100 corresponds to the above. Figure 7 The apparatus shown is for detecting the server status of a first network device. In some embodiments, Figure 7 The first sending module 701 in the device for detecting server status shown is equivalent to the physical interface card 2133 in the network device 2100, and the determining module 702 is equivalent to the central processing unit 2111 or network processor 2132 in the network device 2100.

[0217] In some embodiments, the network device 2100 also corresponds to the above. Figure 11 The apparatus shown is for detecting the status of a remote server. In some embodiments, Figure 11 The receiving module 1101 and the returning module 1102 in the device for detecting the server status shown are equivalent to the physical interface card 2133 in the network device 2100.

[0218] In some embodiments, the network device 2100 also corresponds to the above. Figure 12 The apparatus shown is for detecting the server status of a second network device. In some embodiments, Figure 12The receiving module 1201 in the device for detecting server status shown is equivalent to the physical interface card 2133 in the network device 2100, and the first determining module 1202 is equivalent to the central processing unit 2111 or network processor 2132 in the network device 2100.

[0219] Figure 17 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 800 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 801 and one or more memories 802. The one or more memories 802 store at least one computer program, which is loaded and executed by the one or more processors 801 to enable the server to implement the methods for acquiring flight information of an aircraft provided in the various method embodiments described above. Of course, the server 800 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 800 may also include other components for implementing device functions, which will not be elaborated upon here.

[0220] Based on the above Figure 15 and Figure 16 The network devices shown are Figure 17 The server shown in this application embodiment also provides a system for detecting server status. This processing system includes: a first network device, a remote server, and a second network device. Optionally, the first network device is... Figure 15 The network device shown is 2000 or Figure 16 The network device 2100 shown has a remote server. Figure 17 The server shown, the second network device is Figure 15 The network device shown is 2000 or Figure 16 The network device shown is 2100.

[0221] The methods for detecting server status performed by the first network device, the remote server, and the second network device can be found in the above description. Figure 2-6 The relevant descriptions of the embodiments shown will not be repeated here.

[0222] This application also provides a communication device, which includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive and transmit signals. When the processor executes the instructions stored in the memory, it causes the processor to perform a method required by a first network device.

[0223] This application also provides a communication device, which includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive and transmit signals. When the processor executes the instructions stored in the memory, it causes the processor to perform a method required by a remote server.

[0224] This application also provides a communication device, which includes a transceiver, a memory, and a processor. The transceiver, the memory, and the processor communicate with each other via an internal connection path. The memory stores instructions, and the processor executes the instructions stored in the memory to control the transceiver to receive and transmit signals. When the processor executes the instructions stored in the memory, it causes the processor to perform a method required by a second network device.

[0225] It should be understood that the aforementioned processor can be a CPU, or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Computing (RISC) machines (ARM) architecture.

[0226] Furthermore, in an alternative embodiment, the memory described above may include read-only memory and random access memory, and provide instructions and data to the processor. The memory may also include non-volatile random access memory. For example, the memory may also store device type information.

[0227] The memory can be volatile or non-volatile, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0228] This application also provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to enable a computer to implement the method for detecting server status as described above.

[0229] This application also provides a computer program (product) that, when executed by a computer, causes the processor or computer to perform the corresponding steps and / or processes in the above method embodiments.

[0230] This application also provides a chip, including a processor, for calling and executing instructions stored in a memory, causing a communication device equipped with the chip to perform the method for detecting server status as described above.

[0231] This application embodiment also provides another chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute code in the memory. When the code is executed, the processor is used to execute the method for detecting server status as described above.

[0232] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. 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 processes or functions described in this application are 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, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) 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., solid-state disk).

[0233] Those skilled in the art will recognize that the method steps and modules described in conjunction with the embodiments disclosed herein can be implemented in software, hardware, firmware, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, the steps and components of each embodiment have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software 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 this application.

[0234] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0235] When implemented using software, it can be implemented wholly or partially as a computer program product. This computer program product includes one or more computer program instructions. As an example, the methods of this application embodiment can be described in the context of machine-executable instructions, such as program modules that execute on a device on a real or virtual processor of the target. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures. In various embodiments, the functionality of program modules can be combined or divided among the described program modules. The machine-executable instructions for the program modules can execute within a local or distributed device. In a distributed device, the program modules can reside on both local and remote storage media.

[0236] Computer program code used to implement the methods of the embodiments of this application may be written in one or more programming languages. This computer program code may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, such that when executed by the computer or other programmable data processing apparatus, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a computer, partially on a computer, as a standalone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server.

[0237] In the context of the embodiments of this application, computer program code or related data may be carried by any suitable carrier to enable a device, apparatus, or processor to perform the various processes and operations described above. Examples of carriers include signals, computer-readable media, etc.

[0238] Examples of signals may include electrical, optical, radio, sound, or other forms of propagation signals, such as carrier waves, infrared signals, etc.

[0239] A machine-readable medium can be any tangible medium that contains or stores programs for or relating to an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. More detailed examples of machine-readable storage media include electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0240] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0241] In the embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, devices, or modules, or they may be electrical, mechanical, or other forms of connection.

[0242] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.

[0243] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0244] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0245] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have substantially the same function and purpose. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms. These terms are merely used to distinguish one element from another. For example, without departing from the various examples described, a first image can be referred to as a second image, and similarly, a second image can be referred to as a first image. Both the first image and the second image can be images, and in some cases, they can be separate and distinct images.

[0246] It should also be understood that, in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0247] In this application, the term "at least one" means one or more, and the term "multiple" means two or more. For example, multiple second messages refer to two or more second messages. The terms "system" and "network" are often used interchangeably in this document.

[0248] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0249] It should also be understood that the term "and / or" as used herein refers to and covers any and all possible combinations of one or more of the associated listed items. The term "and / or" describes an association between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects are in an "or" relationship.

[0250] It should also be understood that the term “comprising” (also referred to as “includes”, “including”, “comprises” and / or “comprising”) as used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0251] It should also be understood that the terms “if” and “if” can be interpreted as meaning “when” or “upon”, or “in response to determination” or “in response to detection”. Similarly, depending on the context, the phrases “if determination…” or “if detection [the stated condition or event]” can be interpreted as meaning “when determination…”, or “in response to determination…”, or “when detection [the stated condition or event]” or “in response to detection [the stated condition or event]”.

[0252] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.

[0253] It should also be understood that the phrases "an embodiment," "an embodiment," and "a possible implementation" used throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment or implementation is included in at least one embodiment of this application. Therefore, the phrases "in an embodiment," "an embodiment," or "a possible implementation" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0254] The above description is only an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for detecting server status, characterized in that, Applied to a first network device, the first network device being configured with at least one remote server, the method includes: The first network device simulates a client device to send a probe message to the at least one remote server. The probe message includes a Dynamic Host Configuration Protocol (DHCP) message or an Internet Protocol version 6 (DHCPv6) message. The first network device determines the status of the at least one remote server based on the response of the at least one remote server.

2. The method according to claim 1, characterized in that, The first network device determines the status of the at least one remote server based on the response of the at least one remote server, including: The first network device determines the number of response timeouts for each of the at least one remote server based on the response status of the at least one remote server, and determines the status of the at least one remote server based on the number of response timeouts.

3. The method according to claim 2, characterized in that, The first network device determines the number of response timeouts for each of the at least one remote server based on the response status of the at least one remote server, including: For any of the at least one remote server, in response to receiving a response message corresponding to the probe message returned by the remote server, and the Internet Protocol IP address in the response message pointing to the first network device, the response timeout number corresponding to the remote server is set to an initial value. In response to receiving a response message corresponding to the probe message returned by any of the remote servers, and the IP address in the response message does not point to the first network device, the response timeout count corresponding to any of the remote servers is increased by a first value. In response to not receiving a response message corresponding to the probe message from any of the remote servers, the response timeout count for any of the remote servers is increased by a second value.

4. The method according to claim 2, characterized in that, Determining the status of the at least one remote server based on the number of response timeouts includes: If the number of response timeouts is less than a reference threshold, the status of the remote server corresponding to the number of response timeouts is determined to be available. If the number of response timeouts is equal to or greater than the reference threshold, the remote server corresponding to the number of response timeouts is determined to be unavailable.

5. The method according to any one of claims 1-4, characterized in that, After the first network device determines the status of the at least one remote server based on the response of the at least one remote server, the method further includes: In response to the status of the primary remote server among the at least one remote servers being unavailable, the remote server that is available among the at least one remote servers is activated as the primary remote server, and the primary remote server is the remote server that provides services to the first network device.

6. The method according to any one of claims 1-4, characterized in that, The first network device is the main network device in the communication system, and the communication system further includes a second network device as a backup network device. The method further includes: The first network device sends an indication message to the second network device, the indication message being used to enable the second network device to determine the status of the at least one remote server, and to determine whether to stop the automatic lease renewal service based on the status of the at least one remote server.

7. The method according to claim 6, characterized in that, The indication information includes the number of response timeouts corresponding to each of the at least one remote server, or the indication information includes the status corresponding to each of the at least one remote server.

8. The method according to claim 6, characterized in that, The method further includes: In response to the fulfillment of the primary / backup switchover conditions, the first network device switches to become the backup network device.

9. The method according to claim 8, characterized in that, After the first network device is switched to the backup network device, the number of response timeouts recorded on the first network device for each of the at least one remote server remains unchanged.

10. The method according to claim 8, characterized in that, The primary / backup switching conditions include at least one of the following: failure of the first network device, failure of the link between the primary network device and the primary remote server among the at least one remote servers.

11. The method according to any one of claims 1-4, characterized in that, The first network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay device.

12. A method for detecting server status, characterized in that, Applied to a remote server, the method includes: The remote server receives probe messages sent by the first network device simulating a client device. The probe messages include Dynamic Host Configuration Protocol (DHCP) messages or Internet Protocol version 6 (DHCPv6) messages. In response to the remote server being available, a response message corresponding to the probe message is returned to the first network device based on the probe message.

13. The method according to claim 12, characterized in that, The first network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay.

14. A method for detecting server status, characterized in that, Applied to a second network device, the method includes: The second network device receives the instruction information sent by the first network device. The first network device is the main network device in the communication system, and the second network device is the backup network device in the communication system. The first network device and the second network device are backups of each other. The main network device is configured with at least one remote server. The second network device determines the status of the at least one remote server based on the indication information.

15. The method according to claim 14, characterized in that, The indication information includes the number of response timeouts corresponding to each of the at least one remote server; The second network device determines the status of the at least one remote server based on the indication information, including: If the number of response timeouts is less than a reference threshold, the status of the remote server corresponding to the number of response timeouts is determined to be available. If the number of response timeouts is equal to or greater than the reference threshold, the remote server corresponding to the number of response timeouts is determined to be unavailable.

16. The method according to claim 14, characterized in that, The indication information includes the status corresponding to each of the at least one remote server; The second network device determines the status of the at least one remote server based on the indication information, including: The second network device determines the status of the at least one remote server based on the status of each of the at least one remote server.

17. The method according to any one of claims 14-16, characterized in that, After the second network device determines the status of the at least one remote server based on the indication information, the method further includes: Determine whether to stop the automatic lease renewal service based on the status of the at least one remote server.

18. The method according to claim 17, characterized in that, The step of determining whether to stop the automatic lease renewal service based on the status of the at least one remote server includes: In response to the status of the primary remote server among the at least one remote server being available, the second network device performs the automatic lease renewal service; In response to the status of the primary remote server among the at least one remote servers being unavailable, the second network device stops the automatic lease renewal service, wherein the primary remote server is the remote server that provides services to the primary network device.

19. The method according to any one of claims 14-16, characterized in that, The method further includes: In response to the fulfillment of the primary / backup switchover conditions, the second network device switches to become the primary network device.

20. The method according to claim 19, characterized in that, After the second network device is switched to the primary network device, the number of response timeouts recorded on the second network device for each of the at least one remote server remains unchanged.

21. The method according to claim 19, characterized in that, The primary / backup switching conditions include at least one of the following: a failure of the first network device, a link failure between the first network device and the primary remote server among the at least one remote servers.

22. The method according to any one of claims 14-16, characterized in that, The second network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay.

23. A device for detecting server status, characterized in that, The device is applied to a first network device, and the device includes: The first sending module is used to simulate a client device sending a probe message to at least one remote server. The probe message includes a Dynamic Host Configuration Protocol (DHCP) message or an Internet Protocol version 6 (DHCPv6) message. A determination module is used to determine the status of the at least one remote server based on the response of the at least one remote server.

24. The apparatus according to claim 23, characterized in that, The determining module is used to determine the number of response timeouts corresponding to the at least one remote server based on the response status of the at least one remote server, and to determine the status of the at least one remote server based on the number of response timeouts.

25. The apparatus according to claim 24, characterized in that, The determining module is further configured to, for any of the at least one remote server, in response to receiving a response message corresponding to the probe message returned by the remote server, and the Internet Protocol IP address in the response message pointing to the first network device, set the response timeout number corresponding to the remote server to an initial value. In response to receiving a response message corresponding to the probe message returned by any of the remote servers, and the IP address in the response message does not point to the first network device, the response timeout count corresponding to any of the remote servers is increased by a first value. In response to not receiving a response message corresponding to the probe message from any of the remote servers, the response timeout count for any of the remote servers is increased by a second value.

26. The apparatus according to claim 24, characterized in that, The determining module is further configured to determine that the remote server corresponding to the number of response timeouts is available when the number of response timeouts is less than a reference threshold; and to determine that the remote server corresponding to the number of response timeouts is unavailable when the number of response timeouts is equal to or greater than the reference threshold.

27. The apparatus according to any one of claims 23-26, characterized in that, The device further includes: A startup module is configured to, in response to the state of the primary remote server among the at least one remote servers being unavailable, start the remote server among the at least one remote servers that is in a state of availability as the primary remote server, wherein the primary remote server is the remote server that provides services to the primary network device.

28. The apparatus according to any one of claims 23-26, characterized in that, The first network device is the main network device in the communication system, and the communication system further includes a second network device as a backup network device. The apparatus also includes: The second sending module is used to send indication information to the second network device. The indication information is used to enable the second network device to determine the status of the at least one remote server and determine whether to stop the automatic lease renewal service based on the status of the at least one remote server.

29. The apparatus according to claim 28, characterized in that, The indication information includes the number of response timeouts corresponding to each of the at least one remote server, or the indication information includes the status corresponding to each of the at least one remote server.

30. The apparatus according to claim 28, characterized in that, The device further includes: The switching module is used to switch to standby network device in response to the fulfillment of the primary / standby switching conditions.

31. The apparatus according to claim 30, characterized in that, After switching to the backup network device, the number of response timeouts for each of the at least one remote server recorded on the first network device remains unchanged.

32. The apparatus according to claim 30, characterized in that, The primary / backup switching conditions include at least one of the following: failure of the first network device, failure of the link between the primary network device and the primary remote server among the at least one remote servers.

33. The apparatus according to any one of claims 23-26, characterized in that, The first network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay device.

34. A device for detecting server status, characterized in that, The device is used on a remote server, and the device includes: The receiving module is used to receive probe messages sent by the first network device simulating a client device, the probe messages including Dynamic Host Configuration Protocol (DHCP) messages or Internet Protocol version 6 (DHCPv6) messages; The return module is used to respond to the remote server being available by returning a response message corresponding to the probe message to the first network device based on the probe message.

35. The apparatus according to claim 34, characterized in that, The first network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay device.

36. A device for detecting server status, characterized in that, The device is applied to a second network device, and the device includes: The receiving module is used to receive indication information sent by the first network device, which is the main network device in the communication system, and the second network device is the backup network device in the communication system. The first network device and the second network device are backups of each other, and the main network device is configured with at least one remote server. The first determining module is used to determine the status of the at least one remote server based on the indication information.

37. The apparatus according to claim 36, characterized in that, The indication information includes the number of response timeouts corresponding to each of the at least one remote server; The first determining module is configured to determine that the remote server corresponding to the number of response timeouts is available when the number of response timeouts is less than a reference threshold; and to determine that the remote server corresponding to the number of response timeouts is unavailable when the number of response timeouts is equal to or greater than the reference threshold.

38. The apparatus according to claim 36, characterized in that, The indication information includes the status corresponding to each of the at least one remote server; The first determining module is used to determine the status of the at least one remote server based on the status corresponding to the at least one remote server.

39. The apparatus according to any one of claims 36-38, characterized in that, The device further includes: The second determining module is used to determine whether to stop the automatic renewal service based on the status of the at least one remote server.

40. The apparatus according to claim 39, characterized in that, The second determining module is configured to perform the automatic lease renewal service in response to the status of the primary remote server among the at least one remote server being available; and to stop the automatic lease renewal service in response to the status of the primary remote server among the at least one remote server being unavailable, wherein the primary remote server is a remote server that provides services to the primary network device.

41. The apparatus according to any one of claims 36-38, characterized in that, The device further includes: The switching module is used to switch to the primary network device in response to the fulfillment of the primary / backup switchover conditions.

42. The apparatus according to claim 41, characterized in that, After the switch to the primary network device, the number of response timeouts for each of the at least one remote server recorded on the second network device remains unchanged.

43. The apparatus according to claim 41, characterized in that, The primary / backup switching conditions include at least one of the following: a failure of the first network device, a link failure between the first network device and the primary remote server among the at least one remote servers.

44. The apparatus according to any one of claims 36-38, characterized in that, The second network device is a Broadband Remote Access Server (BRAS), a Broadband Network Gateway (BNG), a Control Plane (CP) device, or a Dynamic Host Configuration Protocol (DHCP) relay device.

45. A network device, characterized in that, The network device includes a processor coupled to a memory, the memory storing at least one program instruction or code, the at least one program instruction or code being loaded and executed by the processor to enable the network device to implement the method for detecting server status as described in any one of claims 1-22.

46. ​​A system for detecting server status, characterized in that, The system for detecting the status of the server includes a first network device, a remote server, and a second network device. The first network device is used to perform the method according to any one of claims 1-11, the remote server is used to perform the method according to any one of claims 12 or 13, and the second network device is used to perform the method according to any one of claims 14-22.

47. A computer-readable storage medium, characterized in that, The computer storage medium stores at least one instruction, which is loaded and executed by a processor to enable the computer to implement the method for detecting the server status as described in any one of claims 1-22.

Citation Information

Patent Citations

  • Master-slave switching method, network device and DHCP server

    CN102404146A

  • Distributed load balancing system, health inspection method and service node

    CN106797405A