Address Detection Method, Monitoring Device, and Egress Network Device
The monitoring device sends a detection message to the exit network device, and uses the detection results to judge the availability of the exit public network IP address, solving the problem that the availability of the exit public network IP address cannot be effectively detected in the prior art, and effectively detecting and managing the exit public network IP address.
Patent Information
- Application Number
- CN202211692667.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-12-28
AI Technical Summary
The method of detecting the IP address of the service website in the prior art has great limitations and cannot reflect the availability of the export public network IP address.
The monitoring device sends a detection message for the target public network website to the exit network device, and uses the detection results to determine the availability of the exit public network IP address. The specific steps include: the monitoring device sends a detection message, the exit network device determines the corresponding exit public network IP address based on the address mapping table, and sends the detection message to the target public network website, the monitoring device obtains the detection results, and judges whether there is an abnormality in the exit public network IP address based on the results.
The availability detection of the outgoing public network IP address is realized, and the problem that the existing technology cannot effectively reflect the availability of the outgoing public network IP address is solved, and the reliability of network communication is improved.
Smart Images

Figure CN116232960B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technologies, and particularly relates to an address detection method, a monitoring device, and an egress network device. Background Art
[0002] Currently, devices within an internal network cannot directly access the public network and can only send data to the public network via an egress network device. When the egress network device forwards data of internal network devices to the public network, it needs to use an egress public IP address. If there is a problem with the egress public IP address, network communication using this IP address cannot proceed normally.
[0003] In related technologies, various methods for detecting the availability of IP addresses have emerged. However, the methods in related technologies focus on detecting the IP addresses of target websites (public network websites) that provide services. This method of detecting the IP addresses of service websites has great limitations and cannot reflect the availability of the egress public IP address. Summary of the Invention
[0004] Embodiments of this application provide an address detection method, a monitoring device, and an egress network device, which can solve the problem that the method of detecting the IP addresses of service websites in related technologies has great limitations and cannot reflect the availability of the egress public IP address.
[0005] In a first aspect, embodiments of this application provide an address detection method, which includes:
[0006] A monitoring device sends a probe message for a target public network website to an egress network device; wherein, the probe message carries a first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0007] The monitoring device obtains a detection result corresponding to the probe message;
[0008] When the detection result meets a target condition, it is determined that a second IP address is abnormal;
[0009] When the detection result does not meet the target condition, it is determined that the second IP address is normal;
[0010] Wherein, the second IP address is an egress public IP address corresponding to the first IP address.
[0011] In a second aspect, embodiments of this application provide an address detection method, which includes:
[0012] An egress network device receives a probe message for a target public network website sent by a monitoring device; wherein, the probe message carries a first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0013] The egress network device determines a second IP address according to a preset address mapping table, where the second IP address is the egress public network IP address corresponding to the first IP address, and the address mapping table is used to store the corresponding relationship between the internal network IP address of the monitoring device and the egress public network IP address;
[0014] The egress network device sends the probe message to the target public network website based on the second IP address, so that the monitoring device obtains the probe result corresponding to the probe message. When the probe result meets the target condition, it is determined that the second IP address is abnormal. When the probe result does not meet the target condition, it is determined that the second IP address is normal.
[0015] In a third aspect, an embodiment of the present application provides an address detection device, which includes:
[0016] A sending module, configured to send a probe message for a target public network website to an egress network device; where the probe message carries a first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0017] An obtaining module, configured to obtain a probe result corresponding to the probe message;
[0018] A determining module, configured to determine that the second IP address is abnormal when the probe result meets the target condition; and determine that the second IP address is normal when the probe result does not meet the target condition; where the second IP address is the egress public network IP address corresponding to the first IP address.
[0019] In a fourth aspect, an embodiment of the present application provides an address detection device, which includes:
[0020] A receiving module, configured to receive a probe message for a target public network website sent by a monitoring device; where the probe message carries a first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0021] A determining module, configured to determine a second IP address according to a preset address mapping table, where the second IP address is the egress public network IP address corresponding to the first IP address, and the address mapping table is used to store the corresponding relationship between the internal network IP address of the monitoring device and the egress public network IP address;
[0022] A sending module, configured to send the detection message to the target public network website based on the second IP address, so that the monitoring device obtains a detection result corresponding to the detection message. When the detection result meets the target condition, it is determined that the second IP address is abnormal; when the detection result does not meet the target condition, it is determined that the second IP address is normal.
[0023] In a fifth aspect, an embodiment of the present application provides a monitoring device, which includes a processor and a memory. The memory stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0024] In a sixth aspect, an embodiment of the present application provides an egress network device, which includes a processor and a memory. The memory stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the method described in the second aspect are implemented.
[0025] In a seventh aspect, an embodiment of the present application provides a readable storage medium, on which programs or instructions are stored. When the programs or instructions are executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0026] In an eighth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method described in the first aspect or the second aspect.
[0027] In a ninth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect or the second aspect.
[0028] In an embodiment of the present application, a monitoring device sends a detection message for a target public website to an egress network device; wherein, the detection message carries a first IP address of the monitoring device, and the first IP address is an internal network IP address; the monitoring device obtains a detection result corresponding to the detection message; in the case where the detection result meets a target condition, it is determined that a second IP address is abnormal; in the case where the detection result does not meet the target condition, it is determined that the second IP address is normal; wherein, the second IP address is an egress public network IP address corresponding to the first IP address. In this way, after the monitoring device sends a detection message for a target public website to the egress network device, it can obtain the corresponding detection result, analyze the detection result, and determine whether the detection result meets the target condition, so as to realize detecting whether the egress public network IP address corresponding to the first IP address can be used normally based on the detection result and the target condition, thereby solving the problem that the method for detecting the IP address of a service website in the related art has great limitations and cannot reflect the availability of the egress public network IP address. Description of the Drawings
[0029] Figure 1 is a schematic diagram of an address detection system architecture provided by an embodiment of the present application;
[0030] Figure 2 is a flowchart of an address detection method provided by an embodiment of the present application;
[0031] Figure 3 is a flowchart of another address detection method provided by an embodiment of the present application;
[0032] Figure 4 is a flowchart of another address detection method provided by an embodiment of the present application;
[0033] Figure 5 is a flowchart of another address detection method provided by an embodiment of the present application;
[0034] Figure 6 is a flowchart of an address detection device provided by an embodiment of the present application;
[0035] Figure 7 is a flowchart of another address detection device provided by an embodiment of the present application;
[0036] Figure 8 is a structural block diagram of a monitoring device provided by an embodiment of the present application;
[0037] Figure 9 is a structural block diagram of an egress network device provided by an embodiment of the present application. Detailed Embodiments
[0038] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0039] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually of the same category, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.
[0040] Next, in conjunction with the accompanying drawings, the address detection method, address detection device, monitoring device, and egress network device provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0041] Figure 1 is a schematic diagram of an address detection system architecture provided by an embodiment of the present application. As Figure 1 shown, the address detection system architecture may include a monitoring device, an egress network device, and a specified website on the public network. Among them, the monitoring device can be an intranet device, and the monitoring device can initiate a probe of the specified website on the public network. The egress network device can use different egress public network IP addresses as the source address to initiate access to the detected website for the probe data packets sent by different virtual network cards in the monitoring device, and return the access result to the monitoring device when the access result is received. The program in the monitoring device can complete the processing of the detection result, the interaction with the database, the generation of instructions, and call the application program interface (Application Program Interface, API) interface of the egress network device to control the addition and deletion of the IP address configuration of the egress network device.
[0042] Figure 2 is a flowchart of an address detection method provided by an embodiment of the present application. The address detection method provided by the embodiments of the present application can be executed by a monitoring device, where the monitoring device can be an intranet electronic device, such as an intranet computer, an intranet server, etc. As Figure 2 shown, the address detection method provided by the embodiments of the present application may include the following steps:
[0043] Step 210, the monitoring device sends a probe message for the target public network website to the egress network device; wherein, the probe message carries the first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0044] The target public network website can be any website that provides stable services on the public network. The probe message can be at least one message. The monitoring device can send probe messages for the target public network website to the egress network device multiple times within a fixed time period (for example, within one minute).
[0045] Among them, the monitoring device can include at least one virtual network card, and the first IP address can be the IP address of any one of the at least one virtual network card. Different virtual network cards can correspond to different IP addresses. The probe message can be a message sent by the virtual network card in the monitoring device. Specifically, a batch probe script can be deployed on the monitoring device. The probe script can use different virtual network cards to send probe messages through a polling mechanism. If it is set to send probe messages three times per second, then each virtual network card can send a probe message to the egress network device each time it is sent.
[0046] After receiving the probe message carrying the first IP address, the egress network device can map the first IP address to the corresponding second IP address (egress public network IP address) according to the mapping rule, and forward the probe message to the target public network website with the second IP address as the source address. Among them, the mapping rule can include a rule that maps the internal network IP address (the first IP address) of the virtual network card one-to-one or many-to-one to the egress public network IP address. That is, the egress public network IP addresses corresponding to the internal network IP addresses of different virtual network cards can be the same or different.
[0047] Specifically, multiple egress public network IP addresses can be configured on the egress network device, and these egress public network IP addresses can form an address pool. When an internal network device accesses the Internet, the egress network device can select an egress public network IP address from the address pool as the source address of the data packet according to the mapping rule. In order to detect the availability of each egress public network IP address, the monitoring device can create multiple virtual network cards and configure different static internal network IP addresses in the same network segment for each virtual network card. At the same time, a mapping rule can be configured on the egress network device to map these internal network IP addresses (the first IP address) one-to-one to different egress public network IP addresses (the second IP address), so that the probe messages sent by different virtual network cards use different egress public network IP addresses as the source address to initiate access to the website to be probed. The one-to-one mapping can cover all egress public network IP addresses in the address pool, and one internal network IP address of a virtual network card corresponds to one egress public network IP address, so as to detect the availability of each egress public network IP address.
[0048] Of course, it should be noted that the number of virtual network cards can be greater than the number of public network IP addresses in the address pool for egress. In this case, mapping rules for one-to-many mapping of the internal network IP addresses of the virtual network cards to the public network IP addresses in the address pool can be configured on the egress network device, and it is ensured that each public network IP address in the address pool has a corresponding internal network IP address. In this way, all public network IP addresses in the address pool can also be covered during the address detection process, and the availability of each public network IP address can be detected. Additionally, when only the availability of some public network IP addresses needs to be detected, mapping rules for one-to-many mapping of the internal network IP addresses of the virtual network cards to the public network IP addresses can also be configured on the egress network device.
[0049] Step 220, the monitoring device obtains the detection result corresponding to the probe packet;
[0050] The detection result may include not receiving a response packet for the probe packet, or receiving a response packet for the probe packet.
[0051] After the monitoring device sends a probe packet for a target public network website to the egress network device, if the monitoring device does not subsequently receive a response packet from the target public network website forwarded by the egress network device, the detection result may be not receiving a response packet for the probe packet.
[0052] After the monitoring device sends a probe packet for a target public network website to the egress network device, if the monitoring device subsequently receives a response packet from the target public network website forwarded by the egress network device, the detection result may be receiving a response packet for the probe packet.
[0053] Step 230, when the detection result meets the target condition, it is determined that the second IP address is abnormal;
[0054] The target condition may include not receiving a response packet for the probe packet, or there being a problem with the response packet received for the probe packet. When the detection result meets the target condition, it can be determined that the second IP address is abnormal and cannot be used normally currently. During the process of determining that the second IP address is abnormal, the monitoring device can first determine the virtual network card corresponding to the detection result that meets the target condition, and then further determine the second IP address corresponding to the virtual network card.
[0055] Specifically, the monitoring device can, through program settings, make the detection packets sent from different virtual network cards carry different serial numbers. The received response packets can also carry the same serial numbers. Among them, the serial number can be the unique identifier or number of the virtual network card, used to distinguish different virtual network cards. Thus, when there is a problem with the received response packet, the monitoring device can determine the matching virtual network card according to the serial number in the response packet, and then use the database or storage table to determine the corresponding public network IP address (the second IP address) of this virtual network card, so as to determine that the second IP address is abnormal. Among them, the database or storage table can be used to store the correspondence between the virtual network card and the public network IP address.
[0056] When the response packet of the detection packet is not received, the monitoring device can first determine the detection packet corresponding to the detection result that meets the target condition, then determine the corresponding virtual network card according to the serial number in the detection packet, and further determine the second IP address corresponding to the virtual network card, so as to determine that the second IP address is abnormal.
[0057] Step 240, in the case where the detection result does not meet the target condition, determine that the second IP address is normal; where the second IP address is the public network IP address corresponding to the first IP address.
[0058] When the detection result is that the response packet of the detection packet is received and there is no problem with the response packet, it can be determined that the second IP address is normal and can be used normally at present. In the process of determining that the second IP address is normal, the monitoring device can first determine the virtual network card corresponding to the detection result that does not meet the target condition, and then further determine the second IP address corresponding to the virtual network card.
[0059] Specifically, the monitoring device can, through program settings, make the detection packets sent from different virtual network cards carry different serial numbers. The received response packets can also carry the same serial numbers. Among them, the serial number can be the unique identifier or number of the virtual network card, which can be used to distinguish different virtual network cards. Thus, when the obtained detection result does not meet the target condition, the monitoring device can determine the matching virtual network card according to the serial number in the response packet, and then use the database or storage table to determine the corresponding public network IP address (the second IP address) of this virtual network card, so as to determine that the second IP address is normal.
[0060] The address detection method provided by the embodiment of the present application can obtain the corresponding detection result after sending a detection message for a target public website to an egress network device. By analyzing the detection result to determine whether the detection result meets the target condition, it can be realized to detect whether the egress public IP address corresponding to the first IP address can be used normally based on the detection result and the target condition, thus solving the problem that the method for detecting the IP address of a service website in the related art has great limitations and cannot reflect the availability of the egress public IP address.
[0061] As described above, the detection message can be at least one message. The cases where the detection message is one message and the detection message is multiple messages will be introduced separately later. In an embodiment of the present application, the target condition includes: not receiving a response message of the detection message within a predetermined time; step 220 where the monitoring device obtains the detection result corresponding to the detection message can include: if the monitoring device does not receive a response message of the detection message within a predetermined time, determining that the detection result corresponding to the detection message is not receiving the response message of the detection message; step 230 where in the case that the detection result meets the target condition, determining that the second IP address is abnormal can include: the monitoring device determines that the second IP address is abnormal in the case of not receiving a response message of the detection message within a predetermined time. Thus, if a response message of the detection message is not received within a predetermined time, it can be quickly determined that the second IP address is abnormal.
[0062] The predetermined time can be 2 minutes, 3 minutes, etc., and can be specifically determined according to the actual situation, and there is no excessive limitation in the embodiment of the present application.
[0063] In an embodiment of the present application, the detection message includes a first detection message and a second detection message; the predetermined time includes a first predetermined time and a second predetermined time; step 210 where the monitoring device sends a detection message for a target public network website to the egress network device may include: the monitoring device sends a first detection message and a second detection message for the target public network website to the egress network device; step 220 where the monitoring device obtains the detection result corresponding to the detection message may include: the monitoring device obtains a first detection result corresponding to the first detection message and a second detection result corresponding to the second detection message; when the monitoring device does not receive a response message for the detection message within the predetermined time, determining that the second IP address is abnormal may include: when the monitoring device does not receive a first response message for the first detection message within the first predetermined time and does not receive a second response message for the second detection message within the second predetermined time, determining that the second IP address is abnormal. In this way, by using multiple detection messages to detect the target public network website and determining that the second IP address is abnormal when no response message for any detection message is received, the status of the second IP address can be determined more accurately, avoiding misjudgment.
[0064] The first detection message and the second detection message may be messages generated according to different detection commands. Among them, the detection commands may include detection commands for detecting network connectivity, such as the Packet Internet Groper (ping) command, detection commands for uploading or downloading files / data, such as the Command Line Uniform Resource Locator (curl) command, or custom detection commands for detecting communication situations. The first predetermined time and the second predetermined time may be the same or different, and no excessive restrictions are imposed in the embodiments of the present application.
[0065] The detection message in the embodiments of the present application may be a message carrying different data generated according to different detection commands. In an embodiment of the present application, the detection message includes a detection message generated based on the ping command; the detection result includes a response message; the target condition includes: the response message indicates that the target public network website is unreachable, or the response message indicates that the delay time is greater than a preset value. In this way, by using the detection message generated based on the ping command to detect the target public network website, the corresponding detection result can be obtained quickly, and the abnormal situation of the egress public network IP address can be accurately judged according to the detection result.
[0066] In an embodiment of the present application, when the response message of the detection result indicates that the target public network website is unreachable, or the response message indicates that the delay time is greater than a preset value, it can be determined that the detection result is abnormal. When the response message is normal and the delay time is less than the threshold, it can be determined that the detection result is normal. Among them, a normal detection result can indicate that the network connectivity for accessing the target public network website using the current egress public network IP address as the source address is normal. Among them, the delay time can reflect the network delay situation between the monitoring device and the target public network website.
[0067] When the detection result meets the target condition, that is, when the response message in the detection result indicates that the target public network website is unreachable, or the response message indicates that the delay time is greater than the preset value, the monitoring device can determine that the second IP address is abnormal.
[0068] When the detection result does not meet the target condition, that is, when the response message in the detection result is normal and the delay time is less than the preset value, the monitoring device can determine that the second IP address is normal. Among them, the response message indicating that the public network website is unreachable may include fields such as an unresolvable host name or an asterisk in the response message. The delay time can be, for example, 480ms, 500ms, etc., and can be specifically selected according to the actual situation.
[0069] Optionally, in an embodiment of the present application, the detection message includes a detection message generated based on the curl command; the detection result includes a response message; the target condition includes: there is no content in the response message, or there is an error code in the response message. In this way, by using the detection message generated based on the curl command to detect the target public network website, it is possible to quickly obtain the corresponding detection result and accurately judge the abnormal situation of the egress public network IP address according to the detection result.
[0070] In an embodiment of the present application, when there is no content in the response message or there is an error code in the response message, it can be determined that the detection result is abnormal. When there is content in the response message, there is no error code, and it matches the detection message, it can be determined that the detection result is normal. Among them, a normal detection result can indicate that the service connectivity for accessing the target public network website using the current egress public network IP address as the source address is normal.
[0071] When the detection result meets the target condition, that is, when the detection result is abnormal, the monitoring device can determine that the second IP address is abnormal.
[0072] When the detection result does not meet the target condition, that is, when the detection result is normal, the monitoring device can determine that the second IP address is normal.
[0073] Figure 3 It is a flowchart of another address detection method provided by an embodiment of the present application. As Figure 3As shown in the figure, the address detection method provided by the embodiment of the present application may include the following steps:
[0074] Step 310, the monitoring device sends a first detection message and a second detection message for a target public network website to the egress network device; wherein, the first detection message and the second detection message carry the first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0075] The first detection message and the second detection message may be messages generated according to different detection commands. Among them, the detection commands may include detection commands for detecting network connectivity, such as the ping command, detection commands for uploading or downloading files / data, such as the curl command, or custom detection commands for detecting communication situations.
[0076] Step 320, the monitoring device obtains a first detection result corresponding to the first detection message and a second detection result corresponding to the second detection message;
[0077] The first detection result may include receiving a response message for the first detection message or not receiving a response message for the first detection message. The second detection result may include receiving a response message for the second detection message or not receiving a response message for the second detection message.
[0078] Step 330, when the first detection result meets the first target condition and the second detection result meets the second target condition, it is determined that the second IP address is abnormal;
[0079] The first target condition may include not receiving a response message for the first detection message, or there is a problem with the response message received for the first detection message.
[0080] The second target condition may include not receiving a response message for the second detection message, or there is a problem with the response message received for the second detection message.
[0081] When the first detection result meets the first target condition and the second detection result meets the second target condition, it can be determined that the second IP address is abnormal and cannot be used normally currently.
[0082] Step 340, when the first detection result does not meet the first target condition, and / or the second detection result does not meet the second target condition, it is determined that the second IP address is normal; wherein, the second IP address is the egress public network IP address corresponding to the first IP address.
[0083] When the first detection result is receiving a response message for the first detection message and the response message is normal, it can be determined that the first detection result does not meet the first target condition. At this time, the first detection result is normal.
[0084] When the second detection result is a response message received for the second detection message and the response message is normal, it can be determined that the second detection result meets the second target condition. At this time, the second detection result is normal.
[0085] In the case where the first detection result does not meet the first target condition and / or the second detection result does not meet the second target condition, it can be determined that the second IP address is normal and can be used normally at present. In other words, when there is at least one normal detection result among the first detection result and the second detection result, it can be determined that the second IP address is normal.
[0086] The address detection method provided by the embodiments of this application can introduce the first detection message and the second detection message, and use the first detection message and the second detection message to detect the target public network website, so as to combine the detection results of the first detection message and the second detection message to comprehensively judge whether the egress public network IP address is abnormal. In this way, not only can it be detected whether the egress public network IP address can be used normally, but also the detection accuracy can be improved, and the situation where a single detection message cannot accurately reflect the egress IP address can be avoided.
[0087] Optionally, in an embodiment of this application, the first detection message includes a detection message generated based on the ping command; the first detection result includes a first response message; the first target condition includes: the first response message indicates that the target public network website is unreachable, or the first response message indicates that the delay time is greater than the threshold; the second detection message includes a detection message generated based on the curl command; the second detection result includes a second response message; the second target condition includes: there is no content in the second response message, or there is an error code in the second response message. In this way, a ping + curl dual verification mechanism can be adopted to perform verification at both the application layer and the network layer simultaneously, reducing the probability of missing detection and misjudging the abnormal second IP address.
[0088] In the case where the first response message of the first detection result indicates that the target public network website is unreachable, or the first response message indicates that the delay time is greater than the threshold, it can be determined that the first detection result meets the first target condition. At this time, the first detection result is abnormal.
[0089] In the case where the first response message is normal and the delay time is less than the threshold, it can be determined that the first detection result does not meet the first target condition. At this time, the first detection result is normal.
[0090] In the case where there is no content in the second response message of the second detection result, or there is an error code in the second response message, it can be determined that the first detection result meets the second target condition. At this time, the second detection result is abnormal.
[0091] When the second response message is normal, it can be determined that the second detection result does not meet the target condition, and at this time, the second detection result is normal.
[0092] In the embodiment of the present application, when the first detection result meets the first target condition and the second detection result meets the second target condition, the monitoring device can determine that the second IP address is abnormal and cannot be used normally currently. When the first detection result does not meet the first target condition, and / or, the second detection result does not meet the second target condition, the monitoring device can determine that the second IP address is normal and can be used normally currently.
[0093] There are a total of four combinations of the first detection result and the second detection result. For ease of understanding, the following will introduce in combination with the actual combination situation. Specifically, when the first detection result is normal and the second detection result is normal, code = 0 can be set. When the first detection result is normal and the second detection result is abnormal, code = 1 can be set. When the first detection result is abnormal and the second detection result is normal, code = 2 can be set. When the first detection result is abnormal and the second detection result is abnormal, code = 3 can be set. Among them, cede = 0, 1, 2 can indicate that the public network IP address corresponding to the current detection is available (normal), and code = 3 can indicate that the public network IP address corresponding to the current detection is unavailable (abnormal). The process of determining whether the public network IP address can be used can be implemented by a program in the monitoring device.
[0094] After determining that the second IP address is abnormal, the monitoring device can trigger a penalty mechanism to manage the abnormal second IP address. In an embodiment of the present application, after determining that the second IP address is abnormal in step 230 or step 330, the address detection method may further include: under the condition of meeting the first specified condition, the monitoring device sends deletion indication information to the egress network device, and the deletion indication information is used to indicate deleting the second IP address, so that the egress network device deletes the second IP address according to the deletion indication information. In this way, by sending deletion indication information under the condition of meeting the first specified condition and not sending deletion indication information under the condition of not meeting the first specified condition, occasional network jitters can be tolerated, and at the same time, abnormalities can be detected in a relatively short time, which is beneficial to timely deleting the unusable second IP address.
[0095] The first specified condition may include that the cumulative number or frequency of anomalies of the second IP address is not less than a first threshold, and the second IP address has not been penalized yet. Taking the first threshold as 5 times as an example, if a virtual network card in the monitoring device sends three probe messages per second, and it is continuously determined that the second IP address is abnormal 5 times based on the probe results and the second IP address has not been penalized yet, it can be determined at this time that the first specified condition is met, and the monitoring device can send deletion indication information to the egress network device. When the first specified condition is not met, for example, when the cumulative number of anomalies of the second IP address is less than 5 times, the deletion indication information may not be sent, and the address continues to be detected. It should be noted that the first threshold may be other values, such as 6 times, 4 times, etc. The 5 times in the embodiments of the present application is only used as an example and should not be regarded as a limitation of the present application.
[0096] As described above, when an address pool is set in the egress network device, after receiving the deletion indication information, the egress network device may delete the second IP address in the address pool.
[0097] Of course, when the first specified condition is met, the monitoring device may directly generate a deletion instruction, call the application program interface (API) of the egress network device, and delete the corresponding second IP address from the address pool of the egress network device. Among them, the API may be an interactive interface provided by the egress network device, and the monitoring device may manage the second IP address in the egress network device through corresponding instructions.
[0098] Since the resources of IP addresses are limited, a punished IP address that is not used for a long time will cause waste of resources. Therefore, a recovery mechanism is set up, which can achieve better results. In an embodiment of the present application, after the monitoring device sends the deletion indication information to the egress network device, the address detection method further includes: when the second specified condition is met, the monitoring device sends a recovery indication information to the egress network device, and the recovery indication information is used to indicate to recover the second IP address, so that the egress network device adds the second IP address again according to the recovery indication information. In this way, when the second specified condition is met, the second IP address can be recovered in time, avoiding waste of resources, and increasing service capacity and reliability.
[0099] The second specified condition may include that after the penalty, the normal cumulative count or normal frequency of the second IP address is not lower than the second threshold. Taking the second threshold as 180 times as an example, after penalizing the abnormal second IP address, the virtual network card corresponding to the second IP address in the monitoring device can continue to send detection messages at a frequency of three times per second. If it is continuously determined that the second IP address is normal based on the detection results for 180 times, it can be determined at this time that the second specified condition is met. The monitoring device can send a recovery indication message to the egress network device. In the case where the first specified condition is not met, for example, the normal cumulative count of the second IP address is less than 180 times, the recovery indication message may not be sent, and the address continues to be detected. It should be noted that the second threshold can be other values, such as 200 times, 300 times, etc. 180 times in the embodiments of the present application is only used as an example and should not be regarded as a limitation of the present application.
[0100] It should be noted that the first threshold can be less than the second threshold. In this way, sensitive penalty and delayed recovery can be achieved, ensuring that faults are not missed, jitters are not recovered, and the impact on services is reduced.
[0101] As described above, in the case where the egress network device is provided with an address pool, after receiving the recovery indication message, the egress network device can add the second IP address back to the address pool.
[0102] Of course, in the case where the second specified condition is met, the monitoring device can directly generate a recovery instruction, call the application programming interface (API) of the egress network device, and add the corresponding second IP address back to the address pool of the egress network device.
[0103] Figure 4 is a flowchart of another address detection method provided by the embodiments of the present application. As Figure 4 shown, the address detection method provided by the embodiments of the present application may include the following steps:
[0104] Step 410, the monitoring device sends a detection message for a target public website to the egress network device; wherein, the detection message carries the first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0105] Step 420, the monitoring device obtains the detection result corresponding to the detection message;
[0106] Step 430, when the detection result meets the target condition, it is determined that the second IP address is abnormal;
[0107] Step 440, when the detection result does not meet the target condition, it is determined that the second IP address is normal; wherein, the second IP address is the egress public network IP address corresponding to the first IP address;
[0108] Step 450, when the first specified condition is met, the monitoring device sends deletion indication information to the egress network device, where the deletion indication information is used to indicate the deletion of the second IP address, so that the egress network device deletes the second IP address according to the deletion indication information;
[0109] Step 460, when the second specified condition is met, the monitoring device sends restoration indication information to the egress network device, where the restoration indication information is used to indicate the restoration of the second IP address, so that the egress network device re-adds the second IP address according to the restoration indication information.
[0110] The specific process can refer to the above description and will not be elaborated here.
[0111] The address detection method provided by the embodiments of this application can automatically detect a faulty egress public network IP address based on the detection result of a probe message, and automatically punish and automatically restore the egress public network IP address, which can shorten the fault time and improve work efficiency.
[0112] Figure 5 It is a flowchart of another address detection method provided by the embodiments of this application. The address detection method provided by the embodiments of this application can be executed by an egress network device, where the egress network device can be, for example, a router, a network device deployed with Network Address Translation (NAT) software, etc. As Figure 5 shown, the address detection method provided by the embodiments of this application can include the following steps:
[0113] Step 510, the egress network device receives a probe message sent by the monitoring device for a target public network website; where the probe message carries the first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0114] The target public network website can be any website that provides stable services on the public network. The probe message can be at least one message. Within a fixed time period (for example, within one minute), the egress network device can receive probe messages sent by the monitoring device multiple times.
[0115] Among them, the monitoring device may include at least one virtual network card, the first IP address may be the IP address of any one of the at least one virtual network card, and different virtual network cards may correspond to different IP addresses. The detection packet received by the egress network device may be a packet sent by a virtual network card in the monitoring device. Specifically, a batch detection script may be deployed on the monitoring device. The detection script may use different virtual network cards to send detection packets through a polling mechanism. If it is set to send detection packets three times per second, then each virtual network card can send a detection packet to the egress network device each time it is sent.
[0116] Step 520, the egress network device determines a second IP address according to a preset address mapping table, where the second IP address is the egress public network IP address corresponding to the first IP address, and the address mapping table is used to store the correspondence between the internal network IP address of the monitoring device and the egress public network IP address;
[0117] In the embodiment of the present application, the internal network IP address in the address mapping table may be the IP address of each virtual network card in the monitoring device. The correspondence between the internal network IP address and the egress public network IP address in the address mapping table may be a one-to-one correspondence or a many-to-one correspondence.
[0118] Of course, the address mapping table in the embodiment of the present application may also be replaced by the mapping rules and address pool described above.
[0119] Step 530, the egress network device sends the detection packet to the target public network website based on the second IP address, so that the monitoring device obtains the detection result corresponding to the detection packet. When the detection result meets the target condition, it is determined that the second IP address is abnormal. When the detection result does not meet the target condition, it is determined that the second IP address is normal.
[0120] The address detection method provided by the embodiment of the present application can obtain the corresponding detection result after sending a detection packet for the target public network website to the egress network device. By analyzing the detection result to determine whether the detection result meets the target condition, it is possible to detect whether the egress public network IP address corresponding to the first IP address can be used normally based on the detection result and the target condition, thus solving the problem that the method for detecting the IP address of a service website in the related art has great limitations and cannot reflect the availability of the egress public network IP address.
[0121] Optionally, in an embodiment of the present application, after the egress network device in step 530 sends the probe message to the target public network website based on the second IP address, the address detection method may further include: the egress network device receives a response message of the probe message and sends the response message to the monitoring device.
[0122] After the egress network device sends a probe message to the target public network website, the egress network device can manage the second IP address according to the indication information subsequently fed back by the monitoring device. In an embodiment of the present application, after the egress network device in step 530 sends the probe message to the target public network website based on the second IP address, the address detection method may further include: the egress network device receives deletion indication information sent by the monitoring device, where the deletion indication information is used to indicate deleting the second IP address; the egress network device deletes the second IP address from the address mapping table according to the deletion indication information. In this way, the second IP address can be deleted in a timely manner according to the deletion indication information, avoiding using an abnormal egress public network IP address in subsequent communication processes.
[0123] Since the resources of IP addresses are limited, a punished (deleted) IP address that is not used for a long time will cause waste of resources. Therefore, setting a recovery mechanism can achieve better results. In an embodiment of the present application, after the egress network device deletes the second IP address from the address mapping table according to the deletion indication information, the address detection method further includes: the egress network device receives recovery indication information sent by the monitoring device, where the recovery indication information is used to indicate recovering the second IP address; the egress network device adds the second IP address back to the address mapping table according to the recovery indication information. In this way, under the condition of meeting the second specified condition, the second IP address can be recovered in a timely manner, avoiding resource waste, and increasing service capacity and reliability.
[0124] Optionally, in an embodiment of the present application, the probe message includes a first probe message and a second probe message; the response message includes a first response message of the first probe message and a second response message of the second probe message.
[0125] Figure 6 is a structural block diagram of an address detection device provided by an embodiment of the present application. As Figure 6 shown, the address detection device 600 provided by the embodiment of the present application includes: a sending module 610, an obtaining module 620, and a determining module 630.
[0126] The sending module 610 is configured to send a detection message for a target public network website to an egress network device; wherein, the detection message carries a first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0127] The obtaining module 620 is configured to obtain a detection result corresponding to the detection message;
[0128] The determining module 630 is configured to determine that the second IP address is abnormal if the detection result meets the target condition; and determine that the second IP address is normal if the detection result does not meet the target condition; wherein, the second IP address is an egress public network IP address corresponding to the first IP address.
[0129] After the address detection device provided by the embodiment of the present application sends a detection message for a target public network website to an egress network device, it can obtain the corresponding detection result. By analyzing the detection result to determine whether the detection result meets the target condition, it is possible to detect whether the egress public network IP address corresponding to the first IP address can be used normally based on the detection result and the target condition, thereby solving the problem that the method for detecting the IP address of a service website in the related art has great limitations and cannot reflect the availability of the egress public network IP address.
[0130] Optionally, in an embodiment of the present application, the target condition includes: not receiving a response message of the detection message within a predetermined time; in the process of obtaining the detection result corresponding to the detection message, the obtaining module 620 is specifically configured to: if not receiving a response message of the detection message within a predetermined time, determine that the detection result corresponding to the detection message is that no response message of the detection message is received; in the process of determining that the second IP address is abnormal when the detection result meets the target condition, the determining module 630 is specifically configured to: determine that the second IP address is abnormal when not receiving a response message of the detection message within a predetermined time.
[0131] Optionally, in an embodiment of the present application, the detection message includes a first detection message and a second detection message; the predetermined time includes a first predetermined time and a second predetermined time; in the process of sending a detection message for a target public network website to an egress network device, the sending module 610 is specifically configured to: send a first detection message and a second detection message for the target public network website to the egress network device; in the process of obtaining a detection result corresponding to the detection message, the obtaining module 620 is specifically configured to: obtain a first detection result corresponding to the first detection message and a second detection result corresponding to the second detection message; in the case that a response message for the detection message is not received within the predetermined time, when determining that the second IP address is abnormal, the determining module 630 is specifically configured to: in the case that the first response message for the first detection message is not received within the first predetermined time and the second response message for the second detection message is not received within the second predetermined time, determine that the second IP address is abnormal.
[0132] Optionally, in an embodiment of the present application, the detection message includes a detection message generated based on a ping command; the detection result includes a response message; the target condition includes: the response message indicates that the target public network website is unreachable, or the response message indicates that the delay time is greater than a preset value.
[0133] Optionally, in an embodiment of the present application, the detection message includes a detection message generated based on a curl command; the detection result includes a response message; the target condition includes: there is no content in the response message, or there is an error code in the response message.
[0134] Optionally, in an embodiment of the present application, the detection message includes a first detection message and a second detection message; the detection result includes a first detection result and a second detection result; the target condition includes a first target condition and a second target condition; in the process of sending a detection message for a target public network website to an egress network device, the sending module 610 is specifically configured to: send a first detection message and a second detection message for the target public network website to the egress network device; in the process of obtaining a detection result corresponding to the detection message, the obtaining module is specifically configured to: obtain a first detection result corresponding to the first detection message and a second detection result corresponding to the second detection message; in the case that the detection result meets the target condition, when determining that the second IP address is abnormal, the determining module 630 is specifically configured to: in the case that the first detection result meets the first target condition and the second detection result meets the second target condition, determine that the second IP address is abnormal.
[0135] Optionally, in an embodiment of the present application, the first detection message includes a detection message generated based on the ping command; the first detection result includes a first response message; the first target condition includes: the first response message indicates that the target public network website is unreachable, or the first response message indicates that the delay time is greater than a threshold; the second detection message includes a detection message generated based on the curl command; the second detection result includes a second response message; the second target condition includes: there is no content in the second response message, or there is an error code in the second response message.
[0136] Optionally, in an embodiment of the present application, after determining that the second IP address is abnormal, the sending module 610 is further configured to: under the condition of meeting the first specified condition, send deletion indication information to the egress network device, where the deletion indication information is used to indicate deleting the second IP address, so that the egress network device deletes the second IP address according to the deletion indication information.
[0137] Optionally, in an embodiment of the present application, after sending the deletion indication information to the egress network device, the sending module 610 is further configured to: under the condition of meeting the second specified condition, send restoration indication information to the egress network device, where the restoration indication information is used to indicate restoring the second IP address, so that the egress network device re-adds the second IP address according to the restoration indication information.
[0138] Optionally, in an embodiment of the present application, the address detection device includes at least one virtual network card, the first IP address is the IP address of any one of the at least one virtual network card, and different virtual network cards correspond to different IP addresses.
[0139] Figure 7 It is a structural block diagram of another address detection device provided by an embodiment of the present application. As Figure 7 shown, the address detection device 700 provided by an embodiment of the present application includes: a receiving module 710, a determining module 720, and a sending module 730.
[0140] The receiving module 710 is configured to receive a detection message for a target public network website sent by a monitoring device; wherein, the detection message carries a first IP address of the monitoring device, and the first IP address is an internal network IP address;
[0141] The determining module 720 is configured to determine a second IP address according to a preset address mapping table, where the second IP address is an egress public network IP address corresponding to the first IP address, and the address mapping table is used to store the correspondence between the internal network IP address of the monitoring device and the egress public network IP address;
[0142] The sending module 730 is configured to send the detection message to the target public network website based on the second IP address, so that the monitoring device obtains the detection result corresponding to the detection message. When the detection result meets the target condition, it is determined that the second IP address is abnormal. When the detection result does not meet the target condition, it is determined that the second IP address is normal.
[0143] After the address detection device provided by the embodiment of the present application sends a detection message for a target public network website to the egress network device, the corresponding detection result can be obtained. By analyzing the detection result to determine whether the detection result meets the target condition, it is possible to detect whether the egress public network IP address corresponding to the first IP address can be used normally based on the detection result and the target condition, thereby solving the problem that the method for detecting the IP address of a service website in the related art has great limitations and cannot reflect the availability of the egress public network IP address.
[0144] Optionally, in an embodiment of the present application, after sending the detection message to the target public network website based on the second IP address, the receiving module 710 is further configured to: receive a response message of the detection message, and the sending module 730 is further configured to: send the response message to the monitoring device.
[0145] Optionally, in an embodiment of the present application, the address detection device 700 further includes a deletion module; after sending the detection message to the target public network website based on the second IP address, the receiving module 710 is further configured to: receive deletion indication information sent by the monitoring device, where the deletion indication information is used to indicate deleting the second IP address; the deletion module is configured to delete the second IP address from the address mapping table according to the deletion indication information.
[0146] Optionally, in an embodiment of the present application, the address detection device 700 further includes a recovery module; after deleting the second IP address from the address mapping table according to the deletion indication information, the receiving module 710 is further configured to: receive recovery indication information sent by the monitoring device, where the recovery indication information is used to indicate recovering the second IP address; the recovery module is configured to re-add the second IP address to the address mapping table according to the recovery indication information.
[0147] Optionally, in an embodiment of the present application, the detection message includes a first detection message and a second detection message; the response message includes a first response message of the first detection message and a second response message of the second detection message.
[0148] In addition, asFigure 8 As shown, an embodiment of the present application further provides a monitoring device 800, and the monitored device can be various types of computers, etc. The monitoring device 800 includes: a processor 810, a memory 820, and a program or instruction is stored on the memory 820. When the program or instruction is executed by the processor 810, it implements the steps of any of the methods described above Figures 2 - 4 in the above description.
[0149] As Figure 9 shown, an embodiment of the present application further provides an egress network device 900, and the egress network device can be various types of computers, etc. The egress network device 900 includes: a processor 910, a memory 920, and a program or instruction is stored on the memory 920. When the program or instruction is executed by the processor 910, it implements the steps of any of the methods described above Figure 5 in the above description.
[0150] An embodiment of the present application further provides a readable storage medium, and a program or instruction is stored on the readable storage medium. When the program or instruction is executed by the processor, it implements the steps of any of the methods described above.
[0151] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0152] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the specified functions in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0153] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more processes and / or blocks Figure 1 in one or more processes and / or blocks Figure 1 specified in the block or blocks.
[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes and / or blocks Figure 1 in one or more processes and / or blocks Figure 1 specified in the block or blocks.
[0155] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0156] The memory may include non-permanent memory in the computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0157] Computer-readable media includes both permanent and non-permanent, removable and non-removable media implemented by any method or technology for storing information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0158] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0160] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. An address detection method, characterized in that, it includes: A monitoring device sends a detection message for a target public network website to an egress network device, so that the egress network device maps the first IP address of the monitoring device carried in the detection message to a corresponding second IP address according to a mapping rule, and forwards the detection message to the target public network website with the second IP address as the source address; wherein, the monitoring device is an internal network device, the target public network website is any website providing stable services on the public network, the first IP address is an internal network IP address, the second IP address is an egress public network IP address corresponding to the first IP address, and the mapping rule includes a rule for mapping an internal network IP address one-to-one or many-to-one to an egress public network IP address; The monitoring device obtains the detection result corresponding to the detection message; When the detection result meets the target condition, it is determined that the second IP address is abnormal; When the detection result does not meet the target condition, it is determined that the second IP address is normal.
2. The method according to claim 1, characterized in that, The target condition includes: no response message of the detection message is received within a predetermined time; the monitoring device obtaining the detection result corresponding to the detection message includes: If the monitoring device does not receive the response message of the detection message within a predetermined time, it is determined that the detection result corresponding to the detection message is that no response message of the detection message is received; The determining that the second IP address is abnormal when the detection result meets the target condition includes: The monitoring device determines that the second IP address is abnormal when it does not receive the response message of the detection message within a predetermined time.
3. The method according to claim 2, characterized in that, The detection message includes a first detection message and a second detection message; the predetermined time includes a first predetermined time and a second predetermined time; The monitoring device sending a detection message for a target public network website to an egress network device includes: the monitoring device sending a first detection message and a second detection message for a target public network website to an egress network device; The monitoring device obtaining the detection result corresponding to the detection message includes: the monitoring device obtaining a first detection result corresponding to the first detection message and a second detection result corresponding to the second detection message; The monitoring device determining that the second IP address is abnormal when it does not receive the response message of the detection message within a predetermined time includes: The monitoring device determines that the second IP address is abnormal when it does not receive the first response message of the first detection message within the first predetermined time and does not receive the second response message of the second detection message within the second predetermined time.
4. The method according to claim 1, characterized in that, The detection message includes a detection message generated based on a Packet Internet Groper (PING) command; the detection result includes a response message; the target condition includes: the response message indicates that the target public network website is unreachable, or the response message indicates that the delay time is greater than a preset value.
5. The method according to claim 1, wherein, the detection message includes a detection message generated based on a command line uniform resource locator command; the detection result includes a response message; the target condition includes: there is no content in the response message, or there is an error code in the response message.
6. The method according to claim 1, wherein, the detection message includes a first detection message and a second detection message; the detection result includes a first detection result and a second detection result; the target condition includes a first target condition and a second target condition; the monitoring device sending a detection message for a target public network website to an egress network device includes: the monitoring device sending a first detection message and a second detection message for a target public network website to the egress network device; the monitoring device obtaining the detection result corresponding to the detection message includes: the monitoring device obtaining a first detection result corresponding to the first detection message and a second detection result corresponding to the second detection message; determining that the second IP address is abnormal when the detection result meets the target condition includes: determining that the second IP address is abnormal when the first detection result meets the first target condition and the second detection result meets the second target condition.
7. The method according to claim 6, wherein, the first detection message includes a detection message generated based on a Packet Internet Groper command; the first detection result includes a first response message; the first target condition includes: the first response message indicates that the target public network website is unreachable, or the first response message indicates that the delay time is greater than a threshold; the second detection message includes a detection message generated based on a command line uniform resource locator command; the second detection result includes a second response message; the second target condition includes: there is no content in the second response message, or there is an error code in the second response message.
8. The method according to any one of claims 1-7, wherein, after determining that the second IP address is abnormal, the method further includes: when a first specified condition is met, the monitoring device sends deletion indication information to the egress network device, and the deletion indication information is used to indicate deleting the second IP address, so that the egress network device deletes the second IP address according to the deletion indication information; after the monitoring device sends the deletion indication information to the egress network device, the method further includes: when a second specified condition is met, the monitoring device sends restoration indication information to the egress network device, and the restoration indication information is used to indicate restoring the second IP address, so that the egress network device re-adds the second IP address according to the restoration indication information.
9. The method according to claim 1, wherein, the monitoring device includes at least one virtual network card, the first IP address is the IP address of any one of the at least one virtual network card, and different virtual network cards correspond to different IP addresses.
10. An address detection method, characterized in that, it includes: An egress network device receives a detection message sent by a monitoring device for a target public website; wherein, the monitoring device is an internal network device, the target public website is any website that provides stable services on the public network, the detection message carries the first IP address of the monitoring device, and the first IP address is an internal network IP address; The egress network device determines a second IP address according to a preset address mapping table, wherein the second IP address is an egress public network IP address corresponding to the first IP address, and the address mapping table is used to store the corresponding relationship between the internal network IP address of the monitoring device and the egress public network IP address; the corresponding relationship between the internal network IP address and the egress public network IP address in the address mapping table is a one-to-one correspondence or a many-to-one correspondence; The egress network device forwards the detection message to the target public website with the second IP address as the source address, so that the monitoring device obtains the detection result corresponding to the detection message. When the detection result meets the target condition, it is determined that the second IP address is abnormal. When the detection result does not meet the target condition, it is determined that the second IP address is normal.
11. The method according to claim 10, characterized in that, after the egress network device forwards the detection message to the target public website with the second IP address as the source address, the method further includes: The egress network device receives deletion indication information sent by the monitoring device, and the deletion indication information is used to indicate the deletion of the second IP address; The egress network device deletes the second IP address from the address mapping table according to the deletion indication information; after the egress network device deletes the second IP address from the address mapping table according to the deletion indication information, the method further includes: The egress network device receives restoration indication information sent by the monitoring device, and the restoration indication information is used to indicate the restoration of the second IP address; The egress network device adds the second IP address back to the address mapping table according to the restoration indication information.
12. A monitoring device, characterized in that, it includes a processor and a memory, and the memory stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the method according to any one of claims 1-9 are implemented.
13. An egress network device, characterized in that, it includes a processor and a memory, and the memory stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the method according to any one of claims 10-11 are implemented.
Citation Information
Patent Citations
Method and device for detecting network connectivity
CN111106983A
Public network IP network state detection method and system
CN114629816A