CN113612653B - Availability detection method and device of transmission control protocol - Google Patents

Availability detection method and device of transmission control protocol Download PDF

Info

Publication number
CN113612653B
CN113612653B CN202110774915.8A CN202110774915A CN113612653B CN 113612653 B CN113612653 B CN 113612653B CN 202110774915 A CN202110774915 A CN 202110774915A CN 113612653 B CN113612653 B CN 113612653B
Authority
CN
China
Prior art keywords
domain name
address
source address
system server
name system
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.)
Active
Application number
CN202110774915.8A
Other languages
Chinese (zh)
Other versions
CN113612653A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202110774915.8A priority Critical patent/CN113612653B/en
Publication of CN113612653A publication Critical patent/CN113612653A/en
Application granted granted Critical
Publication of CN113612653B publication Critical patent/CN113612653B/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/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
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4505Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
    • H04L61/4511Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]

Landscapes

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

Abstract

The invention discloses a method and a device for detecting the availability of a transmission control protocol, wherein the method comprises the following steps: determining a destination domain name, a domain name system server address and a gateway address, and detecting whether the destination domain name can be connected from a source address; further detecting whether the slave source address is capable of connecting to a domain name system server address in response to the slave source address being incapable of connecting to the destination domain name; selectively returning that the gateway is not reachable or that the domain name system server is not reachable depending on whether the gateway address can be connected from the source address; a domain name system server failure or preset interface unavailability is selectively returned based on whether the preset interface can be connected from the source address. The invention can give out error reasons under the condition that the destination domain name cannot be accessed, and can rapidly locate and troubleshoot the faults so as to facilitate further processing.

Description

Availability detection method and device of transmission control protocol
Technical Field
The present invention relates to the field of network transmission, and in particular, to a method and apparatus for detecting availability of a transmission control protocol.
Background
DNS, i.e. domain name system, is one of the important services of the internet, and is a distributed database mapping domain names and IP network addresses to each other, so that people can access the internet more conveniently. For example, we access a hundred degree search engine, a common approach is to enter www.***.com in the browser and then access the hundred degree home page if the network is normal.
In practice, our computer accesses the DNS server on the internet first, queries www.***.com the IP address corresponding to the domain name, and only if the IP address is obtained, the computer can fill the correct destination in the network request message, which is the server providing the search engine service.
If the situation that the target domain name cannot be accessed is encountered, it is difficult to judge what specific cause is caused, and it is possible that the network configuration of the local host operating system of the user is incorrect, for example, the wrong DNS server address is filled in, the user fails to communicate with the internet, and it is also possible that the DNS server providing the domain name resolution service fails, and the IP address corresponding to the domain name cannot be resolved. Thus, the problem cannot be quickly located.
Aiming at the problem that a user cannot quickly locate faults through networking in the prior art, no effective solution exists at present.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method and apparatus for detecting availability of a transmission control protocol, which can give out an error reason under the condition that a destination domain name cannot be accessed, and quickly locate and troubleshoot the failure to facilitate further processing.
Based on the above object, a first aspect of the embodiments of the present invention provides a method for detecting availability of a transmission control protocol, including performing the following steps:
determining a destination domain name, a domain name system server address and a gateway address, and detecting whether the destination domain name can be connected from a source address;
further detecting whether the slave source address is capable of connecting to a domain name system server address in response to the slave source address being incapable of connecting to the destination domain name;
further detecting whether the slave source address is capable of connecting to the gateway address in response to the slave source address being incapable of connecting to the domain name system server address, and selectively returning either that the gateway is unreachable or that the domain name system server is unreachable depending on whether the slave source address is capable of connecting to the gateway address;
in response to the slave source address being able to connect to the domain name system server address, it is further detected whether the slave source address is able to connect to a preset interface of the domain name system server and selectively return to the domain name system server failure or the preset interface being unavailable depending on whether the slave source address is able to connect to the preset interface.
In some embodiments, the method further comprises: the availability detection success of the transmission control protocol is returned directly in response to being able to connect to the destination domain name from the source address.
In some implementations, detecting whether the slave source address is capable of connecting to the destination domain name, detecting whether the slave source address is capable of connecting to the domain name system server address, and detecting whether the slave source address is capable of connecting to the gateway address includes: the source address sends the request message and detects whether the response message corresponding to the request message can be received from the destination domain name, the domain name system server address and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address includes: a request message is sent by the source address based on a network control message protocol and it is detected whether a response message based on the network control message protocol and corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address further includes: a PING tool is used by the source address to send a request message and to detect whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address using the PING tool.
In some embodiments, detecting whether the preset interface of the domain name system server is connectable from the source address comprises: and scanning a preset interface of the domain name system server at the source address, and judging whether the preset interface has data activity on a transmission control protocol or a user datagram protocol.
In some embodiments, scanning the preset interface of the domain name system server at the source address, determining whether the preset interface has data activity on a transmission control protocol or a user datagram protocol comprises: and using NCAT tool to scan the port number 53 of the domain name system server at the source address, and judging whether the port number 53 of the transmission control protocol has data activity on the transmission control protocol or the user datagram protocol.
In some implementations, selectively returning gateway unreachable or domain name system server unreachable based on whether the gateway address can be connected from the source address includes:
returning that the gateway is unreachable in response to being unable to connect to the gateway address from the source address;
returning the domain name system server is not reachable in response to being able to connect to the gateway address from the source address.
In some embodiments, selectively returning a domain name system server failure or a preset interface unavailable based on whether the preset interface can be connected from the source address comprises:
returning that the preset interface is not available in response to the preset interface being unable to be connected from the source address;
a domain name system server failure is returned in response to being connectable to the preset interface from the source address.
A second aspect of an embodiment of the present invention provides an availability detection apparatus for a transmission control protocol, including:
a processor;
a controller storing program code executable by a processor, the processor executing the following steps when executing the program code:
determining a destination domain name, a domain name system server address and a gateway address, and detecting whether the destination domain name can be connected from a source address;
further detecting whether the slave source address is capable of connecting to a domain name system server address in response to the slave source address being incapable of connecting to the destination domain name;
further detecting whether the slave source address is capable of connecting to the gateway address in response to the slave source address being incapable of connecting to the domain name system server address, and selectively returning either that the gateway is unreachable or that the domain name system server is unreachable depending on whether the slave source address is capable of connecting to the gateway address;
in response to the slave source address being able to connect to the domain name system server address, it is further detected whether the slave source address is able to connect to a preset interface of the domain name system server and selectively return to the domain name system server failure or the preset interface being unavailable depending on whether the slave source address is able to connect to the preset interface.
In some embodiments, the steps further comprise: the availability detection success of the transmission control protocol is returned directly in response to being able to connect to the destination domain name from the source address.
In some implementations, detecting whether the slave source address is capable of connecting to the destination domain name, detecting whether the slave source address is capable of connecting to the domain name system server address, and detecting whether the slave source address is capable of connecting to the gateway address includes: the source address sends the request message and detects whether the response message corresponding to the request message can be received from the destination domain name, the domain name system server address and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address includes: a request message is sent by the source address based on a network control message protocol and it is detected whether a response message based on the network control message protocol and corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address further includes: a PING tool is used by the source address to send a request message and to detect whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address using the PING tool.
In some embodiments, detecting whether the preset interface of the domain name system server is connectable from the source address comprises: and scanning a preset interface of the domain name system server at the source address, and judging whether the preset interface has data activity on a transmission control protocol or a user datagram protocol.
In some embodiments, scanning the preset interface of the domain name system server at the source address, determining whether the preset interface has data activity on a transmission control protocol or a user datagram protocol comprises: and using NCAT tool to scan the port number 53 of the domain name system server at the source address, and judging whether the port number 53 of the transmission control protocol has data activity on the transmission control protocol or the user datagram protocol.
In some implementations, selectively returning gateway unreachable or domain name system server unreachable based on whether the gateway address can be connected from the source address includes:
returning that the gateway is unreachable in response to being unable to connect to the gateway address from the source address;
returning the domain name system server is not reachable in response to being able to connect to the gateway address from the source address.
In some embodiments, selectively returning a domain name system server failure or a preset interface unavailable based on whether the preset interface can be connected from the source address comprises:
returning that the preset interface is not available in response to the preset interface being unable to be connected from the source address;
a domain name system server failure is returned in response to being connectable to the preset interface from the source address.
The invention has the following beneficial technical effects: the method and the device for detecting the availability of the transmission control protocol provided by the embodiment of the invention determine the destination domain name, the domain name system server address and the gateway address and detect whether the destination domain name can be connected from the source address; further detecting whether the slave source address is capable of connecting to a domain name system server address in response to the slave source address being incapable of connecting to the destination domain name; further detecting whether the slave source address is capable of connecting to the gateway address in response to the slave source address being incapable of connecting to the domain name system server address, and selectively returning either that the gateway is unreachable or that the domain name system server is unreachable depending on whether the slave source address is capable of connecting to the gateway address; in response to the fact that the slave source address can be connected with the domain name system server address, whether the slave source address can be connected with a preset interface of the domain name system server is further detected, and according to the technical scheme that whether the slave source address can be connected with the preset interface or the preset interface is not available, faults of the domain name system server are selectively returned, error reasons can be given under the condition that a target domain name cannot be accessed, and the faults can be rapidly located and checked to facilitate further processing.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a method for detecting availability of a transmission control protocol according to the present invention;
fig. 2 is a detailed flowchart of a method for detecting availability of a transmission control protocol according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention will be described in further detail with reference to the accompanying drawings.
It should be noted that, in the embodiments of the present invention, all the expressions "first" and "second" are used to distinguish two entities with the same name but different entities or different parameters, and it is noted that the "first" and "second" are only used for convenience of expression, and should not be construed as limiting the embodiments of the present invention, and the following embodiments are not described one by one.
Based on the above objects, a first aspect of the embodiments of the present invention proposes an embodiment of an availability detection method for quickly locating and troubleshooting a fault to facilitate further processing, giving an error cause in case that the destination domain name cannot be accessed. Fig. 1 is a schematic flow chart of a method for detecting availability of a transmission control protocol according to the present invention.
The method for detecting the availability of the transmission control protocol, as shown in fig. 1, comprises the following steps:
step S101, determining a destination domain name, a domain name system server address and a gateway address, and detecting whether the destination domain name can be connected from a source address;
step S103, in response to the slave source address being unable to connect to the destination domain name, further detecting whether the slave source address is able to connect to the domain name system server address;
step S105, in response to the slave source address not being able to connect to the domain name system server address, further detecting whether the slave source address is able to connect to the gateway address, and selectively returning that the gateway is not reachable or that the domain name system server is not reachable according to whether the slave source address is able to connect to the gateway address;
step S107, responding to the slave source address to connect with the domain name system server address, further detecting whether the slave source address can connect with the preset interface of the domain name system server, and selectively returning to the domain name system server fault or the unavailability of the preset interface according to whether the slave source address can connect with the preset interface.
The invention provides a method for detecting whether a target network domain name is available or not and an unavailable error reason based on a TCP/IP protocol, which detects a local host operating system network configuration, a remote DNS server and the target domain name by adopting a plurality of network state detection tools, gives out the error reason as specific as possible under the condition that the domain name cannot be accessed, and can conveniently and quickly locate and solve the problem.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by a computer program for instructing relevant hardware, where the program may be stored on a computer readable storage medium, and where the program, when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the method embodiments previously described.
In some embodiments, the method further comprises: the availability detection success of the transmission control protocol is returned directly in response to being able to connect to the destination domain name from the source address.
In some implementations, detecting whether the slave source address is capable of connecting to the destination domain name, detecting whether the slave source address is capable of connecting to the domain name system server address, and detecting whether the slave source address is capable of connecting to the gateway address includes: the source address sends the request message and detects whether the response message corresponding to the request message can be received from the destination domain name, the domain name system server address and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address includes: a request message is sent by the source address based on a network control message protocol and it is detected whether a response message based on the network control message protocol and corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address further includes: a PING tool is used by the source address to send a request message and to detect whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address using the PING tool. The various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
In some embodiments, detecting whether the preset interface of the domain name system server is connectable from the source address comprises: and scanning a preset interface of the domain name system server at the source address, and judging whether the preset interface has data activity on a transmission control protocol or a user datagram protocol.
In some embodiments, scanning the preset interface of the domain name system server at the source address, determining whether the preset interface has data activity on a transmission control protocol or a user datagram protocol comprises: and using NCAT tool to scan the port number 53 of the domain name system server at the source address, and judging whether the port number 53 of the transmission control protocol has data activity on the transmission control protocol or the user datagram protocol.
In some implementations, selectively returning gateway unreachable or domain name system server unreachable based on whether the gateway address can be connected from the source address includes:
returning that the gateway is unreachable in response to being unable to connect to the gateway address from the source address;
returning the domain name system server is not reachable in response to being able to connect to the gateway address from the source address.
In some embodiments, selectively returning a domain name system server failure or a preset interface unavailable based on whether the preset interface can be connected from the source address comprises:
returning that the preset interface is not available in response to the preset interface being unable to be connected from the source address;
a domain name system server failure is returned in response to being connectable to the preset interface from the source address.
The computer-readable storage medium (e.g., memory) described herein may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of example, and not limitation, RAM may be available in a variety of forms such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Fig. 2 shows a specific flow of a method for detecting availability of a transmission control protocol, and a specific implementation of the present invention is further described below according to the specific embodiment shown in fig. 2.
The ping command is a tool for detecting network connectivity based on ICMP (network control message protocol) protocol, which judges whether a target network address is accessible through the interaction of request and response messages of ICMP, but the command cannot detect the state of a specific network port. The ncat is a port scanning tool, which can scan whether a designated network port is active, the DNS special network port number is 53, and a normally available DNS server can enable ports of TCP (transmission control protocol) and UDP (user datagram protocol) at the same time, so that the detection of the TCP port 53 of the DNS server by using the ncat can determine whether the DNS server port is normally based on the two tools, and the detection of network connectivity and DNS service ports of the designated DNS server and the destination domain name can be realized.
Firstly, inputting an IP address of a DNS server, an IP address of a gateway and a destination domain name.
(1) Detecting whether the target domain name can be communicated or not by using a ping command, and if so, directly returning success;
(2) If the destination domain name is not communicable, detecting whether the IP address of the DNS server is communicable by using a ping command;
(3) If DNS server IP address is not communicable: detecting whether the gateway IP address can be communicated or not by using a ping command;
(4) If the gateway IP address is not communicable, an error is returned: the gateway is not reachable;
(5) If the gateway IP address is communicable, return an error: DNS server addresses are not reachable;
(6) If the DNS server IP address is not communicable, using the ncat command to detect if a DNS server 53 port is available;
(7) If the DNS server 53 port is not available, an error is returned: DNS server ports are not available;
(8) If a DNS server 53 port is available, an error is returned: DNS server failure.
Therefore, the invention adopts the cooperation of ping and ncat network state detection tools based on the TCP/IP protocol, can detect the availability of key components on the network when the target domain name cannot be used, can give out specific error reasons, including specific situations such as unreachable gateway, unreachable DNS server address, unreachable DNS server port, DNS server fault and the like, helps a user to quickly locate the problem, and can accelerate the progress of solving the problem.
Furthermore, the method disclosed according to the embodiment of the present invention may also be implemented as a computer program executed by a CPU, which may be stored in a computer-readable storage medium. When executed by a CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention. The above method steps and system units may also be implemented with a controller and a computer readable storage medium storing a computer program for causing the controller to implement the above steps or unit functions.
As can be seen from the above embodiments, the method for detecting availability of a transmission control protocol according to the embodiments of the present invention determines a destination domain name, a domain name system server address and a gateway address, and detects whether a destination domain name can be connected from a source address; further detecting whether the slave source address is capable of connecting to a domain name system server address in response to the slave source address being incapable of connecting to the destination domain name; further detecting whether the slave source address is capable of connecting to the gateway address in response to the slave source address being incapable of connecting to the domain name system server address, and selectively returning either that the gateway is unreachable or that the domain name system server is unreachable depending on whether the slave source address is capable of connecting to the gateway address; in response to the fact that the slave source address can be connected with the domain name system server address, whether the slave source address can be connected with a preset interface of the domain name system server is further detected, and according to the technical scheme that whether the slave source address can be connected with the preset interface or the preset interface is not available, faults of the domain name system server are selectively returned, error reasons can be given under the condition that a target domain name cannot be accessed, and the faults can be rapidly located and checked to facilitate further processing.
It should be noted that, the steps in the embodiments of the method for detecting availability of a transmission control protocol may be intersected, replaced, added and subtracted, so that the method for detecting availability of a transmission control protocol by using these reasonable permutation and combination changes shall also belong to the protection scope of the present invention, and shall not limit the protection scope of the present invention to the embodiments.
Based on the above objects, a second aspect of the embodiments of the present invention proposes an embodiment of an availability detection device for quickly locating and troubleshooting a fault to facilitate further processing, given an error cause in case the destination domain name cannot be accessed. The device comprises:
a processor;
a controller storing program code executable by a processor, the processor executing the following steps when executing the program code:
determining a destination domain name, a domain name system server address and a gateway address, and detecting whether the destination domain name can be connected from a source address;
further detecting whether the slave source address is capable of connecting to a domain name system server address in response to the slave source address being incapable of connecting to the destination domain name;
further detecting whether the slave source address is capable of connecting to the gateway address in response to the slave source address being incapable of connecting to the domain name system server address, and selectively returning either that the gateway is unreachable or that the domain name system server is unreachable depending on whether the slave source address is capable of connecting to the gateway address;
in response to the slave source address being able to connect to the domain name system server address, it is further detected whether the slave source address is able to connect to a preset interface of the domain name system server and selectively return to the domain name system server failure or the preset interface being unavailable depending on whether the slave source address is able to connect to the preset interface.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In some embodiments, the availability check of the transmission control protocol is returned directly in response to being able to connect to the destination domain name from the source address.
In some implementations, detecting whether the slave source address is capable of connecting to the destination domain name, detecting whether the slave source address is capable of connecting to the domain name system server address, and detecting whether the slave source address is capable of connecting to the gateway address includes: the source address sends the request message and detects whether the response message corresponding to the request message can be received from the destination domain name, the domain name system server address and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address includes: a request message is sent by the source address based on a network control message protocol and it is detected whether a response message based on the network control message protocol and corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address.
In some embodiments, sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address further includes: a PING tool is used by the source address to send a request message and to detect whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address using the PING tool.
In some embodiments, detecting whether the preset interface of the domain name system server is connectable from the source address comprises: and scanning a preset interface of the domain name system server at the source address, and judging whether the preset interface has data activity on a transmission control protocol or a user datagram protocol.
In some embodiments, scanning the preset interface of the domain name system server at the source address, determining whether the preset interface has data activity on a transmission control protocol or a user datagram protocol comprises: and using NCAT tool to scan the port number 53 of the domain name system server at the source address, and judging whether the port number 53 of the transmission control protocol has data activity on the transmission control protocol or the user datagram protocol.
In some implementations, selectively returning gateway unreachable or domain name system server unreachable based on whether the gateway address can be connected from the source address includes:
returning that the gateway is unreachable in response to being unable to connect to the gateway address from the source address;
returning the domain name system server is not reachable in response to being able to connect to the gateway address from the source address.
In some embodiments, selectively returning a domain name system server failure or a preset interface unavailable based on whether the preset interface can be connected from the source address comprises:
returning that the preset interface is not available in response to the preset interface being unable to be connected from the source address;
a domain name system server failure is returned in response to being connectable to the preset interface from the source address.
The devices and apparatuses disclosed in the embodiments of the present invention may be various electronic terminal apparatuses, for example, mobile phones, personal Digital Assistants (PDAs), tablet computers (PADs), smart televisions, and the like, or may be large-sized terminal apparatuses, for example, servers, etc., so the protection scope disclosed in the embodiments of the present invention should not be limited to a specific type of devices and apparatuses. The client disclosed by the embodiment of the invention can be applied to any one of the electronic terminal devices in the form of electronic hardware, computer software or a combination of the electronic hardware and the computer software.
As can be seen from the above embodiments, the availability detection device for a transmission control protocol provided by the embodiments of the present invention determines a destination domain name, a domain name system server address and a gateway address, and detects whether the destination domain name can be connected from a source address; further detecting whether the slave source address is capable of connecting to a domain name system server address in response to the slave source address being incapable of connecting to the destination domain name; further detecting whether the slave source address is capable of connecting to the gateway address in response to the slave source address being incapable of connecting to the domain name system server address, and selectively returning either that the gateway is unreachable or that the domain name system server is unreachable depending on whether the slave source address is capable of connecting to the gateway address; in response to the fact that the slave source address can be connected with the domain name system server address, whether the slave source address can be connected with a preset interface of the domain name system server is further detected, and according to the technical scheme that whether the slave source address can be connected with the preset interface or the preset interface is not available, faults of the domain name system server are selectively returned, error reasons can be given under the condition that a target domain name cannot be accessed, and the faults can be rapidly located and checked to facilitate further processing.
It should be noted that the above embodiment of the apparatus employs an embodiment of the availability detection method of the transmission control protocol to specifically describe the operation of each module, and those skilled in the art can easily think that these modules are applied to other embodiments of the availability detection method of the transmission control protocol. Of course, since the steps in the embodiment of the method for detecting the availability of the transmission control protocol can be intersected, replaced, added and subtracted, the reasonable permutation and combination are changed, and the device also belongs to the protection scope of the invention, and the protection scope of the invention is not limited to the embodiment.
The memory is used as a non-volatile computer readable storage medium, and may be used to store a non-volatile software program, a non-volatile computer executable program, and a module, such as program instructions/modules corresponding to the method for detecting availability of a transmission control protocol in the embodiments of the present application. The processor executes various functional applications of the server and data processing, namely, the availability detection method of the transmission control protocol of the above method embodiment, by running nonvolatile software programs, instructions and modules stored in the memory.
The memory may include a memory program area and a memory data area, wherein the memory program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the availability detection means of the transmission control protocol, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the local module through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Embodiments of the present invention may further include a corresponding computer-readable storage medium storing computer-executable instructions for performing the method for detecting availability of a transmission control protocol in any of the method embodiments and the apparatus for detecting availability of a transmission control protocol in any of the apparatus embodiments. Embodiments of the computer readable storage medium may achieve the same or similar effects as any of the foregoing method and apparatus embodiments.
Embodiments of the present invention may also include a corresponding computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising instructions which, when executed by a computer, cause the computer to perform the method for detecting availability of a transmission control protocol in any of the method embodiments described above and the device for detecting availability of a transmission control protocol in any of the device embodiments described above. Embodiments of the computer program product may achieve the same or similar results as embodiments of any of the methods and apparatus described previously.
Finally, it should be noted that, as will be appreciated by those skilled in the art, all or part of the procedures in implementing the methods of the embodiments described above may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the program may include the procedures of the embodiments of the methods described above when executed. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random-access memory (RAM), or the like. Embodiments of the computer program may achieve the same or similar effects as any of the method embodiments previously described.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
Those of ordinary skill in the art will appreciate that: the above discussion of any embodiment is merely exemplary and is not intended to imply that the scope of the disclosure of embodiments of the invention, including the claims, is limited to such examples; combinations of features of the above embodiments or in different embodiments are also possible within the idea of an embodiment of the invention, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. of the embodiments should be included in the protection scope of the embodiments of the present invention.

Claims (6)

1. A method for detecting availability of a transmission control protocol, comprising the steps of:
determining a destination domain name, a domain name system server address and a gateway address, and detecting whether the destination domain name can be connected from a source address;
further detecting whether the domain name system server address is connectable from the source address in response to the destination domain name being unable to be connected from the source address;
further detecting whether the gateway address is connectable from the source address in response to the domain name system server address being unable to be connected from the source address, and returning a gateway unreachable in response to the gateway address being unable to be connected from the source address and returning a domain name system server unreachable in response to the gateway address being connectable from the source address;
further detecting whether a preset interface of a domain name system server is connectable from the source address in response to the domain name system server address being connectable from the source address, and returning that a preset interface is not available in response to the preset interface being unable to be connected from the source address, and returning a domain name system server failure in response to the preset interface being connectable from the source address, wherein detecting whether the preset interface of the domain name system server is connectable from the source address comprises: and using NCAT tool to scan the port number 53 of the domain name system server at the source address, and judging whether the port number 53 of the transmission control protocol has data activity on the transmission control protocol or the user datagram protocol.
2. The method as recited in claim 1, further comprising: the availability detection success of the transmission control protocol is returned directly in response to being able to connect the destination domain name from the source address.
3. The method of claim 1, wherein detecting whether the destination domain name can be connected from a source address, detecting whether the domain name system server address can be connected from the source address, and detecting whether the gateway address can be connected from the source address comprises: and sending a request message by the source address, and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address and the gateway address.
4. The method of claim 3, wherein sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address comprises: a request message is sent by the source address based on a network control message protocol and it is detected whether a response message based on the network control message protocol and corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address.
5. The method of claim 3, wherein sending a request message from the source address and detecting whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address further comprises: a PING tool is used by the source address to send a request message and to detect whether a response message corresponding to the request message can be received from the destination domain name, the domain name system server address, and the gateway address using the PING tool.
6. An availability detection apparatus for a transmission control protocol, comprising:
a processor;
a controller storing program code executable by the processor, the processor performing the following steps when executing the program code:
determining a destination domain name, a domain name system server address and a gateway address, and detecting whether the destination domain name can be connected from a source address;
further detecting whether the domain name system server address is connectable from the source address in response to the destination domain name being unable to be connected from the source address;
further detecting whether the gateway address is connectable from the source address in response to the domain name system server address being unable to be connected from the source address, and returning a gateway unreachable in response to the gateway address being unable to be connected from the source address and returning a domain name system server unreachable in response to the gateway address being connectable from the source address;
further detecting whether a preset interface of a domain name system server is connectable from the source address in response to the domain name system server address being connectable from the source address, and returning that a preset interface is not available in response to the preset interface being unable to be connected from the source address, and returning a domain name system server failure in response to the preset interface being connectable from the source address, wherein detecting whether the preset interface of the domain name system server is connectable from the source address comprises: and using NCAT tool to scan the port number 53 of the domain name system server at the source address, and judging whether the port number 53 of the transmission control protocol has data activity on the transmission control protocol or the user datagram protocol.
CN202110774915.8A 2021-07-08 2021-07-08 Availability detection method and device of transmission control protocol Active CN113612653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110774915.8A CN113612653B (en) 2021-07-08 2021-07-08 Availability detection method and device of transmission control protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110774915.8A CN113612653B (en) 2021-07-08 2021-07-08 Availability detection method and device of transmission control protocol

Publications (2)

Publication Number Publication Date
CN113612653A CN113612653A (en) 2021-11-05
CN113612653B true CN113612653B (en) 2023-07-14

Family

ID=78337409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110774915.8A Active CN113612653B (en) 2021-07-08 2021-07-08 Availability detection method and device of transmission control protocol

Country Status (1)

Country Link
CN (1) CN113612653B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603347A (en) * 2017-02-14 2017-04-26 上海斐讯数据通信技术有限公司 Test method and system for networking function examination and network abnormity check
CN107707375A (en) * 2017-05-26 2018-02-16 贵州白山云科技有限公司 A kind of method and apparatus for positioning parsing failure

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603347A (en) * 2017-02-14 2017-04-26 上海斐讯数据通信技术有限公司 Test method and system for networking function examination and network abnormity check
CN107707375A (en) * 2017-05-26 2018-02-16 贵州白山云科技有限公司 A kind of method and apparatus for positioning parsing failure

Also Published As

Publication number Publication date
CN113612653A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
US8761040B2 (en) Controlling registration floods in VoIP networks via DNS
EP3219087B1 (en) Methods, systems, and computer readable media for facilitating the resolving of endpoint hostnames in test environments with firewalls, network address translators(nats), or clouds
CN101582856B (en) Session setup method of portal server and BAS (broadband access server) device and system thereof
US8687503B2 (en) Technique for identifying a failed network interface card within a team of network interface cards
CN107613037B (en) Domain name redirection method and system
JP2010512092A (en) Control tunnel and direct tunnel setting method in IPv4 network-based IPv6 service providing system
US9608906B2 (en) Methods, systems, and computer readable media for identifying network locations associated with endpoints
EP3869741B1 (en) Data transmission method and apparatus and system
CN108076003A (en) The detection method and device of Session Hijack
CN110474814B (en) Power local area network fault diagnosis method and device
CN114338597B (en) Network access method and device
US9699139B2 (en) Communications system
US10021176B2 (en) Method and server for managing traffic-overload on a server
CN113612653B (en) Availability detection method and device of transmission control protocol
JP5231513B2 (en) Resource record control system, resource record control method, application determination method and program
CN110035134B (en) Network address translation method, device and access equipment
CN114268578B (en) Data transmission method, device, equipment and storage medium for switching line
EP2472789A1 (en) Method, device and system for implementing multiparty communication
CN111405639B (en) Wireless network connection method and device, readable storage medium and computer equipment
CN113014682A (en) Method, system, terminal device and storage medium for realizing network dynamics
CN112887255A (en) Network communication method and device
CN113676369B (en) Network quality analysis method, data receiving server and storage medium
Caiazza et al. TCP‐based traceroute: An evaluation of different probing methods
CN115134271A (en) Fault detection method and device for IP transparent transmission ad hoc network and computer equipment
CN115002067A (en) Client host name processing method, device, system, equipment and medium

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