CN111917602A - Method and device for detecting availability of IP address and electronic equipment - Google Patents

Method and device for detecting availability of IP address and electronic equipment Download PDF

Info

Publication number
CN111917602A
CN111917602A CN202010678909.8A CN202010678909A CN111917602A CN 111917602 A CN111917602 A CN 111917602A CN 202010678909 A CN202010678909 A CN 202010678909A CN 111917602 A CN111917602 A CN 111917602A
Authority
CN
China
Prior art keywords
address
verification
verified
detection
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010678909.8A
Other languages
Chinese (zh)
Other versions
CN111917602B (en
Inventor
刘宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongying Youchuang Information Technology Co Ltd
Original Assignee
Zhongying Youchuang Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongying Youchuang Information Technology Co Ltd filed Critical Zhongying Youchuang Information Technology Co Ltd
Priority to CN202010678909.8A priority Critical patent/CN111917602B/en
Publication of CN111917602A publication Critical patent/CN111917602A/en
Application granted granted Critical
Publication of CN111917602B publication Critical patent/CN111917602B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention provides a method, a device and equipment for detecting availability of an IP address. Analyzing the interface work order, and acquiring an IP address to be verified and a network to be verified in the interface work order; searching the core equipment group corresponding to the network to be checked in a pre-configured core equipment table; the core equipment group comprises a plurality of core equipment; and logging in each core device, verifying the IP address to be verified to obtain a plurality of verification results, and judging the availability of the IP address according to the verification results to obtain detection results. In this way, a standard interface mode can be used for providing data check for the relay opening service and also providing check for other services using the IP address, an intelligent automatic detection process can be provided, the address availability analysis of the metropolitan area network and the 163 type network is supported, and the accuracy, the real-time performance and the convenience of data are greatly improved.

Description

Method and device for detecting availability of IP address and electronic equipment
Technical Field
Embodiments of the present invention generally relate to the field of internet technologies, and in particular, to a method and an apparatus for detecting availability of an IP address, and an electronic device.
Background
The IP address is an important production material for network management users, and is frequently used in various work activities. Whether the IP address is available or not is directly related to the service development of the user. In the traditional address management modes of manual recording, multi-system data synchronization and the like, various problems of data real-time performance, accuracy and the like exist. In addition, because the address administrator is frequently asked whether the address is available, communication efficiency and other problems exist among service departments, and the success rate of the relay opening service of the user is extremely low.
Disclosure of Invention
According to an embodiment of the present invention, an IP address availability detection scheme is provided.
In a first aspect of the invention, a method for detecting availability of an IP address is provided. The method comprises the following steps:
analyzing the interface work order to obtain the IP address to be checked and the network to be checked in the interface work order;
searching the core equipment group corresponding to the network to be checked in a pre-configured core equipment table; the core equipment group comprises a plurality of core equipment;
and logging in each core device, verifying the IP address to be verified to obtain a plurality of verification results, and judging the availability of the IP address according to the verification results to obtain detection results.
Further, the verifying the IP address to be verified includes:
when the IP address to be verified is a double-stack address, splitting the address according to a separator to obtain a single IP address of which the address type of the split IP address to be verified is in a V4 or V6 format; or the address type of the IP address to be verified is an IP address section with a V4 or V6 format;
when the address type of the IP address to be verified is a single IP address in a V4 or V6 format, performing ping test on the IP address to be verified, if the ping is successful, the IP address is occupied, and the single IP address is directly returned to be unavailable; if the ping is not connected, performing routing detection, and performing IP address verification according to a routing detection result;
and when the address type of the IP address to be verified is an IP address section in a V4 or V6 format, performing routing detection, and verifying the IP address according to a routing detection result.
Further, when the routing detection result is that the unique exit address is found but the port does not conform to the corresponding port name rule, judging the type of the current checking equipment, and if the attribute of the current checking equipment is a metropolitan area network checking equipment group, checking by a metropolitan area network checking method; if the attribute of the current verifying device is 163 network verifying device, verifying by 163 network verifying method.
Further, the checking by the 163 network checking method includes:
finding out corresponding outlet equipment according to an outlet address of a next hop route, judging whether the outlet equipment is in the core equipment group, if so, detecting the IP address on the current core equipment and starting next core equipment for verification; otherwise, the direct receipt IP address is not available.
Further, the checking by the metro network checking method includes:
step 1: finding out a corresponding first outlet device according to an outlet address of a next hop route, judging whether the first outlet device is a metropolitan area network device, and if so, executing the step 2; otherwise, the IP address is abnormal, and the direct return of the single address fails;
step 2: logging in the first outlet equipment, and carrying out routing detection on the first outlet equipment;
and step 3: if the routing detection result is that the unique outlet address is found, but the port does not accord with the corresponding port name rule, adding 1 to the cycle number;
and 4, step 4: judging whether the current cycle number reaches a preset cycle number, if so, executing the step 5; otherwise, returning to the step 1;
and 5: finding a corresponding second outlet device according to the outlet address of the next hop route, judging whether the second outlet device is in the core device group, if so, detecting the IP address on the current core device and starting the next core device for checking; otherwise, the direct receipt IP address is not available.
Further, the route detection includes:
carrying out long-match routing detection on the IP address to be verified, if a detection result is returned, the IP address is occupied, and the IP address is directly returned to be unavailable; if no detection result is returned, continuing to execute the common route detection;
in the common route detection, the next-hop routing address and the exit port are checked, and the following three detection results exist:
the first result is: no unique egress address or multiple egress addresses are found; at the moment, the IP address is judged to be abnormal, and the direct address return fails;
the second result is: finding a unique outlet address, wherein the port accords with a corresponding port name rule; at the moment, judging that the IP address detection on the current core equipment passes, and starting the next core equipment verification;
the third result is that: a unique egress address is found but the port does not comply with the corresponding port name rule.
Further, the determining the availability of the IP address according to the verification result includes:
if the verification results are all available, the detection result is that the IP address is available; otherwise, the detection result is that the IP address is unavailable.
In a second aspect of the invention, an IP address availability detection apparatus is provided. The device includes:
the analysis module is used for analyzing the interface work order and acquiring the IP address to be verified and the network to be verified in the interface work order;
the searching module is used for searching the core equipment group corresponding to the network to be checked in a core equipment table configured in advance; the core equipment group comprises a plurality of core equipment;
the verification module is used for logging in each core device and verifying the IP address to be verified to obtain a plurality of verification results;
and the judging module is used for judging the availability of the IP address according to the checking result.
In a third aspect of the invention, an electronic device is provided. The electronic device includes: a memory having a computer program stored thereon and a processor implementing the method as described above when executing the program.
In a fourth aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the method as according to the first aspect of the invention.
It should be understood that the statements herein reciting aspects are not intended to limit the critical or essential features of any embodiment of the invention, nor are they intended to limit the scope of the invention. Other features of the present invention will become apparent from the following description.
The invention can provide data check for the relay opening service and check other services using IP addresses in a standard interface mode, can provide an intelligent automatic detection process, supports the address availability analysis of a metropolitan area network and a 163 type network, and greatly improves the accuracy, the real-time property and the convenience of data.
Drawings
The above and other features, advantages and aspects of various embodiments of the present invention will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, like or similar reference characters designate like or similar elements, and wherein:
FIG. 1 shows a flow diagram of a method of IP address availability detection according to an embodiment of the invention;
FIG. 2 shows a flowchart of a method for verifying an IP address to be verified according to an embodiment of the invention;
FIG. 3 shows a block diagram of an IP address availability detection apparatus according to an embodiment of the invention;
FIG. 4 illustrates a block diagram of an exemplary electronic device capable of implementing embodiments of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In addition, the term "and/or" herein is only one kind of association relationship describing an associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
In the invention, a standard interface mode is adopted, so that data check can be provided for the relay opening service, other services using the IP address can also be checked, an intelligent automatic detection process can be provided, the address availability analysis of the metropolitan area network and the 163 type network is supported, and the accuracy, the real-time property and the convenience of data are greatly improved.
Fig. 1 shows a flow chart of an IP address availability detection method of an embodiment of the present invention.
The method comprises the following steps:
s101, analyzing the interface work order, and acquiring the IP address to be checked and the network to be checked in the interface work order.
And analyzing the interface work order to analyze the IP address and the network information, namely the IP address to be verified and the network to be verified.
In this embodiment, the networks capable of implementing IP address verification include a metropolitan area network and a 163 network. The IP address to be checked can be a double stack address, and can also be a single IP address in a V4 or V6 format, or an IP address section in a V4 or V6 format. The availability check can be carried out on V4, V6 and single address or address segment of double stack type.
S102, searching the core equipment group corresponding to the network to be checked in a core equipment table configured in advance; the core device group comprises a plurality of core devices.
The core device table is a configured table input in advance by the system, and is used for recording each core device in the metropolitan area network and each core device in the 163 network.
In step S101, the network to be verified has been analyzed and is matched with the corresponding network in the core device table, that is, the information of each core device in the corresponding network can be matched.
As an embodiment of the present invention, if the network to be verified analyzed in S101 is a metropolitan area network, all core devices and related information thereof corresponding to the metropolitan area network are matched in the core device table.
S103, logging in each core device, verifying the IP address to be verified to obtain a plurality of verification results, and judging the availability of the IP address according to the verification results to obtain detection results.
In step S102, each core device in the core device group corresponding to the network to be verified has been matched, in step S103, each core device needs to be respectively logged in, and the IP address to be verified is verified on each core device, so that a plurality of verification results can be obtained, that is, each core device corresponds to one verification result.
As an embodiment of the present invention, as shown in fig. 2, the IP address to be verified is verified, and according to the different address types of the IP address to be verified, the verification process is also divided into three cases:
the first condition is as follows: the address type of the IP address to be checked is a double-stack address. At this time, the address is required to be split according to the separator, and the split address is used for obtaining the single IP address with the address type to be checked being V4 or V6 format or the IP address of the IP address section with the V4 or V6 format; and checking according to the checking process of the corresponding address type. It should be noted that, when the IP address to be verified is a dual-stack address, it is necessary to simultaneously satisfy that each split address passes verification, and then a list can be returned: the address is available; if one address check fails, returning a list: the address is not available.
Case two: the address type of the IP address to be checked is a single IP address in a V4 or V6 format. At the moment, the IP address to be verified needs to be subjected to ping test, if the ping is successful, the IP address is occupied, and the IP address directly returned is unavailable; if the ping is not connected, further routing detection is needed, and IP address verification is carried out according to the routing detection result.
As an embodiment of the present invention, the ping test is to send an ICMP message and listen to an echo reply packet, and if the echo reply packet can be listened, ping is performed; otherwise ping is not enabled.
Case three: the address type of the IP address to be checked is an IP address section in a V4 or V6 format. At this time, further routing detection is required, and IP address verification is performed according to the routing detection result.
As an embodiment of the present invention, the route detection process includes:
firstly, carrying out long-match routing detection on an IP address to be verified, if a detection result is returned, the IP address is occupied, and the IP address is directly returned and unavailable; and if no detection result is returned, continuing to execute the ordinary route detection.
In this embodiment, long-match route detection. The long-match routing detection can obtain two results, namely return of a detection result and return of no detection result. When a detection result is returned, the IP address to be detected is judged to be occupied, so that the routing detection result, namely the verification result, is as follows: the IP address is not available. When no detection result is returned, the route detection result cannot be obtained, and further ordinary route detection needs to be performed.
In the ordinary routing detection, the next-hop routing address and the exit port need to be checked, and the following three detection results may exist in checking:
the first result is: no unique egress address or multiple egress addresses are found; at the moment, a check result can be obtained, namely the IP address is judged to be abnormal, and the direct address return fails;
the second result is: finding a unique outlet address, wherein the port accords with a corresponding port name rule; at this time, a verification result can be obtained, namely, the IP address detection on the current core equipment is judged to be passed, and the next core equipment verification is started;
the third result is: a unique egress address is found but the port does not comply with the corresponding port name rule.
The invention intelligently utilizes various combination modes such as ping test, long-match route detection, common route detection and the like, and improves the detection accuracy.
As an embodiment of the present invention, if the result of the routing detection is the third result, the type of the current verification device needs to be determined, and if the attribute of the current verification device is the metro network verification device group, the verification is performed by the metro network verification method; if the attribute of the current verification device is 163 network verification device group, verification is performed by 163 network verification method.
Specifically, the metro network verification method includes:
step 1: firstly, an exit address of a next hop route is required to be obtained, and corresponding exit equipment is found according to the exit address of the next hop route, and is marked as first exit equipment at the moment; judging whether the first outlet equipment is metropolitan area network equipment or not, and if so, executing the step 2; otherwise, a check result is obtained, namely the IP address is abnormal, and the direct receipt of the address fails.
Step 2: logging in the first outlet equipment, and carrying out routing detection on the first outlet equipment;
in this embodiment, the route detection process includes:
firstly, carrying out long-match routing detection on an IP address to be verified, if a detection result is returned, the IP address is occupied, and the IP address is directly returned and unavailable; and if no detection result is returned, continuing to execute the ordinary route detection.
In this embodiment, long-match route detection. The long-match routing detection can obtain two results, namely return of a detection result and return of no detection result. When a detection result is returned, the IP address to be detected is judged to be occupied, so that the routing detection result, namely the verification result, is as follows: the IP address is not available. When no detection result is returned, the route detection result cannot be obtained, and further ordinary route detection needs to be performed.
In the ordinary routing detection, the next-hop routing address and the exit port need to be checked, and the following three detection results may exist in checking:
the first result is: no unique egress address or multiple egress addresses are found; at the moment, a check result can be obtained, namely the IP address is judged to be abnormal, and the direct address return fails;
the second result is: finding a unique outlet address, wherein the port accords with a corresponding port name rule; at this time, a verification result can be obtained, namely, the IP address detection on the current core equipment is judged to be passed, and the next core equipment verification is started;
the third result is: a unique egress address is found but the port does not comply with the corresponding port name rule.
And step 3: and if the routing detection result is a third result, namely the unique exit address is found, but the port does not accord with the corresponding port name rule, adding 1 to the cycle number. And setting a counter to count and accumulate the times of executing the route detection process. Setting the initial cycle number as 0, and adding 1 to the cycle number when the routing detection process is performed once and the obtained routing detection result is a third result; the number of cycles after adding 1 is the current number of cycles.
And 4, step 4: judging whether the current cycle number reaches a preset cycle number, if so, executing the step 5; otherwise, returning to the step 1, namely when the current cycle time does not reach the preset cycle time, circularly executing the route detection process until the cycle time reaches the preset cycle time. And when the current cycle number reaches the preset cycle number, the current cycle number is equal to the preset cycle number.
And 5: finding a corresponding second outlet device according to the outlet address of the next hop route, judging whether the second outlet device is in the core device group, if so, obtaining a verification result, namely that the IP address detection on the current core device passes, and starting the next core device verification; otherwise, the check result is: the IP address is not available.
Specifically, the 163-net verification method comprises the following steps:
finding out corresponding outlet equipment according to an outlet address of a next hop route, judging whether the outlet equipment is in the core equipment group, if so, obtaining a verification result, namely that the IP address on the current core equipment passes the detection, and starting the next core equipment to verify; otherwise, the check result is: the IP address is not available.
In step S103, the availability of the IP address is determined according to the verification result.
In S103, there are multiple verification results, including that the IP address detection on the current core device passes, the IP address is unavailable, the IP address is abnormal, the direct receipt of the address fails, and the like; in the three verification results, the IP address can be used only if the IP address detection on all the core equipment passes; otherwise the IP address is not available.
Optionally, when the IP address to be checked is a dual stack address, it is necessary to simultaneously satisfy that each split address passes through the check, and then the list can be returned: the address is available; if one address check fails, returning a list: the address is not available.
According to the embodiment of the invention, a standard interface mode is adopted, so that data verification can be provided for the relay opening service, other services using the IP address can also be verified, an intelligent automatic detection process can be provided, the address availability analysis of the metropolitan area network and the 163 type network is supported, and the accuracy, the real-time performance and the convenience of data are greatly improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are exemplary embodiments and that the acts and modules illustrated are not necessarily required to practice the invention.
The above is a description of method embodiments, and the embodiments of the present invention are further described below by way of apparatus embodiments.
As shown in fig. 3, the apparatus 300 includes:
the analysis module 310 is configured to analyze the interface work order, and obtain an IP address to be verified and a network to be verified in the interface work order;
a searching module 320, configured to search the core device group corresponding to the network to be checked in a preconfigured core device table; the core equipment group comprises a plurality of core equipment;
the verification module 330 is configured to log in each core device, and verify the IP address to be verified to obtain a plurality of verification results.
Specifically, the verification module 330 includes:
the splitting module 331 is configured to split the address according to the delimiter when the IP address to be verified is a dual-stack address, so as to obtain a single IP address of which the address type of the split IP address to be verified is in a format of V4 or V6; or the IP address segment with the address type of the IP address to be checked being in the format of V4 or V6.
A first checking module 332, configured to perform a ping test on the to-be-checked IP address when the address type of the to-be-checked IP address is a single IP address in a format of V4 or V6, and if the ping is successful, the IP address is occupied and the single IP address is directly returned to be unavailable; and if the ping is not connected, performing routing detection, and performing IP address verification according to a routing detection result.
The second checking module 333 is configured to perform, when the address type of the IP address to be checked is an IP address field in a v4 or v6 format, route detection, and perform IP address checking according to a route detection result.
A first determining module 334, configured to determine a current verification device type when the routing detection result is that the unique egress address is found but the port does not conform to the corresponding port name rule, and perform verification by using a metro network verification method if the attribute of the current verification device is a metro network verification device group; if the attribute of the current verifying device is 163 network verifying device, verifying by 163 network verifying method.
And a third verifying module 335, configured to, when the attribute of the current verifying device is the metro network verifying device group, perform verification by using a metro network verifying method.
The checking through the metropolitan area network checking method comprises the following steps:
step 1: finding out a corresponding first outlet device according to an outlet address of a next hop route, judging whether the first outlet device is a metropolitan area network device, and if so, executing the step 2; otherwise, the IP address is abnormal, and the direct return of the single address fails;
step 2: logging in the first outlet equipment, and carrying out routing detection on the first outlet equipment;
and step 3: if the routing detection result is that the unique outlet address is found, but the port does not accord with the corresponding port name rule, adding 1 to the cycle number;
and 4, step 4: judging whether the current cycle number reaches a preset cycle number, if so, executing the step 5; otherwise, returning to the step 1;
and 5: finding a corresponding second outlet device according to the outlet address of the next hop route, judging whether the second outlet device is in the core device group, if so, detecting the IP address on the current core device and starting the next core device for checking; otherwise, the direct receipt IP address is not available.
And a fourth checking module 336, configured to check by using the 163 network checking method when the attribute of the current checking device is 163 network checking device group.
The checking by the 163 network checking method includes:
finding out corresponding outlet equipment according to an outlet address of a next hop route, judging whether the outlet equipment is in the core equipment group, if so, detecting the IP address on the current core equipment and starting next core equipment for verification; otherwise, the direct receipt IP address is not available.
The system comprises a routing detection module, a single IP address checking module and a single IP address checking module, wherein the routing detection module is used for carrying out long-match routing detection on the IP address to be checked, if a detection result is returned, the IP address is occupied, and the single IP address is directly returned to be unavailable; if no detection result is returned, continuing to execute the common route detection;
in the common route detection, the next-hop routing address and the exit port are checked, and the following three detection results exist:
the first result is: no unique egress address or multiple egress addresses are found; at the moment, the IP address is judged to be abnormal, and the direct address return fails;
the second result is: finding a unique outlet address, wherein the port accords with a corresponding port name rule; at the moment, judging that the IP address detection on the current core equipment passes, and starting the next core equipment verification;
the third result is that: a unique egress address is found but the port does not comply with the corresponding port name rule.
And the judging module 340 is configured to judge availability of the IP address according to the checking result. The method specifically comprises the following steps:
if the verification results are all available, the IP address is available; otherwise the IP address is not available.
The invention can provide data check for the relay opening service and check other services using IP addresses in a standard interface mode, can provide an intelligent automatic detection process, supports the address availability analysis of a metropolitan area network and a 163 type network, and greatly improves the accuracy, the real-time property and the convenience of data.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working process of the described module may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
As shown in fig. 4, the device includes a Central Processing Unit (CPU) that can perform various appropriate actions and processes according to computer program instructions stored in a Read Only Memory (ROM) or computer program instructions loaded from a storage unit into a Random Access Memory (RAM). In the RAM, various programs and data required for the operation of the device can also be stored. The CPU, ROM, and RAM are connected to each other via a bus. An input/output (I/O) interface is also connected to the bus.
A plurality of components in the device are connected to the I/O interface, including: an input unit such as a keyboard, a mouse, etc.; an output unit such as various types of displays, speakers, and the like; storage units such as magnetic disks, optical disks, and the like; and a communication unit such as a network card, modem, wireless communication transceiver, etc. The communication unit allows the device to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processing unit executes the respective methods and processes described above, for example, methods S101 to S103. For example, in some embodiments, methods S101-S103 may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device via ROM and/or the communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more of the steps of methods S101-S103 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to perform methods S101-S103 by any other suitable means (e.g., by way of firmware).
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a load programmable logic device (CPLD), and the like.
Program code for implementing the methods of the present invention may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Further, while operations are depicted in a particular order, this should be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the invention. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single implementation. Conversely, various features that are described in the context of a single implementation can also be implemented in multiple implementations separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. An IP address availability detection method, comprising:
analyzing the interface work order to obtain the IP address to be checked and the network to be checked in the interface work order;
searching the core equipment group corresponding to the network to be checked in a pre-configured core equipment table; the core equipment group comprises a plurality of core equipment;
and logging in each core device, verifying the IP address to be verified to obtain a plurality of verification results, and judging the availability of the IP address according to the verification results to obtain detection results.
2. The method of claim 1, wherein the verifying the IP address to be verified comprises:
when the IP address to be verified is a double-stack address, splitting the address according to a separator to obtain a single IP address of which the address type of the split IP address to be verified is in a V4 or V6 format; or the address type of the IP address to be verified is an IP address section with a V4 or V6 format;
when the address type of the IP address to be verified is a single IP address in a V4 or V6 format, performing ping test on the IP address to be verified, if the ping is successful, the IP address is occupied, and the single IP address is directly returned to be unavailable; if the ping is not connected, performing routing detection, and performing IP address verification according to a routing detection result;
and when the address type of the IP address to be verified is an IP address section in a V4 or V6 format, performing routing detection, and verifying the IP address according to a routing detection result.
3. The method according to claim 2, wherein when the routing detection result is that a unique exit address is found but a port does not conform to a corresponding port name rule, judging the current checking device type, and if the attribute of the current checking device is a metropolitan area network checking device group, checking by a metropolitan area network checking method; if the attribute of the current verification device is 163 network verification device group, verification is performed by 163 network verification method.
4. The method of claim 3, wherein said verifying via 163 network verification method comprises:
finding out corresponding outlet equipment according to an outlet address of a next hop route, judging whether the outlet equipment is in the core equipment group, if so, detecting the IP address on the current core equipment and starting next core equipment for verification; otherwise, the direct receipt IP address is not available.
5. The method according to claim 3, wherein said checking by a metro network checking method comprises:
step 1: finding out a corresponding first outlet device according to an outlet address of a next hop route, judging whether the first outlet device is a metropolitan area network device, and if so, executing the step 2; otherwise, the IP address is abnormal, and the direct return of the single address fails;
step 2: logging in the first outlet equipment, and carrying out routing detection on the first outlet equipment;
and step 3: if the routing detection result is that the unique outlet address is found, but the port does not accord with the corresponding port name rule, adding 1 to the cycle number;
and 4, step 4: judging whether the current cycle number reaches a preset cycle number, if so, executing the step 5; otherwise, returning to the step 1;
and 5: finding a corresponding second outlet device according to the outlet address of the next hop route, judging whether the second outlet device is in the core device group, if so, detecting the IP address on the current core device and starting the next core device for checking; otherwise, the direct receipt IP address is not available.
6. The method according to claim 2 or 5, wherein the route detection comprises:
carrying out long-match routing detection on the IP address to be verified, if a detection result is returned, the IP address is occupied, and the IP address is directly returned to be unavailable; if no detection result is returned, continuing to execute the common route detection;
in the common route detection, the next-hop routing address and the exit port are checked, and the following three detection results exist:
the first result is: no unique egress address or multiple egress addresses are found; at the moment, the IP address is judged to be abnormal, and the direct address return fails;
the second result is: finding a unique outlet address, wherein the port accords with a corresponding port name rule; at the moment, judging that the IP address detection on the current core equipment passes, and starting the next core equipment verification;
the third result is that: a unique egress address is found but the port does not comply with the corresponding port name rule.
7. The method of claim 1, wherein the determining availability of the IP address according to the verification result comprises:
if the verification results are all available, the detection result is that the IP address is available; otherwise, the detection result is that the IP address is unavailable.
8. An apparatus for detecting availability of an IP address, comprising:
the analysis module is used for analyzing the interface work order and acquiring the IP address to be verified and the network to be verified in the interface work order;
the searching module is used for searching the core equipment group corresponding to the network to be checked in a core equipment table configured in advance; the core equipment group comprises a plurality of core equipment;
the verification module is used for logging in each core device and verifying the IP address to be verified to obtain a plurality of verification results;
and the judging module is used for judging the availability of the IP address according to the checking result.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the processor, when executing the program, implements the method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202010678909.8A 2020-07-15 2020-07-15 Method and device for detecting availability of IP address and electronic equipment Active CN111917602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010678909.8A CN111917602B (en) 2020-07-15 2020-07-15 Method and device for detecting availability of IP address and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010678909.8A CN111917602B (en) 2020-07-15 2020-07-15 Method and device for detecting availability of IP address and electronic equipment

Publications (2)

Publication Number Publication Date
CN111917602A true CN111917602A (en) 2020-11-10
CN111917602B CN111917602B (en) 2021-11-30

Family

ID=73280948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010678909.8A Active CN111917602B (en) 2020-07-15 2020-07-15 Method and device for detecting availability of IP address and electronic equipment

Country Status (1)

Country Link
CN (1) CN111917602B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856436A (en) * 2012-11-28 2014-06-11 中国电信股份有限公司 Method for user to select network layer protocol, household gateway and Internet network
US20150098470A1 (en) * 2013-10-04 2015-04-09 Broadcom Corporation Hierarchical hashing for longest prefix matching
CN105025114A (en) * 2014-04-17 2015-11-04 中国电信股份有限公司 Domain name resolution method and domain name resolution system
US20160006641A1 (en) * 2014-07-03 2016-01-07 Netmotion Wireless, Inc. Analysis and diagnosis of connectivity in a multi-device network
CN107592291A (en) * 2017-07-25 2018-01-16 北京奇艺世纪科技有限公司 A kind of IP address detection method, system, device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103856436A (en) * 2012-11-28 2014-06-11 中国电信股份有限公司 Method for user to select network layer protocol, household gateway and Internet network
US20150098470A1 (en) * 2013-10-04 2015-04-09 Broadcom Corporation Hierarchical hashing for longest prefix matching
CN105025114A (en) * 2014-04-17 2015-11-04 中国电信股份有限公司 Domain name resolution method and domain name resolution system
US20160006641A1 (en) * 2014-07-03 2016-01-07 Netmotion Wireless, Inc. Analysis and diagnosis of connectivity in a multi-device network
CN107592291A (en) * 2017-07-25 2018-01-16 北京奇艺世纪科技有限公司 A kind of IP address detection method, system, device and electronic equipment

Also Published As

Publication number Publication date
CN111917602B (en) 2021-11-30

Similar Documents

Publication Publication Date Title
CN110752952A (en) Network fault positioning method and device, network equipment and computer storage medium
CA3139971A1 (en) Problem positioning method and device
CN110708715B (en) Service fault finding method and device for 5G base station
CN104461847B (en) Data processor detection method and device
CN111917602B (en) Method and device for detecting availability of IP address and electronic equipment
CN110474821B (en) Node fault detection method and device
CN105068926A (en) Program test method and device thereof
CN106612213B (en) Equipment testing method and device
CN111143151B (en) Service monitoring method and device and electronic equipment
CN107342917B (en) Method and apparatus for detecting network device performance
CN112671567B (en) 5G core network topology discovery method and device based on service interface
CN112671565B (en) 5G core network topology discovery method and device based on signaling link
CN111884927B (en) Link overhead obtaining method and device based on ospf link database
WO2021128936A1 (en) Message processing method and apparatus
CN112333048B (en) Method and device for detecting connectivity of opened service online user
CN110457187B (en) TPC-E test method and test server capable of conveniently running based on backup test data
CN114553663A (en) Abnormity detection method, device, equipment and storage medium
CN112631929A (en) Test case generation method and device, storage medium and electronic equipment
CN112328267A (en) Multi-server installation method and device, terminal and storage medium
CN106777010B (en) Log providing method and device and log obtaining method, device and system
CN107105447B (en) Method and device for identifying base station alarm information
CN115622752B (en) Session management method, device, electronic equipment and storage medium
CN113094078B (en) Security detection method, device, equipment and medium
CN115150298B (en) Virtual gateway testing method and device, storage medium and electronic equipment
CN112019644B (en) Method, system, medium and equipment for determining attribution information of IP address

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 702-2, No. 4811 Caoan Road, Jiading District, Shanghai, 201800

Patentee after: CHINA UNITECHS

Address before: Room 1004-4, 10 / F, 1112 Hanggui Road, Anting Town, Jiading District, Shanghai 201800

Patentee before: CHINA UNITECHS

CP02 Change in the address of a patent holder