CN109194541B - Network testing method and system - Google Patents

Network testing method and system Download PDF

Info

Publication number
CN109194541B
CN109194541B CN201810957700.8A CN201810957700A CN109194541B CN 109194541 B CN109194541 B CN 109194541B CN 201810957700 A CN201810957700 A CN 201810957700A CN 109194541 B CN109194541 B CN 109194541B
Authority
CN
China
Prior art keywords
line pair
connection
ports
port
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810957700.8A
Other languages
Chinese (zh)
Other versions
CN109194541A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810957700.8A priority Critical patent/CN109194541B/en
Publication of CN109194541A publication Critical patent/CN109194541A/en
Application granted granted Critical
Publication of CN109194541B publication Critical patent/CN109194541B/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
    • 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

Landscapes

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

Abstract

The invention discloses a network testing method and a system, wherein the method comprises the steps of reading design planning data of a network to be tested; judging the connection relation of the line pair according to the design planning data; the signal quality of the correctly connected line pair is detected. The method has the advantages of simple realization, strong applicability and automatic realization, and obviously improves the network testing efficiency and the reliability of the testing result; regular inspection and full-coverage detection of the machine room network can be realized, and the effect of continuous quality assurance is achieved.

Description

Network testing method and system
[ technical field ] A method for producing a semiconductor device
The invention relates to a computer application technology, in particular to a network testing method and a network testing system.
[ background of the invention ]
In the network facility delivery and delivery test of the IDC network machine room, because the interfaces of the whole machine room system are connected in a large number, and the whole wiring process, such as label pasting, port plugging and the like, is mostly carried out manually, errors are inevitable; meanwhile, the number of network cables wired in the whole machine room is tens of millions, and physical damage to the network cables can occur before wiring and in the deployment process.
In the prior art, manual sampling inspection is carried out after wiring of a machine room is finished; or directly carrying out the next deployment and then carrying out positioning when problems occur. The efficiency is low; the coverage is limited; the testing strength is not fine enough, and the problem cannot be fully exposed; the problem is found by manual troubleshooting, which wastes time and labor cost.
[ summary of the invention ]
Aspects of the present application provide a network testing method, system, device, and storage medium, which can improve network testing efficiency and reliability of a test result.
In one aspect of the present invention, a network testing method is provided, where the method includes:
reading design planning data of a network to be tested;
judging the connection relation of the line pair according to the design planning data;
the signal quality of the correctly connected line pair is detected.
The above aspects and any possible implementations further provide an implementation in which the design planning data includes line pair information and device login information.
As to the above-mentioned aspect and any possible implementation manner, there is further provided an implementation manner, where the determining, according to the design planning data, a connection relationship of a pair of lines includes:
and sequentially logging in the equipment at the two ends of each line pair according to the line pair information and the equipment logging information, and judging the connection relation of the line pairs.
The above aspect and any possible implementation manner further provide an implementation manner, and the determining the connection of the line pair includes:
judging whether the ports at the two ends of the line pair are in a link connection state or not;
if not, entering a first exception handling process;
if yes, carrying out interruption and connection operations on the port of one section of the line pair in sequence, and detecting whether the port of the opposite end is changed synchronously;
if the asynchronous change occurs, entering a second exception handling process;
and if the synchronous change is detected, judging that the connection of the line pair is correct.
The above-described aspect and any possible implementation further provide an implementation, where the first exception handling process includes:
if the ports at the two ends of the line pair are in a link terminal state, judging that the line pair is not connected;
if the ports at the two ends of the line pair are in the interruption state and the connection state respectively, the ports in the connection state are subjected to interruption and connection operations in sequence, and the corresponding ports which change synchronously in the network are detected.
The above-described aspect and any possible implementation further provide an implementation, where the second exception handling process includes:
and respectively carrying out interruption and connection operations on the ports at the two ends of the line pair in sequence, and detecting the corresponding ports which change synchronously in the network.
The above-described aspects and any possible implementations further provide an implementation, and the method further includes:
the actual pair connection relationship detected is recorded.
The above-mentioned aspect and any possible implementation manner further provide an implementation manner, after detecting the signal quality of the correctly connected line pair, further including:
and summarizing the detected actual line pair connection relation.
In another aspect of the present invention, a network test system is provided, which includes:
the planning reading module is used for reading the design planning data of the network to be tested;
the connection relation detection module is used for judging the connection relation of the line pair according to the design planning data;
and the signal quality detection module is used for detecting the signal quality of the correctly connected line pair.
The above aspects and any possible implementations further provide an implementation in which the design planning data includes line pair information and device login information.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the connection relation detection module is specifically configured to:
and calling an equipment login module to sequentially log in equipment at two ends of each line pair according to the line pair information and the equipment login information, and judging the connection relation of the line pairs.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the connection relation detection module is specifically configured to:
judging whether the ports at the two ends of the line pair are in a link connection state or not;
if not, entering a first exception handling process;
if yes, carrying out interruption and connection operations on the port of one section of the line pair in sequence, and detecting whether the port of the opposite end is changed synchronously;
if the asynchronous change occurs, entering a second exception handling process;
and if the synchronous change is detected, judging that the connection of the line pair is correct.
The above-described aspect and any possible implementation manner further provide an implementation manner, where the connection relation detection module includes a first exception handling sub-module, configured to:
if the ports at the two ends of the line pair are in a link terminal state, judging that the line pair is not connected;
if the ports at the two ends of the line pair are in the interruption state and the connection state respectively, the ports in the connection state are subjected to interruption and connection operations in sequence, and the corresponding ports which change synchronously in the network are detected.
As for the above-mentioned aspects and any possible implementation manner, an implementation manner is further provided, where the connection relation detection module includes a second exception handling sub-module, and is configured to perform, in sequence, an interruption operation and a connection operation on ports at two ends of the line pair, respectively, and detect a corresponding port that changes synchronously in a network.
The above-described aspects and any possible implementation further provide an implementation, and the system further includes a result recording module configured to record the detected actual pair-to-pair connection relationship.
The above-described aspect and any possible implementation manner further provide an implementation manner, and the result recording module is further configured to summarize the detected actual line pair connection relationship.
In another aspect of the present invention, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method as described above when executing the program.
In another aspect of the invention, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method as set forth above.
Based on the introduction, the scheme of the invention can improve the network testing efficiency and the reliability of the testing result.
[ description of the drawings ]
FIG. 1 is a flow chart of a network testing method according to the present invention;
FIG. 2 is a flow chart of a network testing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of an exception handling process 1 according to an embodiment of the network testing method of the present invention;
FIG. 4 is a flowchart of an exception handling process 2 according to an embodiment of the network testing method of the present invention;
FIG. 5 is a block diagram of a network test system according to the present invention;
fig. 6 illustrates a block diagram of an exemplary computer system/server 012 suitable for use in implementing embodiments of the invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a flowchart of an embodiment of a network testing method according to the present invention, as shown in fig. 1, including the following steps:
step S11, reading design planning data of the network to be tested;
step S12, judging the connection relation of the line pair according to the design planning data;
and step S13, detecting the signal quality of the correctly connected line pair.
Specifically, as shown in the flowchart of the embodiment of the present invention in fig. 2:
in one preferred implementation of step S11,
and reading design planning data of the network to be tested from a database, wherein the design planning data comprises line pair information and equipment login information.
Preferably, the pair information is a pair information table, which records the connection relationship between the device ports at the two ends of each pair in the network to be tested in a list form, for example, as shown in table 1,
a device 3 port<Connection 1->B device 5 port
6 ports of C equipment<Connection 2->7 ports of B equipment
Device B3 port<Connection 3->F device 10 port
23 ports of A equipment<Connection 4->F device 5 port
TABLE 1
Preferably, the device login information is a device login information table, and records login information of each device in the network to be tested in a form of a list, including: a login method, a login password, a login IP, etc. to log in each device based on the login information, and to determine the port connection relationship of each device, as shown in table 2,
device login mode, login password and login IP
B device login mode, login password and login IP
C device login mode, login password and login IP
D device login mode, login password and login IP
E device login mode, login password and loginRecording IP
F device login mode, login password and login IP
TABLE 2
Preferably, the login manner may include a login manner such as ssh, telnet, and the like according to different devices.
In a preferred implementation manner of step S12, determining a connection relationship of the line pair according to the design planning data;
preferably, the line pair information is read, and the connection relation of each line pair is judged in sequence; and acquiring the equipment login information according to the equipment identifications at the two ends of each line pair, logging in the equipment at the two ends of each line pair, and judging the connection relation of each line pair. After logging in the device according to the logging-in mode, the corresponding command line sequence is adopted to obtain log information including the link state and the signal intensity of the port output by the command line, and the link state and the signal intensity of the port are extracted.
Preferably, after the devices at the two ends of the line pair log in, the corresponding ports on the devices connected through the line pair should be in a link up (link connection) state, and therefore, it is first detected whether the corresponding ports at the two ends of the line pair are both in a link up state; if not, indicating that the line pair is connected wrongly, and entering an exception handling process 1; if so, further detection is required, for example, the corresponding ports at the two ends of the line pair are both connected with other ports and in a link up state, and do not represent that the corresponding ports at the two ends of the line pair are correctly connected through the line pair, so that link down and link up operations are continuously performed on the port at one end of the line pair, and whether the link states of the ports at the opposite end of the line pair are synchronously changed is detected; if the change is asynchronous, entering an exception handling process 2; and if the synchronous change is carried out, the line pair is correctly connected, namely the line pair meets the wiring requirement, the detection result of the line pair is recorded in a result list, and the line pair is recorded in a 'correctly connected line pair list' in the result list.
For example, the pair information table is read, and first, the connection relationship of the pair 1 is determined, and both ends of the pair 1 are the port a of the device 3 and the port B of the device 5. Obtaining login information of the device A and the device B from the device login information table, wherein the login information comprises a device login mode A, a login password and a login IP; b, equipment login mode, login password and login IP; and respectively logging in the device A and the device B according to the login information. And detecting whether the link states of the port 3 of the A equipment and the port 5 of the B equipment are in a link up state or not. If not, entering an exception handling process 1; if yes, performing linkdown and linkup operations on the port 3 of the device A, and detecting whether the link state of the port 5 of the device B at the opposite end of the line is synchronously changed; or performing linkdown and linkup operations on the port 5 of the B equipment, detecting whether the link states of the port 3 of the A equipment of the pair segment change synchronously, and entering an exception handling process 2 if the link states change asynchronously; if the synchronization changes, the pair connection is correct, and the pair 1, namely the port 3 of the A device, is < -connected with the port 1- > the port 5 of the B device, is recorded in a 'correctly connected pair list' in a result list.
Preferably, the network to be tested is tested, and not only the correctly connected line pair needs to be obtained, but also the actual connection condition of the incorrectly connected line pair, for example, whether the connection is wrong or not, is judged.
Preferably, the actual connection condition of the pair with the connection error is judged through the abnormality processing flow 1 and the abnormality processing flow 2.
Preferably, in a preferred implementation manner of the exception handling process 1, as shown in fig. 3, the ports corresponding to the two ends of the line pair are not in a link up state, and if the ports corresponding to the two ends of the line pair are in a link down state, the line pair information is recorded in an "unconnected line pair list" in a result list; if the corresponding port at the two ends of the line pair is in a link up state and a link down state, the port in the link up state is indicated to have a corresponding port in the link up state in the network, so that the device in the network to be tested is polled by sequentially performing link down and link up operations on the port in the link up state, the corresponding port which changes synchronously with the port in the link up state is found, and the actual connection relation can be obtained and recorded.
For example, if both the ports a and B devices 3 and 5 are in the linkdown state, the pair is recorded in the "unconnected pair list" in the result list, that is, the ports a and B devices 3 and 5 are not connected. If the port 3 of the device a is in a link up state and the port 5 of the device B is in a link down state, it indicates that the port 3 of the device a has a corresponding port in the link up state in the network to be tested, in order to find out the corresponding port, the port 3 of the device a is sequentially subjected to link down and link up operations, devices in the network to be tested are polled, a corresponding port which changes synchronously with the port 3 of the device a, such as the port 7 of the device B, is found out, and the actual connection relationship is recorded. Preferably, the original pair 1 "port 3 of a device 3 < -connection 1- > port 5 of B device" is recorded in the "pair list of connection errors" in the result list.
Preferably, in a preferred implementation manner of the exception handling process 2, as shown in fig. 4, the ports corresponding to the two ends of the line pair both have a corresponding port in a link up state in the network, so that by sequentially performing link down and link up operations on one of the ports corresponding to the two ends of the line pair, polling the device in the network to be tested, finding out the corresponding port that changes synchronously with the port, an actual line connection relationship can be obtained and recorded.
For example, if the link states of the port 3 of the a device and the port 5 of the B device change asynchronously, that is, both the port 3 of the a device and the port 5 of the B device have corresponding ports in a link up state, but the port 3 of the a device and the port 5 of the B device are not actually connected. In order to respectively find out corresponding ports of a port 3 of the device A and a port 5 of the device B, sequentially performing linkdown and linkup operations on the port 3 of the device A, polling devices in a network to be tested, finding out a corresponding port which synchronously changes with the port 3 of the device A, such as a port 7 of the device B, and recording the connection relation; and then, sequentially performing linkdown and linkup operations on the port 5 of the B device, polling the devices in the network to be tested, finding out a corresponding port which synchronously changes with the port 5 of the B device, such as a port 3 of the C device, and recording the actual connection relation.
In a preferred implementation manner of step S13, if the connection of the pair is correct, the signal quality of the correctly connected pair is further detected.
Preferably, signal quality data are respectively checked on the equipment of the line pair connecting segment, and whether the signal quality meets the preset engineering requirement is judged; if not, recording the line pair in a' line pair list with poor signal quality in a result list; if yes, judging whether the polling of the line pair is finished, if not, sequentially executing the steps S12 and S13 on the rest line pairs in the line pair information table, for example, sequentially executing the steps S12 and S13 on the connection 2, the connection 3 and the connection 4 in the line pair information table; if the polling is finished, the information in the result list is summarized.
Preferably, because each line pair is polled, the resulting actual connection relationships between the ports are duplicated, and therefore the information in the list needs to be summarized. And comparing the summary information with the line pair information table read in the step S11, obtaining line pairs which are not recorded in the line pair information table in the network to be tested, and recording the line pairs in a line pair list which is more than the plan.
For example, the actual connection relationship obtained by the exception handling process 1 and the exception handling process 2 is not recorded in the pair information table, and is recorded in the "more planned pair list" in the result list by comparison.
Preferably, a plurality of table records in the result list are normalized to provide a uniform reading and querying interface for the outside.
Through the embodiment, the realization is simple, the applicability is strong, the automation is realized, and the network testing efficiency and the reliability of the testing result are obviously improved. The system can be used for regular inspection and full-coverage detection of a machine room network, and achieves the effect of continuous quality assurance.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
The above is a description of method embodiments, and the embodiments of the present invention are further described below by way of apparatus embodiments.
Fig. 5 is a structural diagram of an embodiment of the network test system of the present invention, as shown in fig. 5, including the following modules:
a plan reading module 51, configured to read design plan data of a network to be tested;
a connection relation detection module 52, configured to determine a connection relation of the line pair according to the design planning data;
and a signal quality detection module 53, configured to detect the signal quality of the correctly connected line pair.
In a preferred implementation manner of the plan reading module 51, the plan reading module 51 reads design plan data of the network to be tested from a database, where the design plan data includes line pair information and device login information.
Preferably, the pair information is a pair information table, which records the connection relationship between the device ports at the two ends of each pair in the network to be tested in a list form, for example, as shown in table 1,
Figure BDA0001773044220000091
Figure BDA0001773044220000101
TABLE 1
Preferably, the device login information is a device login information table, and records login information of each device in the network to be tested in a form of a list, including: a login method, a login password, a login IP, etc. to log in each device based on the login information, and to determine the port connection relationship of each device, as shown in table 2,
device login mode, login password and login IP
B device login mode, login password and login IP
C device login mode, login password and login IP
D device login mode, login password and login IP
E device login mode, login password and login IP
F device login mode, login password and login IP
TABLE 2
Preferably, the login manner may include a login manner such as ssh, telnet, and the like according to different devices.
In a preferred implementation manner of the connection relation detecting module 52, the connection relation detecting module is configured to determine a connection relation of a line pair according to the design planning data;
preferably, the connection relation detecting module 52 sequentially judges the connection relation of each line pair according to the line pair information read by the plan reading module 51;
preferably, the device login information is obtained according to the device identifiers at the two ends of each line pair, the device login module 54 is called to log in the devices at the two ends of each line pair, and the connection relationship of each line pair is judged. Preferably, the device control and information recording module 55 is invoked to send the device login manner and the sequence of command lines for acquiring link status after logging in the device to the device login module 54, shield the command line differences of different devices, and send the corresponding results back to the connection relation detection module 52. After the device login module 54 logs in the device according to the login manner, the command line sequence is input to obtain log information including the link state of the port output by the command line, the connection relation detection module 52 calls the information analysis module 55 to extract the link state of the port, and the result is returned to the connection relation detection module 52.
Preferably, after the devices at the two ends of the line pair log in, the corresponding ports on the devices connected through the line pair should be in a link up state, so the connection relation detecting module 52 first detects whether the corresponding ports at the two ends of the line pair are both in a link up state; if not, indicating that the line pair is connected wrongly, and entering an exception handling process 1; if so, further detection is needed, for example, the corresponding ports at the two ends of the line pair are connected with other ports and in a link up state, and the corresponding ports at the two ends of the line pair are not represented to be correctly connected through the line pair, so that the link down and link up operations are continuously performed on the port at one end of the line pair through a command line, and whether the link states of the ports at the opposite ends of the line pair are changed synchronously is detected; if the change is asynchronous, entering an exception handling process 2; if the line pair is changed synchronously, the connection of the line pair is correct, that is, the line pair meets the wiring requirement, the result recording module 56 records the detection result of the line pair in the result list, and the line pair is recorded in the "correctly connected line pair list" in the result list.
For example, the pair information table is read, and first, the connection relationship of the pair 1 is determined, and both ends of the pair 1 are the port a of the device 3 and the port B of the device 5. Obtaining login information of the device A and the device B from the device login information table, wherein the login information comprises a device login mode A, a login password and a login IP; b, equipment login mode, login password and login IP; and respectively logging in the device A and the device B according to the login information. And detecting whether the link states of the port 3 of the A equipment and the port 5 of the B equipment are in a link up state or not. If not, entering an exception handling process 1; if yes, performing linkdown and linkup operations on the port 3 of the device A, and detecting whether the link state of the port 5 of the device B at the opposite end of the line is synchronously changed; or performing linkdown and linkup operations on the port 5 of the B equipment, detecting whether the link states of the port 3 of the A equipment of the pair segment change synchronously, and entering an exception handling process 2 if the link states change asynchronously; if the synchronization changes, the pair connection is correct, and the pair 1, namely the port 3 of the A device, is < -connected with the port 1- > the port 5 of the B device, is recorded in a 'correctly connected pair list' in a result list.
Preferably, the network to be tested is tested, and not only the correctly connected line pair needs to be obtained, but also the actual connection condition of the incorrectly connected line pair, for example, whether the connection is wrong or not, is judged.
Preferably, the connection relation detecting module 52 determines the actual connection condition of the line pair with the connection error by processing a first exception handling submodule of the exception handling process 1 and a second exception handling submodule of the exception handling process 2.
Preferably, in a preferred implementation manner of the exception handling process 1, the ports corresponding to the two ends of the line pair are not in a linkup state, and if the ports corresponding to the two ends of the line pair are in a linkdown state, the line pair information is recorded in an "unconnected line pair list" in a result list; if the corresponding port at the two ends of the line pair is in a link up state and a link down state, the port in the link up state is indicated to have a corresponding port in the link up state in the network, so that the device in the network to be tested is polled by sequentially performing link down and link up operations on the port in the link up state, the corresponding port which changes synchronously with the port in the link up state is found, and the actual connection relation can be obtained and recorded.
For example, if both the ports a and B devices 3 and 5 are in the linkdown state, the pair is recorded in the "unconnected pair list" in the result list, that is, the ports a and B devices 3 and 5 are not connected. If the port 3 of the device a is in a link up state and the port 5 of the device B is in a link down state, it indicates that the port 3 of the device a has a corresponding port in the link up state in the network to be tested, in order to find out the corresponding port, the port 3 of the device a is sequentially subjected to link down and link up operations, devices in the network to be tested are polled, a corresponding port which changes synchronously with the port 3 of the device a, such as the port 7 of the device B, is found out, and the actual connection relationship is recorded. Preferably, the original pair 1 "port 3 of a device 3 < -connection 1- > port 5 of B device" is recorded in the "pair list of connection errors" in the result list.
Preferably, in a preferred implementation manner of the exception handling process 2, the ports corresponding to the two ends of the line pair both have ports corresponding to a link up state in the network, so that by sequentially performing link down and link up operations on one of the ports corresponding to the two ends of the line pair, polling the device in the network to be tested, finding out the corresponding port that changes synchronously with the port, the actual line connection relationship can be obtained and recorded.
For example, if the link states of the port 3 of the a device and the port 5 of the B device change asynchronously, that is, both the port 3 of the a device and the port 5 of the B device have corresponding ports in a link up state, but the port 3 of the a device and the port 5 of the B device are not actually connected. In order to respectively find out corresponding ports of a port 3 of the device A and a port 5 of the device B, sequentially performing linkdown and linkup operations on the port 3 of the device A, polling devices in a network to be tested, finding out a corresponding port which synchronously changes with the port 3 of the device A, such as a port 7 of the device B, and recording the connection relation; and then, sequentially performing linkdown and linkup operations on the port 5 of the B device, polling the devices in the network to be tested, finding out a corresponding port which synchronously changes with the port 5 of the B device, such as a port 3 of the C device, and recording the actual connection relation.
In a preferred implementation of the signal quality detection module 53, it is used to detect the signal quality of the correctly connected line pair.
Preferably, signal quality data are respectively checked on the equipment of the line pair connecting segment, and whether the signal quality meets the preset engineering requirement is judged; if not, the result recording module 56 is called to record the line pair in a "line pair list with poor signal quality in the result list; if yes, judging whether the polling of the line pair is finished, if not, sequentially executing the steps S12 and S13 on the rest line pairs in the line pair information table, for example, sequentially executing the steps S12 and S13 on the connection 2, the connection 3 and the connection 4 in the line pair information table; if polling is complete, the result recording module 56 is invoked to aggregate the information in the result list.
Preferably, the calling device control and information recording module 55 sends the sequence of command lines for obtaining signal strength to the device registration module 54, masks the command line differences of different devices, and sends the corresponding results back to the signal quality detection module 53. The device log-in module 54 inputs the command line sequence for obtaining signal strength to obtain log information including the signal strength of the port output by the command line, and the signal quality detection module 53 calls the information analysis module 55 to extract the signal strength of the port and returns the result to the signal strength detection module 53.
Preferably, since each line pair is polled, the obtained actual connection relationship between the ports may be duplicated, and therefore the call result recording module 56 is required to summarize the information in the list. Comparing the summary information with the line pair information table read in the planning reading module 51, obtaining line pairs which are not recorded in the line pair information table in the network to be tested, and recording the line pairs in a line pair list which is more than planning.
For example, the actual connection relationship obtained by the exception handling process 1 and the exception handling process 2 is not recorded in the pair information table, and is recorded in the "more planned pair list" in the result list by comparison.
Preferably, the connection relation detecting module 52 and the signal quality detecting module 53 may be the same module.
Preferably, the result recording module 56 normalizes the table records in the result list to provide a uniform reading and querying interface for the outside.
Through the embodiment, the realization is simple, the applicability is strong, the automation is realized, and the network testing efficiency and the reliability of the testing result are obviously improved. Regular inspection and full-coverage detection of the machine room network can be realized, and the effect of continuous quality assurance is achieved.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the terminal and the server described above may refer to corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processor, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Fig. 6 illustrates a block diagram of an exemplary computer system/server 012 suitable for use in implementing embodiments of the invention. The computer system/server 012 shown in fig. 6 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in fig. 6, the computer system/server 012 is embodied as a general purpose computing device. The components of computer system/server 012 may include, but are not limited to: one or more processors or processors 016, a system memory 028, and a bus 018 that couples various system components including the system memory 028 and the processors 016.
Bus 018 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer system/server 012 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server 012 and includes both volatile and nonvolatile media, removable and non-removable media.
System memory 028 can include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)030 and/or cache memory 032. The computer system/server 012 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 034 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be connected to bus 018 via one or more data media interfaces. Memory 028 can include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the present invention.
Program/utility 040 having a set (at least one) of program modules 042 can be stored, for example, in memory 028, such program modules 042 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof might include an implementation of a network environment. Program modules 042 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The computer system/server 012 may also communicate with one or more external devices 014 (e.g., keyboard, pointing device, display 024, etc.), hi the present invention, the computer system/server 012 communicates with an external radar device, and may also communicate with one or more devices that enable a speaker to interact with the computer system/server 012, and/or with any device (e.g., network card, modem, etc.) that enables the computer system/server 012 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 022. Also, the computer system/server 012 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 020. As shown in fig. 6, the network adapter 020 communicates with the other modules of the computer system/server 012 via bus 018. It should be appreciated that although not shown in fig. 6, other hardware and/or software modules may be used in conjunction with the computer system/server 012, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 016 executes programs stored in the system memory 028 to perform the functions and/or methods of the described embodiments of the present invention.
The computer program described above may be provided in a computer storage medium encoded with a computer program that, when executed by one or more computers, causes the one or more computers to perform the method flows and/or apparatus operations shown in the above-described embodiments of the invention.
With the development of time and technology, the meaning of media is more and more extensive, and the propagation path of computer programs is not limited to tangible media any more, and can also be downloaded from a network directly and the like. Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the speaker computer, partly on the speaker computer, as a stand-alone software package, partly on the speaker computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the speaker's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processor, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (14)

1. A network testing method performed by a computer system or a server, the method comprising:
reading design planning data of a network to be tested, wherein the design planning data comprises line pair information and equipment login information;
sequentially logging in the equipment at the two ends of each line pair according to the line pair information and the equipment logging information and adopting a corresponding command line sequence to obtain port link states at the two ends of the line pair;
judging the connection of the line pair based on the port link states at the two ends of the line pair;
detecting the signal quality of the correctly connected line pair;
wherein the judging the connection of the line pair based on the port link states at the two ends of the line pair comprises:
judging whether the ports at the two ends of the line pair are in a link connection state, if so, sequentially carrying out interruption and connection operations on the port at one end of the line pair, and detecting whether the port at the opposite end is synchronously changed;
and if the synchronization changes, determining that the connection of the line pair is correct.
2. The method of claim 1, wherein determining the connection of the pair based on port link states at both ends of the pair further comprises:
if the ports at the two ends of the line pair are not both in the link connection state, entering a first exception handling process
And if the asynchronous change of the opposite terminal port is detected, entering a second exception handling process.
3. The method of claim 2, wherein the first exception handling process comprises:
if the ports at the two ends of the line pair are in a link interruption state, judging that the line pair is not connected;
if the ports at the two ends of the line pair are in the interruption state and the connection state respectively, the ports in the connection state are subjected to interruption and connection operations in sequence, and the corresponding ports which change synchronously in the network are detected.
4. The method of claim 2, wherein the second exception handling process comprises:
and respectively carrying out interruption and connection operations on the ports at the two ends of the line pair in sequence, and detecting the corresponding ports which change synchronously in the network.
5. The method according to claim 3 or 4, characterized in that the method further comprises:
the actual pair connection relationship detected is recorded.
6. The method of claim 5, wherein detecting the signal quality of the correctly connected pair further comprises:
and summarizing the detected actual line pair connection relation.
7. A network test system arranged in a computer system or a server, the system comprising:
the system comprises a planning reading module, a planning reading module and a data processing module, wherein the planning reading module is used for reading design planning data of a network to be tested, and the design planning data comprises line pair information and equipment login information;
the connection relation detection module is used for sequentially logging in the equipment at the two ends of each line pair according to the line pair information and the equipment logging information and adopting a corresponding command line sequence to obtain port link states at the two ends of the line pair; judging the connection of the line pair based on the port link states at the two ends of the line pair;
the signal quality detection module is used for detecting the signal quality of the correctly connected line pair;
the connection relation detection module is specifically used for judging whether the ports at the two ends of the line pair are in a link connection state when judging the connection of the line pair based on the link states of the ports at the two ends of the line pair, if so, the ports at one end of the line pair are subjected to interruption and connection operations in sequence, and whether the ports at the opposite end are synchronously changed is detected; and if the synchronization changes, determining that the connection of the line pair is correct.
8. The system of claim 7, wherein the connection relation detecting module, when determining connection of the line pair based on port link states at two ends of the line pair, is further configured to:
if the ports at the two ends of the line pair are not in the link connection state, entering a first exception handling process;
and if the asynchronous change of the opposite terminal port is detected, entering a second exception handling process.
9. The system of claim 8, wherein the connectivity detection module comprises a first exception handling sub-module configured to:
if the ports at the two ends of the line pair are in a link interruption state, judging that the line pair is not connected;
if the ports at the two ends of the line pair are in the interruption state and the connection state respectively, the ports in the connection state are subjected to interruption and connection operations in sequence, and the corresponding ports which change synchronously in the network are detected.
10. The system according to claim 8, wherein the connection relation detecting module includes a second exception handling sub-module, configured to perform an interrupt operation and a connection operation on ports at two ends of the line pair in sequence, respectively, and detect a corresponding port that changes synchronously in a network.
11. The system according to claim 9 or 10, further comprising a result recording module for recording the detected actual wire pair connection relationship.
12. The system of claim 11, wherein the result logging module is further configured to aggregate the detected actual pair-to-pair connections.
13. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program implements the method of any one of claims 1 to 6.
14. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN201810957700.8A 2018-08-22 2018-08-22 Network testing method and system Active CN109194541B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810957700.8A CN109194541B (en) 2018-08-22 2018-08-22 Network testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810957700.8A CN109194541B (en) 2018-08-22 2018-08-22 Network testing method and system

Publications (2)

Publication Number Publication Date
CN109194541A CN109194541A (en) 2019-01-11
CN109194541B true CN109194541B (en) 2021-04-16

Family

ID=64918875

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810957700.8A Active CN109194541B (en) 2018-08-22 2018-08-22 Network testing method and system

Country Status (1)

Country Link
CN (1) CN109194541B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115941561A (en) * 2022-09-23 2023-04-07 中盈优创资讯科技有限公司 Method and device for automatically testing link quality based on link correspondence

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1531229A (en) * 2003-03-13 2004-09-22 华为技术有限公司 Method for detecting chain circuit cross misconnection
CN101042420A (en) * 2007-04-24 2007-09-26 华为技术有限公司 Method, system and device for line detection
CN101605180A (en) * 2008-06-10 2009-12-16 上海贝尔阿尔卡特股份有限公司 Subscribers feeder is to lookup method and device thereof in a kind of network access system
CN103166774A (en) * 2011-12-09 2013-06-19 中国移动通信集团福建有限公司 Checking method and device of the same route
CN103701665A (en) * 2013-12-27 2014-04-02 华为技术有限公司 Line connection error detecting method and device
CN104518927A (en) * 2014-12-15 2015-04-15 清华大学 Detecting method and device of error connection in data center network

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101424721A (en) * 2008-11-28 2009-05-06 江苏省电力公司南京供电公司 Telemetry link on-line detecting system of scheduling automated system
CN105450442B (en) * 2015-11-06 2019-02-15 广东电网有限责任公司电力科学研究院 A kind of network topology investigation method and its system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1531229A (en) * 2003-03-13 2004-09-22 华为技术有限公司 Method for detecting chain circuit cross misconnection
CN101042420A (en) * 2007-04-24 2007-09-26 华为技术有限公司 Method, system and device for line detection
CN101605180A (en) * 2008-06-10 2009-12-16 上海贝尔阿尔卡特股份有限公司 Subscribers feeder is to lookup method and device thereof in a kind of network access system
CN103166774A (en) * 2011-12-09 2013-06-19 中国移动通信集团福建有限公司 Checking method and device of the same route
CN103701665A (en) * 2013-12-27 2014-04-02 华为技术有限公司 Line connection error detecting method and device
CN104518927A (en) * 2014-12-15 2015-04-15 清华大学 Detecting method and device of error connection in data center network

Also Published As

Publication number Publication date
CN109194541A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
CN108683562B (en) Anomaly detection positioning method and device, computer equipment and storage medium
CN108768730B (en) Method and device for operating intelligent network card
CN110989926B (en) Fault magnetic disc slot positioning method and device and electronic equipment
US20220050765A1 (en) Method for processing logs in a computer system for events identified as abnormal and revealing solutions, electronic device, and cloud server
CN111767241B (en) PCIe fault injection test method, device and storage medium
WO2019227641A1 (en) Application testing method, apparatus, terminal device and medium
US20200191865A1 (en) Batch Testing System And Method Thereof
CN114024884B (en) Test method, test device, electronic equipment and storage medium
CN112527582A (en) Detection method, detection device, detection equipment and storage medium of server cable
CN114064208A (en) Method and device for detecting application service state, electronic equipment and storage medium
CN110865944A (en) Data analysis method and device for test case, storage medium and test equipment
CN109194541B (en) Network testing method and system
CN111190791A (en) Application exception reporting method and device and electronic equipment
CN112527678A (en) Method, apparatus, device and storage medium for testing protocol
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN108255715B (en) Test result processing method and terminal equipment
CN108845932B (en) Unit testing method and device of network library, storage medium and terminal
CN110795338A (en) Automatic testing method and device based on front-end and back-end interaction and electronic equipment
CN115825704B (en) Method, device, system, equipment and medium for testing projection mainboard
CN116382968B (en) Fault detection method and device for external equipment
CN113992491B (en) Application server group operation and maintenance management system, method and device
CN117632727A (en) Abnormality positioning method, device, equipment and storage medium
CN113938377B (en) Private network terminal fault diagnosis method, device and equipment
CN107438259B (en) Method for positioning network management system performance module fault
CN117640357A (en) Processing method and device for network element data acquisition abnormality and related equipment

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