CN114024870B - Network connectivity detection method and system - Google Patents

Network connectivity detection method and system Download PDF

Info

Publication number
CN114024870B
CN114024870B CN202111338478.1A CN202111338478A CN114024870B CN 114024870 B CN114024870 B CN 114024870B CN 202111338478 A CN202111338478 A CN 202111338478A CN 114024870 B CN114024870 B CN 114024870B
Authority
CN
China
Prior art keywords
message
address
network
host
target
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
CN202111338478.1A
Other languages
Chinese (zh)
Other versions
CN114024870A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202111338478.1A priority Critical patent/CN114024870B/en
Publication of CN114024870A publication Critical patent/CN114024870A/en
Application granted granted Critical
Publication of CN114024870B publication Critical patent/CN114024870B/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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The invention provides a network connectivity detection method and a system, which relate to the field of Internet and can be applied to the financial field and other fields, wherein the method comprises the following steps: configuring preset forwarding rules for each network access device in the network to be tested; constructing and generating a detection message based on a TCP protocol according to a user input value in the connectivity detection requirement, and defining the message type as a synchronous message; providing the synchronous message to the source host machine through first network access equipment where the source host machine is located, converting the synchronous message into a message mirror image by the first network access equipment, and then sending the message mirror image to the analysis node according to a forwarding rule; after the source host receives the synchronous message, the corresponding confirmation message is returned to the target host in the network according to the TCP protocol; the first network access device and the second network access device send the message mirror image of the confirmation message to the analysis node according to the forwarding rule; and determining a connectivity analysis result between the source host and the target host according to the message received by the analysis node.

Description

Network connectivity detection method and system
Technical Field
The invention relates to the field of Internet, and can be applied to the financial field and other fields, in particular to a network connectivity detection method and system.
Background
With the development of business and IT technology, the size of the IT system of each company operation and maintenance is increased, the structure is complicated, the investigation is difficult after the network connectivity problem appears between each system, in most cases, the system needs to log on to the host, and the detection is performed through the ping, telnet and other commands. As cloud computing technology evolves and matures, more and more companies migrate their IT infrastructure to the cloud environment, which makes the corporate intranet environment increasingly complex. After logging in the host, the efficiency of the mode of detecting commands such as ping, telnet and the like is low, and large-scale detection cannot be realized. Therefore, the industry provides a quick detection method and a system based on the agent: and installing agents on each host, uniformly issuing detection commands such as ping, telnet and the like to each agent through a detection system, and detecting.
The agent-based rapid detection system can realize rapid detection, but the agent must be installed on a host, so that the system has certain invasiveness and is not transparent to a host user; and there is a risk that the host user erroneously deletes the agent, resulting in detection failure.
Disclosure of Invention
The invention aims at overcoming the defects that the prior art is opaque to a host machine and a user and has invasiveness, and provides a network connectivity detection method and a network connectivity detection system, which are transparent to the host machine and the user without installing a agent on the host machine.
In order to achieve the above object, the present invention provides a network connectivity detection method, which is applicable to each host accessing a network through a corresponding network access device, and the method includes: configuring preset forwarding rules for each network access device in the network to be tested; constructing and generating a detection message based on a TCP protocol according to a user input value in the connectivity detection requirement, and defining the message type as a synchronous message; providing the synchronous message to a source host machine through first network access equipment where the source host machine is located, converting the synchronous message into a message mirror image by the first network access equipment, and then sending the message mirror image to an analysis node according to the forwarding rule; after the source host receives the synchronous message, the corresponding confirmation message is returned to the target host in the network according to the TCP protocol; the first network access device and the second network access device where the target host is located send the message mirror image of the passed confirmation message to the analysis node according to the forwarding rule; and determining a connectivity analysis result between the source host and the target host according to the message received by the analysis node.
In the above network connectivity detection method, preferably, the forwarding rule includes: when the source address port of the message to be sent is a preset port, the route recording protocol in the IP message is in an open state, and the first address in the record route list is set as a preset idle address, the message mirror image is sent to the analysis node.
In the above network connectivity detection method, preferably, the preset port is a source address port whose number of usage times in the network to be detected is lower than a preset value; the predetermined idle address is an unused address in the network under test.
In the above network connectivity detection method, preferably, generating a detection message based on a TCP protocol structure according to a user input value and defining a message type as a synchronization message includes: setting a source address, a target IP address and a target port according to the input value of the user, and setting the source and target ports of the detection message to be consistent with the preset ports; setting a record route option in an IP protocol as an open state, setting a first address in a record route list as a preset idle address, and defining a message type as a synchronous message.
In the above network connectivity detection method, preferably, the source address and the destination address in the acknowledgement message are exchanged with the source address and the destination address in the synchronization message.
In the above network connectivity detection method, preferably, determining, according to the packet received by the analysis node, a connectivity analysis result between a source host and a target host includes: when the analysis node receives a synchronous message and/or a confirmation message twice, the source host is communicated with the target host; and when the analysis node does not receive the primary synchronous message and the secondary confirmation message, the source host is not communicated with the target host.
The invention also provides a network connectivity detection system suitable for the network connectivity detection method, wherein the system comprises a configuration module, a sending module, an analysis module, a source host, a target host, a first network access device and a second network access device; the configuration module is used for configuring preset forwarding rules for each network access device in the network to be tested; the sending module is used for constructing and generating a detection message based on a TCP protocol according to a user input value in the connectivity detection requirement and defining the message type as a synchronous message; the synchronous message is sent to the source host through the first network access equipment; the first network access device and the second network access device are used for connecting the source host and the target host to a network to be tested; the source host is used for sending back a corresponding confirmation message to a target host in the network according to the TCP after receiving the synchronous message; the first network access device is further configured to convert the synchronization packet into a packet mirror image, and send the packet mirror image to an analysis node according to the forwarding rule; the first network access device and the second network access device where the target host is located send the message mirror image of the passed confirmation message to the analysis node according to the forwarding rule; and the analysis module is used for determining a connectivity analysis result between the source host and the target host according to the message received by the analysis node.
In the above network connectivity detection system, preferably, the configuration module includes a rule definition unit, where the rule definition unit is configured to send a message mirror image to the analysis node when a source address port of a message to be sent is a preset port, a route record protocol in an IP message is in an on state, and a first address in a record route list is set as a predetermined idle address.
In the above network connectivity detection system, preferably, the sending module includes a detection message construction unit, where the detection message construction unit is configured to set a source address, a target IP address, and a target port according to a user input value, and set a source target port of a detection message to be consistent with a preset port; setting a record route option in an IP protocol as an open state, setting a first address in a record route list as a preset idle address, and defining a message type as a synchronous message.
In the above network connectivity detection system, preferably, the analysis module includes: when the analysis node receives a synchronous message and/or a confirmation message twice, the source host is communicated with the target host; and when the analysis node does not receive the primary synchronous message and the secondary confirmation message, the source host is not communicated with the target host.
In the above network connectivity detection system, preferably, the system further includes an interface module, a service processing module, and a processing queue module; the interface module is used for receiving the test requirement of a user; the business processing module is used for generating one or more connectivity detection requirements according to the test requirements; the processing queue module is configured to provide the connectivity detection requirement to the sending module.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the computer program.
The present invention also provides a computer readable storage medium storing a computer program for executing the above method.
The beneficial technical effects of the invention are as follows: any software is not required to be installed on the host, the network connectivity detection updating maintenance is transparent to the host, the user is not felt, and the influence on the user service is reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate and together with the description serve to explain the invention. In the drawings:
fig. 1 is a flowchart of a network connectivity detection method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a synchronous message generation flow according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a network connectivity detection system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a transmitting module according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a network connectivity detection system according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
The following will describe embodiments of the present invention in detail with reference to the drawings and examples, thereby solving the technical problems by applying technical means to the present invention, and realizing the technical effects can be fully understood and implemented accordingly. It should be noted that, as long as no conflict is formed, each embodiment of the present invention and each feature of each embodiment may be combined with each other, and the formed technical solutions are all within the protection scope of the present invention.
Additionally, the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that herein.
Referring to fig. 1, the method for detecting network connectivity provided by the present invention is suitable for each host to access a network through a corresponding network access device, and includes:
s101, configuring preset forwarding rules for each network access device in a network to be tested;
s102, constructing and generating a detection message based on a TCP (transmission control protocol) according to a user input value in a connectivity detection requirement and defining a message type as a synchronous message;
s103, providing the synchronous message to a source host machine through first network access equipment where the source host machine is located, converting the synchronous message into a message mirror image by the first network access equipment, and then sending the message mirror image to an analysis node according to the forwarding rule;
s104, after the source host receives the synchronous message, returning a corresponding confirmation message to a target host in the network according to a TCP protocol; the first network access device and the second network access device where the target host is located send the message mirror image of the passed confirmation message to the analysis node according to the forwarding rule;
s105, determining a connectivity analysis result between the source host and the target host according to the message received by the analysis node.
Therefore, the message forwarding is completed by the network access equipment, the influence on each host machine is avoided, and meanwhile, the connectivity detection between the source host machine and the target host machine can be completed rapidly. In the above embodiment, the forwarding rule includes: when the source address port of the message to be sent is a preset port, the route recording protocol in the IP message is in an open state, and the first address in the record route list is set as a preset idle address, the message mirror image is sent to the analysis node. The preset port may be a source address port whose number of usage times in the network to be tested is lower than a preset value; the predetermined idle address is an unused address in the network under test. In actual operation, the network access device may be a physical switch or a virtual switch such as Open vSwitch; the forwarding rule setting flow comprises the following steps: 1. selecting a source address port that is rarely or substantially unused throughout the network; 2. configuring forwarding rules on the network access device: if the message source address port is the above-mentioned selection port and the route record protocol in the IP message is in open state, and the first address in the record route list is set to 0.0.0.0 or other addresses not used in the present network, then the message mirror image is sent to analysis node. Specifically, forwarding rule definition for Open vSwitch may be implemented by constructing custom actions.
Referring to fig. 2, in an embodiment of the present invention, generating a detection message based on a TCP protocol structure according to a user input value and defining a message type as a synchronization message includes:
s201, setting a source address, a target IP address and a target port according to a user input value, and setting a source target port of a detection message to be consistent with a preset port;
s202, setting a record route option in an IP protocol as an on state, setting a first address in a record route list as a preset idle address, and defining a message type as a synchronous message.
In actual work, the construction flow of the detection message can be executed as follows, 1. The message source target port requests are consistent with the specified port, and the source address is set according to the input value of the user; 2. setting a target IP address and a target port according to a value input by a user; 3. setting a record route option in an IP protocol to an open state, and setting a first address in a record route list to be 0.0.0.0 or other addresses which cannot be used in the network; 4. the message type is a TCP Synchronization (SYN) message.
In an embodiment of the present invention, determining, according to the message received by the analysis node, a connectivity analysis result between a source host and a target host includes: when the analysis node receives a synchronous message and/or a confirmation message twice, the source host is communicated with the target host; and when the analysis node does not receive the primary synchronous message and the secondary confirmation message, the source host is not communicated with the target host. In another embodiment, the source address and the destination address in the acknowledgement message are exchanged with the source address and the destination address in the synchronization message. Specifically, in actual work, the flow of detecting connectivity mainly collects intermediate messages, and the main flow is as follows: 1. the detection message constructed above is sent to the network access equipment where the source host is located; 2. the network access equipment where the source host is located sends the message to the source host, and meanwhile, the message is sent to the analysis node according to the forwarding rule; 3. after receiving the TCP Synchronization (SYN) message, the source host sends a corresponding Acknowledgement (ACK) message back according to the TCP protocol to the network access equipment, and the source address and the target address in the Acknowledgement (ACK) message are exchanged with the source address and the target address of the Synchronization (SYN) message; 4. the network access equipment receives the message and then forwards the message, and simultaneously mirrors the message to the analysis node according to the forwarding rule; 5. the message is transmitted to the network access device where the target host is located, and the target network access device sends the message to the target host, and at the same time images the message to the analysis node according to the forwarding rule. And then, the analysis node judges the network connectivity between the source and the target host of the detection according to the received message. If 1 TCP Synchronization (SYN) message is received and 2 TCP Acknowledgement (ACK) messages with source and destination address exchanged are received, the designated ports of the source host and the target host can be considered to be communicated; if all 3 messages are not received, the designated ports of the source host and the target host are considered to be not communicated.
Referring to fig. 3, the present invention further provides a network connectivity detection system suitable for the network connectivity detection method, where the system includes a configuration module, a sending module, an analysis module, a source host, a target host, a first network access device and a second network access device; the configuration module is used for configuring preset forwarding rules for each network access device in the network to be tested; the sending module is used for constructing and generating a detection message based on a TCP protocol according to a user input value in the connectivity detection requirement and defining the message type as a synchronous message; the synchronous message is sent to the source host through the first network access equipment; the first network access device and the second network access device are used for connecting the source host and the target host to a network to be tested; the source host is used for sending back a corresponding confirmation message to a target host in the network according to the TCP after receiving the synchronous message; the first network access device is further configured to convert the synchronization packet into a packet mirror image, and send the packet mirror image to an analysis node according to the forwarding rule; the first network access device and the second network access device where the target host is located send the message mirror image of the passed confirmation message to the analysis node according to the forwarding rule; and the analysis module is used for determining a connectivity analysis result between the source host and the target host according to the message received by the analysis node. The first network access device and the second network access device are only two network access devices listed for describing a communication mode between a source host and a target host for convenience of example, and the two network access devices can adopt the same hardware structure or virtual configuration in structure and definition; in practical operation, the network to be tested may include a plurality of network access devices respectively connected to different hosts, which is not limited in any way.
In the above embodiment, the configuration module includes a rule definition unit, where the rule definition unit is configured to send a message mirror image to the analysis node when a source address port of a message to be sent is a preset port, a route record protocol in an IP message is in an on state, and a first address in a record route list is set to a predetermined idle address. Specifically, the configuration module mainly configures the following configuration for each network access device in the network: if the message source address port is a configured designated port and the route record protocol in the IP message is in an on state, and the first address in the record route list is set to 0.0.0.0 or other addresses which are not used in the network, the message mirror image is sent to the analysis node.
Referring to fig. 4, the sending module includes a probe message construction unit, where the probe message construction unit is configured to set a source address, a target IP address, and a target port according to a user input value, and set a source target port of the probe message to be consistent with a preset port; setting a record route option in an IP protocol as an open state, setting a first address in a record route list as a preset idle address, and defining a message type as a synchronous message. Specifically, in actual work, the sending module constructs and detects a TCP message, and the construction key point comprises 1. The message source target port request is consistent with the port appointed in the first step, and the source address is set according to the user input value; 2. setting a target IP address and a target port according to a value input by a user; 3. setting a record route option in an IP protocol to an open state, and setting a first address in a record route list to be 0.0.0.0 or other addresses which cannot be used in the network; 4. the message type is a TCP Synchronization (SYN) message. And after the construction is completed, the network access equipment is sent to the source host.
In an embodiment of the present invention, the analysis module may include: when the analysis node receives a synchronous message and/or a confirmation message twice, the source host is communicated with the target host; and when the analysis node does not receive the primary synchronous message and the secondary confirmation message, the source host is not communicated with the target host. In actual operation, the system may include a receiving module, through which the mirror message transmitted back from each network access device is received. And then, analyzing the received message by an analysis module, and judging the network connectivity between the source and the target host of the detection. If 1 TCP Synchronization (SYN) message is received and 2 TCP Acknowledgement (ACK) messages with source code address exchange are received, the designated ports of the source host and the target host can be considered to be communicated; if all 3 messages are not received, the designated ports of the source host and the target host are considered to be not communicated.
Referring to fig. 5, in an embodiment of the present invention, the system further includes an interface module, a service processing module, and a processing queue module; the interface module is used for receiving the test requirement of a user; the business processing module is used for generating one or more connectivity detection requirements according to the test requirements; the processing queue module is configured to provide the connectivity detection requirement to the sending module. Specifically, in this embodiment, the interface module receives the detection requirements of various users, such as command lines, http restful api interfaces, and the like, and mainly includes data such as a source host address, a target host port, and the like, and transmits the data to the service processing module. The service processing module analyzes and processes the user detection requirement received in the interface module, and converts the user detection requirement into a plurality of detection source target pairs to be placed in the processing queue module. The processing queue module receives and stores the detection source destination pair sent by the service processing layer so that the subsequent sending module weights the detection source destination pair, namely the connectivity detection requirement.
The beneficial technical effects of the invention are as follows: any software is not required to be installed on the host, the network connectivity detection updating maintenance is transparent to the host, the user is not felt, and the influence on the user service is reduced.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the computer program.
The present invention also provides a computer readable storage medium storing a computer program for executing the above method.
As shown in fig. 6, the electronic device 600 may further include: a communication module 110, an input unit 120, an audio processing unit 130, a display 160, a power supply 170. It is noted that the electronic device 600 need not include all of the components shown in fig. 6; in addition, the electronic device 600 may further include components not shown in fig. 6, to which reference is made to the prior art.
As shown in fig. 6, the central processor 100, also sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, which central processor 100 receives inputs and controls the operation of the various components of the electronic device 600.
The memory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information about failure may be stored, and a program for executing the information may be stored. And the central processor 100 can execute the program stored in the memory 140 to realize information storage or processing, etc.
The input unit 120 provides an input to the central processor 100. The input unit 120 is, for example, a key or a touch input device. The power supply 170 is used to provide power to the electronic device 600. The display 160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
The memory 140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, or the like. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like. Memory 140 may also be some other type of device. Memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). The memory 140 may include an application/function storage 142, the application/function storage 142 for storing application programs and function programs or a flow for executing operations of the electronic device 600 by the central processor 100.
The memory 140 may also include a data store 143, the data store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. The driver storage 144 of the memory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 110 is a transmitter/receiver 110 that transmits and receives signals via an antenna 111. A communication module (transmitter/receiver) 110 is coupled to the central processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality of communication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, etc., may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to a speaker 131 and a microphone 132 via an audio processor 130 to provide audio output via the speaker 131 and to receive audio input from the microphone 132 to implement usual telecommunication functions. The audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 130 is also coupled to the central processor 100 so that sound can be recorded locally through the microphone 132 and so that sound stored locally can be played through the speaker 131.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A network connectivity detection method suitable for each host to access a network through a corresponding network access device, the method comprising:
configuring preset forwarding rules for each network access device in the network to be tested;
constructing and generating a detection message based on a TCP protocol according to a user input value in the connectivity detection requirement, and defining the message type as a synchronous message;
providing the synchronous message to a source host machine through first network access equipment where the source host machine is located, converting the synchronous message into a message mirror image by the first network access equipment, and then sending the message mirror image to an analysis node according to the forwarding rule;
after the source host receives the synchronous message, the corresponding confirmation message is returned to the target host in the network according to the TCP protocol; the first network access device and the second network access device where the target host is located send the message mirror image of the passed confirmation message to the analysis node according to the forwarding rule;
determining a connectivity analysis result between a source host and a target host according to the message received by the analysis node;
the method for determining the connectivity analysis result between the source host and the target host according to the message received by the analysis node comprises the following steps: when the analysis node receives a primary synchronous message and a secondary confirmation message, the source host is communicated with the target host; when the analysis node does not receive the primary synchronous message and the secondary confirmation message, the source host is not communicated with the target host;
and the source address and the target address in the confirmation message are exchanged with the source address and the target address in the synchronous message.
2. The network connectivity detection method according to claim 1, wherein said forwarding rules comprise:
when the source address port of the message to be sent is a preset port, the route recording protocol in the IP message is in an open state, and the first address in the record route list is set as a preset idle address, the message mirror image is sent to the analysis node.
3. The network connectivity detection method according to claim 2, wherein the preset port is a source address port whose number of uses in the network to be detected is lower than a preset number; the predetermined idle address is an unused address in the network under test.
4. The method of claim 2, wherein generating a probe message based on a TCP protocol construct and defining a message type as a synchronization message according to a user input value comprises:
setting a source address, a target IP address and a target port according to the input value of the user, and setting the source and target ports of the detection message to be consistent with the preset ports;
setting a record route option in an IP protocol as an open state, setting a first address in a record route list as a preset idle address, and defining a message type as a synchronous message.
5. A network connectivity detection system adapted for the network connectivity detection method of any one of claims 1 to 4, characterized in that the system comprises a configuration module, a transmission module, an analysis module, a source host, a target host, a first network access device and a second network access device;
the configuration module is used for configuring preset forwarding rules for each network access device in the network to be tested;
the sending module is used for constructing and generating a detection message based on a TCP protocol according to a user input value in the connectivity detection requirement and defining the message type as a synchronous message; the synchronous message is sent to the source host through the first network access equipment;
the first network access device and the second network access device are used for connecting the source host and the target host to a network to be tested;
the source host is used for sending back a corresponding confirmation message to a target host in the network according to the TCP after receiving the synchronous message;
the first network access device is further configured to convert the synchronization packet into a packet mirror image, and send the packet mirror image to an analysis node according to the forwarding rule; the first network access device and the second network access device where the target host is located send the message mirror image of the passed confirmation message to the analysis node according to the forwarding rule;
the analysis module is used for determining a connectivity analysis result between the source host and the target host according to the message received by the analysis node;
the analysis module comprises: when the analysis node receives a primary synchronous message and a secondary confirmation message, the source host is communicated with the target host; when the analysis node does not receive the primary synchronous message and the secondary confirmation message, the source host is not communicated with the target host;
and the source address and the target address in the confirmation message are exchanged with the source address and the target address in the synchronous message.
6. The network connectivity detection system according to claim 5, wherein the configuration module comprises a rule definition unit, the rule definition unit is configured to send the mirror image of the message to the analysis node when a source address port of the message to be sent is a preset port, a route record protocol in the IP message is in an on state, and a first address in the record route list is set to a predetermined idle address.
7. The network connectivity detection system according to claim 6, wherein the sending module comprises a probe message construction unit, the probe message construction unit is configured to set a source address, a target IP address, and a target port according to a user input value, and set a probe message source target port to be consistent with a preset port; setting a record route option in an IP protocol as an open state, setting a first address in a record route list as a preset idle address, and defining a message type as a synchronous message.
8. The network connectivity detection system of claim 5, further comprising an interface module, a traffic handling module, and a handling queue module;
the interface module is used for receiving the test requirement of a user;
the business processing module is used for generating one or more connectivity detection requirements according to the test requirements;
the processing queue module is configured to provide the connectivity detection requirement to the sending module.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program for executing the method of any one of claims 1 to 4 by a computer.
CN202111338478.1A 2021-11-12 2021-11-12 Network connectivity detection method and system Active CN114024870B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111338478.1A CN114024870B (en) 2021-11-12 2021-11-12 Network connectivity detection method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111338478.1A CN114024870B (en) 2021-11-12 2021-11-12 Network connectivity detection method and system

Publications (2)

Publication Number Publication Date
CN114024870A CN114024870A (en) 2022-02-08
CN114024870B true CN114024870B (en) 2023-05-16

Family

ID=80063920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111338478.1A Active CN114024870B (en) 2021-11-12 2021-11-12 Network connectivity detection method and system

Country Status (1)

Country Link
CN (1) CN114024870B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114629820B (en) * 2022-03-25 2023-09-12 阿里巴巴(中国)有限公司 Network connectivity detection method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185711A (en) * 2011-04-26 2011-09-14 中兴通讯股份有限公司 Method and equipment for detecting link failure in hybrid network
CN103650434A (en) * 2011-05-10 2014-03-19 卡斯蒂安芬兰有限公司 Virtual networks within a physical network
WO2015180292A1 (en) * 2014-05-27 2015-12-03 中兴通讯股份有限公司 Method and apparatus for detecting user network interface connectivity of virtual private network
CN105634857A (en) * 2014-11-26 2016-06-01 中兴通讯股份有限公司 Link connectivity detecting method and device
CN112751733A (en) * 2021-02-08 2021-05-04 北京金山云网络技术有限公司 Link detection method, device, equipment, system and switch
CN113259162A (en) * 2021-05-08 2021-08-13 中国工商银行股份有限公司 Network fault determination method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580956A (en) * 2013-11-05 2014-02-12 北京锐安科技有限公司 Method and device for detecting data integrity
CN108075936A (en) * 2016-11-16 2018-05-25 中国移动通信有限公司研究院 VxLAN detection methods and device
CN106452982A (en) * 2016-12-19 2017-02-22 北京中电普华信息技术有限公司 Network service connectivity testing system
CN106878106B (en) * 2017-02-24 2020-03-06 新华三技术有限公司 Reachability detection method and device
CN109587010B (en) * 2018-12-28 2020-07-07 迈普通信技术股份有限公司 Connectivity detection method and stream forwarding equipment
CN115733792A (en) * 2020-02-26 2023-03-03 华为技术有限公司 Message processing method, device, network equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185711A (en) * 2011-04-26 2011-09-14 中兴通讯股份有限公司 Method and equipment for detecting link failure in hybrid network
CN103650434A (en) * 2011-05-10 2014-03-19 卡斯蒂安芬兰有限公司 Virtual networks within a physical network
WO2015180292A1 (en) * 2014-05-27 2015-12-03 中兴通讯股份有限公司 Method and apparatus for detecting user network interface connectivity of virtual private network
CN105634857A (en) * 2014-11-26 2016-06-01 中兴通讯股份有限公司 Link connectivity detecting method and device
WO2016082588A1 (en) * 2014-11-26 2016-06-02 中兴通讯股份有限公司 Link connectivity checking method and apparatus
CN112751733A (en) * 2021-02-08 2021-05-04 北京金山云网络技术有限公司 Link detection method, device, equipment, system and switch
CN113259162A (en) * 2021-05-08 2021-08-13 中国工商银行股份有限公司 Network fault determination method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于ICMP扩展的链路状态检测方法;周明;郦苏丹;王宏;;计算机系统应用(11);全文 *
嵌入式Linux系统下网络连通性的检测;张小进;;北京印刷学院学报(04);全文 *

Also Published As

Publication number Publication date
CN114024870A (en) 2022-02-08

Similar Documents

Publication Publication Date Title
CN111539726B (en) Block chain consensus system and method
CN104967585B (en) A kind of method and apparatus of remote debugging mobile terminal
US20140035727A1 (en) Application Routing Configuration for NFC Controller Supporting Multiple NFCEEs
US20120158839A1 (en) Wireless network interface with infrastructure and direct modes
CN107517119B (en) Virtual network detection method and device in VPC environment
KR20150013860A (en) Clientless cloud computing
KR101528367B1 (en) Sound control system and method as the same
CN114024870B (en) Network connectivity detection method and system
CN110941563A (en) Automatic script testing method and device
CN111371695B (en) Service flow limiting method and device
US20180077242A1 (en) Network communication technologies for laboratory instruments
WO2020029602A1 (en) Time delay detection method and apparatus, and system
CN111949614B (en) Bank system file conversion method and device
EP3896931B1 (en) Spark shuffle-based remote direct memory access system and method
CN105187474A (en) Information processing method and server
CN112422485B (en) Communication method and device of transmission control protocol
CN112600703A (en) Network equipment remote access fault positioning method and device
US20200341653A1 (en) Method, network adapter and computer program product for processing data
CN114025014B (en) Asset detection method and device, electronic equipment and storage medium
CN114158074B (en) 5G network element address determination method and device, electronic equipment and storage medium
CN114697339A (en) Load balancing method and device under centralized architecture
CN113438083A (en) Signature adding and checking method and device based on interface automatic test
CN112866439A (en) Data processing method, device and system
CN105577427A (en) Detection method and device for communication connection between household appliance and mobile terminal
CN102200888B (en) Virtual memory, and virtual storage system and method

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