CN110890995A - Network port testing method and network port testing device - Google Patents

Network port testing method and network port testing device Download PDF

Info

Publication number
CN110890995A
CN110890995A CN201910397782.XA CN201910397782A CN110890995A CN 110890995 A CN110890995 A CN 110890995A CN 201910397782 A CN201910397782 A CN 201910397782A CN 110890995 A CN110890995 A CN 110890995A
Authority
CN
China
Prior art keywords
tested
ports
service
port
network port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910397782.XA
Other languages
Chinese (zh)
Other versions
CN110890995B (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.)
Shenzhen Jiuniuyimao Intelligent Internet Of Things Technology Co ltd
Original Assignee
EVOC Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by EVOC Intelligent Technology Co Ltd filed Critical EVOC Intelligent Technology Co Ltd
Priority to CN201910397782.XA priority Critical patent/CN110890995B/en
Publication of CN110890995A publication Critical patent/CN110890995A/en
Application granted granted Critical
Publication of CN110890995B publication Critical patent/CN110890995B/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
    • 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/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/663Transport layer addresses, e.g. aspects of transmission control protocol [TCP] or user datagram protocol [UDP] ports
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

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

Abstract

The invention provides a network port testing method and a network port testing device. The method is applied to a tested end, the tested port of the tested end is connected with the service port of the service end, and the method comprises the following steps: s101: controlling the tested network port to seize the resource lock; s102: when the preemption is successful, configuring a first communication address corresponding to the resource lock for the tested port, wherein the first communication address and the communication address of the service port corresponding to the tested port belong to the same network segment; s103: carrying out communication test between the tested network port and the corresponding service network port to obtain a test result; s104: modifying the first communication address of the tested network port into a second communication address, wherein the second communication address is different from the first communication address of any tested network port; s105: and releasing the resource lock preempted by the tested port and executing S101. The network port testing method and the network port testing device can automatically distribute communication addresses, change a serial mode into a parallel mode, realize that a plurality of network port computers simultaneously carry out the function test of receiving and dispatching packets, and obviously improve the testing efficiency.

Description

Network port testing method and network port testing device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a network interface testing method and a network interface testing apparatus.
Background
The network security application computer has a plurality of physical network ports to physically isolate communications between different networks and is inserted with a software checking function to ensure that communications between different networks conform to security rules. Before the network security application computer is produced and delivered from a factory, the physical network ports need to be subjected to a packet receiving and sending function test so as to ensure that the functions of the physical network ports are normal. The widely adopted test scheme at present is the DHCP and PING technical scheme.
However, the time for allocating IP addresses by using the DHCP protocol is longer than 10 seconds, and each physical network port (hereinafter referred to as "port") must be queued for plug-and-pull line test one by one, because the DHCP protocol can only ensure that one physical network port of the same computer is put into the network communication in the same physical network. Therefore, the n net ports can finish the test in at least 10 × n seconds, and the total time is at least 12 × n seconds plus the starting time of the computer by adding the plugging line and the link waiting time, which seriously affects the test efficiency.
Disclosure of Invention
The network port testing method and the network port testing device provided by the invention can automatically allocate communication addresses, change a serial mode into a parallel mode, realize that a plurality of multi-network-port computers simultaneously carry out the function test of receiving and sending packets, and obviously improve the testing efficiency.
In a first aspect, the present invention provides a method for testing an internet access, where the method is applied to a tested end, and a tested internet access of the tested end is connected to a service internet access of a service end, and the method includes:
step S101: controlling the tested network port to seize the resource lock;
step S102: when the preemption is successful, configuring a first communication address corresponding to the resource lock for the tested network port, wherein the first communication address and the communication address of the service network port corresponding to the tested network port belong to the same network segment;
step S103: carrying out communication test between the tested network port and the corresponding service network port to obtain a test result;
step S104: modifying the first communication address of the tested network port into a second communication address, wherein the second communication address is different from the first communication address of any tested network port;
step S105: and releasing the resource lock preempted by the tested port, and executing the step S101.
Optionally, when the number of the service ports is smaller than the number of the tested ports, the tested ports are connected with the service ports through the switch.
Optionally, when the number of the service network ports is greater than or equal to the number of the network ports to be tested, the service network ports are connected with the network ports to be tested in a one-to-one correspondence manner;
and when the number of the service network ports is smaller than that of the network ports to be tested, the service network ports are correspondingly connected with part of the network ports to be tested one by one.
Optionally, when the number of the service ports is smaller than the number of the tested ports, the service end has virtual ports with the same number as the number of the tested ports, and the virtual ports are connected with the tested ports in a one-to-one correspondence manner through the service ports and the switches.
Optionally, the performing a communication test between the tested network port and the corresponding service network port to obtain a test result includes:
sending a data packet to a corresponding service network port through the tested network port;
and when receiving the data packet returned by the corresponding service network port within the preset time, the tested network port is tested normally, otherwise, the tested network port is tested abnormally.
In a second aspect, the present invention provides an apparatus for testing a network port, where the apparatus is applied to a tested end, and a tested network port of the tested end is connected to a service network port of a service end, and the apparatus includes:
the first resource lock preemption module is configured to control the tested network port to preempt the resource lock;
the address configuration module is configured to configure a first communication address corresponding to the resource lock for the tested port when the preemption is successful, wherein the first communication address and a communication address of a service port corresponding to the tested port belong to the same network segment;
the communication test module is configured to perform communication test between the tested network port and the corresponding service network port to obtain a test result;
the address modification module is configured to modify the first communication address of the tested network port into a second communication address, and the second communication address is different from the first communication address of any tested network port;
the resource lock releasing module is configured to release the resource lock occupied by the tested interface;
and the second resource lock preemption module is configured to control the tested interface to preempt the resource lock.
Optionally, when the number of the service ports is smaller than the number of the tested ports, the tested ports are connected with the service ports through the switch.
Optionally, when the number of the service network ports is greater than or equal to the number of the network ports to be tested, the service network ports are connected with the network ports to be tested in a one-to-one correspondence manner;
and when the number of the service network ports is smaller than that of the network ports to be tested, the service network ports are correspondingly connected with part of the network ports to be tested one by one.
Optionally, when the number of the service ports is smaller than the number of the tested ports, the service end has virtual ports with the same number as the number of the tested ports, and the virtual ports are connected with the tested ports in a one-to-one correspondence manner through the service ports and the switches.
Optionally, the communication test module includes:
the data packet sending submodule is configured to send a data packet to a corresponding service network port through the tested network port;
and the result determination submodule is configured to test the tested network port normally when receiving the data packet returned by the corresponding service network port within the preset time, and otherwise, test the tested network port abnormally.
The network port testing method and the network port testing device provided by the embodiment of the invention enable the tested network port to be automatically allocated to the communication address corresponding to the service network port by a mode that the tested network port seizes the resource lock at the same time, thereby realizing the function test of simultaneously receiving and sending packets by a plurality of multi-network-port computers and further obviously improving the testing efficiency.
Drawings
Fig. 1 is a schematic flow chart of a network port testing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a connection relationship between a tested terminal and a server terminal according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a network port testing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a connection relationship between a tested terminal and a server terminal according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a method for testing an Internet access according to an embodiment of the present application;
FIG. 6 is a diagram illustrating a connection relationship between a tested terminal and a server terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a network port testing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the 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 invention.
First, the noun terms to which the present invention relates are explained.
DHCP: the Dynamic Host Configuration Protocol (DHCP) is a network Protocol of a local area network, works using the UDP Protocol, and has two main uses: for intranet or network service providers to automatically assign IP addresses; the user is given an intranet administrator as a means to centrally manage all computers.
PING: PING is a command under the Windows, Unix, and Linux operating systems. PING also belongs to a communication protocol and is part of the TCP/IP protocol. PING sends an icmp (internet Control message protocol), i.e. internet message Control protocol; an echo request message is sent to the destination and reports whether the desired ICMP echo reply is received. The command is used for checking whether the network is unobstructed or the network connection speed, and can well help us to analyze and judge network faults
And (3) resource locking: when a plurality of threads or processes call a global variable resource simultaneously and modify the global variable resource in the running of computer software, the method of locking can be adopted to solve the problem of resource competition, and the lock is a resource lock.
UDP Port service program: and the computer service program occupies the UDP communication port and works on the basis of the UDP communication protocol.
UDP: UDP is a connectionless transport layer protocol in the OSI reference model, which is mainly used in transport that does not require the arrival of packets in sequence, the inspection and ordering of the packet transmission sequence being done by the application layer, providing a transaction-oriented simple unreliable messaging service. The UDP protocol is basically an interface of the IP protocol with the upper layer protocol. The applicable ports of the UDP protocol respectively run a plurality of application programs on the same equipment. UDP provides connectionless communication, does not guarantee the reliability of transmitted packets, is suitable for transmitting a small amount of data at a time, and the reliability of UDP transmission is responsible for an application layer.
Time Division Multiplexing (TDM), which transmits different signals in different Time periods of the same physical connection, can achieve the purpose of multiplex transmission. The method is applied to transmitting multiplex data by one line in the network.
In a first aspect, the present invention provides an internet access testing method, and referring to fig. 1, fig. 1 shows a schematic flowchart of an internet access testing method according to an embodiment of the present application, where the method is applied to a tested terminal, and a tested internet access of the tested terminal is connected to a service internet access of a service terminal, and the method includes:
step S101: and controlling the tested network port to seize the resource lock.
When the tested network port is connected with the service network port through the network cable, the corresponding tested network port can start to seize the resource lock by opening the thread corresponding to the tested network port; and simultaneously starting a plurality of threads, so that a plurality of tested ports can simultaneously seize the resource lock, thereby improving the efficiency of the tested ports in seizing the resource lock.
Step S102: and when the preemption is successful, configuring a first communication address corresponding to the resource lock for the tested network port, wherein the first communication address and the communication address of the service network port corresponding to the tested network port belong to the same network segment.
The first communication address is configured to the tested network port which successfully seizes the resource lock, so that the tested network port can be ensured to be orderly in communication connection with the service network port when the number of the tested network ports is larger than that of the service network ports.
Step S103: and carrying out communication test between the tested network port and the corresponding service network port to obtain a test result.
In an embodiment of the present application, step S103 specifically includes: sending a data packet to a corresponding service network port through the tested network port; and when receiving the data packet returned by the corresponding service network port within the preset time, the tested network port is tested normally, otherwise, the tested network port is tested abnormally.
Step S104: and modifying the first communication address of the tested network port into a second communication address, wherein the second communication address is different from the first communication address of any tested network port.
Step S105: and releasing the resource lock preempted by the tested port, and executing the step S101.
Wherein the first communication address, the communication address, and the second communication address are all IP addresses.
And after the first communication address of the tested network port is modified into a second communication address different from any first communication address, the phenomenon that a plurality of tested network ports use the same first communication address to generate conflict is avoided when the tested network port releases the preempted resource lock and other tested network ports continue to preempt the resource lock. And after the tested port releases the preempted resource lock, continuously executing the step S101 to enable the tested port after releasing the resource lock to repeatedly perform the communication test, so that the tested port is in a dynamic communication test environment to prevent a test error caused by other external reasons.
For example, the tested network port is abnormally tested due to incorrect network cable connection, and the communication test can be continuously carried out on the tested network port by adjusting the network cable connection mode, so that the test time is saved, and the accuracy of the test result is improved.
The network port testing method enables the tested network port to be automatically allocated to the communication address corresponding to the service network port in a mode that the tested network port seizes the resource lock at the same time, thereby realizing the function test of receiving and sending packets by a plurality of multi-network-port computers at the same time and further obviously improving the testing efficiency.
In a second aspect, the present invention provides a method for testing an internet access, where the method is applied to a terminal to be tested. And when the number of the service network ports is smaller than that of the network ports to be tested, the network ports to be tested are connected with the service network ports through the switch. Referring to fig. 2 and fig. 3, fig. 2 shows a schematic diagram of a connection relationship between a tested terminal and a service terminal according to an embodiment of the present application, and fig. 3 shows a schematic flowchart of a portal testing method according to an embodiment of the present application. The method comprises the following steps:
step S301: and starting threads of all the tested network ports.
Step S302: each thread is given an initial value i, and i is 0.
Step S303: and each thread controls the corresponding tested port to seize the resource lock corresponding to the IP [ i ].
Step S304: judging whether the tested network port successfully seizes the resource lock corresponding to the IP [ i ]; if yes, go to step S305; if not, go to step S309.
Step S305: and configuring a first communication address corresponding to the resource lock for a tested port which successfully preempts the resource lock, wherein the first communication address and a communication address of a service port corresponding to the tested port belong to the same network segment.
Step S306: and carrying out communication test between the tested network port and the corresponding service network port to obtain a test result.
Step S307: and modifying the first communication address of the tested network port into a second communication address, wherein the second communication address is different from the first communication address of any tested network port.
Step S308: and releasing the resource lock occupied by the tested port.
Step S309: i ═ i + 1.
Step S310: judging whether i is larger than imaxWherein imaxThe value of (a) is the same as the number of resource locks; if yes, go to step S311; if not, go to step S303.
Step S311: i is 0, and step S303 is performed.
After the thread is opened, each tested network port circularly tries to acquire the resource lock of the IP [ i ], if the resource lock is successfully acquired, other IP addresses (192.168.0.9) of the same IP network segment with the tested network port are configured, the tested network port which successfully acquires the resource lock transmits a UDP data packet to the corresponding service network port, the service end enables the corresponding tested network port to immediately receive the packet through a UDP port service program, if the data packet returned by the service network port is received within the specified time (generally less than 10 milliseconds), the communication is successful, the function of the receiving and sending packet of the tested network port is normal, otherwise, the function of the receiving and sending packet of the tested network port is abnormal. Whether the IP address is normal or not is reported and the resource lock is released, the IP address of the tested internet access is set as the non-working IP address (such as 1.2.3.9) of other IP network segments, so that the IP address (such as 192.168.0.9) is released to be used by the next internet access, and the phenomenon that two internet accesses use the same IP address to generate conflict is avoided.
In the embodiment, a time-division multiplexing parallel mode is adopted, n network ports circularly compete for the resource lock, and the successfully preempted network port to be tested is communicated with the service network port. Under the condition that all the resource locks are preempted, other network ports to be tested which do not preempt the resource locks wait for the communication test of the network ports to be tested which are successfully preempted to release the resource locks, and the resource locks are preempted by circulating try to carry out the communication test; and under the condition that the remaining resource locks are not preempted, the tested port which is not successfully preempted continuously preempts the remaining resource locks which are not preempted.
Practice proves that when the resource lock is one, the communication test time is set to be 10ms, the total time for testing the network ports once is n x 10ms, and therefore the network port transceiving packet function test of a computer with n tested network ports is completed within n x 10ms, and the network port transceiving packet function test of the computer is obviously improved.
In a third aspect, the present invention provides a method for testing an internet access, where the method is applied to a tested terminal. And when the number of the service network ports is larger than or equal to that of the network ports to be tested, the service network ports are correspondingly connected with the network ports to be tested one by one. With reference to fig. 4 and fig. 5, fig. 4 shows a schematic diagram of a connection relationship between a tested terminal and a service terminal according to an embodiment of the present application, and fig. 5 shows a schematic flowchart of a portal testing method according to an embodiment of the present application.
Step S501: and starting threads of all the tested network ports.
Step S502: each thread is given an initial value i, and i is 0.
Step S503: and each thread controls the corresponding tested port to independently seize a resource lock corresponding to the IP [ i ].
Step S504: judging whether the tested network port successfully seizes the resource lock corresponding to the IP [ i ]; if yes, go to step S505; if not, go to step S507.
Step S505: and configuring a first communication address corresponding to the resource lock for a tested port which successfully preempts the resource lock, wherein the first communication address and a communication address of a service port corresponding to the tested port belong to the same network segment.
Step S506: and carrying out communication test between the tested network port and the corresponding service network port to obtain a test result.
Step S507: i ═ i + 1.
Step S508: judging whether i is larger than imaxWherein imaxThe value of (a) is the same as the number of resource locks; if yes, go to step S509; if not, go to step S503.
Step S509: i is 0, and step S503 is performed.
In this embodiment, different fixed IP addresses are set for each network port of the server, all the network ports to be tested of the tested end can simultaneously open threads and seize resource locks of the IP [ i ] respectively, so as to ensure that all the network ports to be tested can correspond to the network ports on the server one to one, and after the communication is successful, the communication test is continued and the result is reported without modifying the first communication address and releasing the resource locks. The test of all the tested network ports is carried out in parallel, namely, the test of all the network ports can be completed within 10 milliseconds.
In a fourth aspect, the present invention provides a network port testing method, which is applied to a tested end. And when the number of the service network ports is smaller than that of the network ports to be tested, the service network ports are correspondingly connected with part of the network ports to be tested one by one.
At this time, the service end and the tested end may also be directly connected by a network cable without a switching network, and the method for performing the communication test through the tested network port directly connected to the service network port by the network cable is referred to the method provided in the second aspect, and is not described herein again. The embodiment can save the physical resources of the switching network. However, the function tests of all the tested ports need to be completed by inserting and pulling lines for many times manually, and the test time is correspondingly increased.
In a fifth aspect, the present invention provides a method for testing an internet access, where the method is applied to a terminal to be tested. Referring to fig. 6, fig. 6 is a schematic diagram illustrating a connection relationship between a tested terminal and a service terminal according to an embodiment of the present application.
When the number of the service network ports is smaller than that of the network ports to be tested, the service end is provided with virtual network ports with the same number as that of the network ports to be tested, and the virtual network ports are connected with the network ports to be tested in a one-to-one correspondence mode through the service ports and the switches.
The service portal may also be a virtual portal. Assuming that only one physical network port is arranged on the server, n virtual network ports can be set through software, and all the virtual network ports share one physical network port. The specific method is that 1 named 'eth 0: 1' virtual internet access 1 is added when an 'ifconfig eth0:1 Ipadress' command is operated, the virtual internet access 1 and the 'eth 0' share one physical internet access, and the 'eth 0: 2', the 'eth 0: 3' … … and the like can also be added by the same method. For a specific method for performing a communication test on a network port to be tested, reference is made to the method provided in the third aspect, which is not described herein again. In this embodiment, the switch can ensure that the tests of all the network ports are performed in parallel, thereby saving the physical resources of the server and greatly improving the test efficiency.
In a sixth aspect, the present invention provides a device for testing a portal, and referring to fig. 7, fig. 7 shows a schematic structural diagram of the device according to an embodiment of the present application. The device is applied to a tested end, a tested network port of the tested end is connected with a service network port of a service end, and the device comprises:
a resource lock preemption module 701 configured to control a tested network port to preempt a resource lock;
an address configuration module 702, configured to configure, when preemption succeeds, a first communication address corresponding to the resource lock for the network port under test, where the first communication address and a communication address of a service network port corresponding to the network port under test belong to the same network segment;
a communication test module 703 configured to perform a communication test between the tested network port and the corresponding service network port to obtain a test result;
an address modification module 704, configured to modify the first communication address of the tested network port to a second communication address, where the second communication address is different from the first communication address of any tested network port;
a resource lock releasing module 705 configured to release the resource lock preempted by the tested port.
Optionally, when the number of the service ports is smaller than the number of the tested ports, the tested ports are connected with the service ports through the switch.
Optionally, when the number of the service network ports is greater than or equal to the number of the network ports to be tested, the service network ports are connected with the network ports to be tested in a one-to-one correspondence manner;
and when the number of the service network ports is smaller than that of the network ports to be tested, the service network ports are correspondingly connected with part of the network ports to be tested one by one.
Optionally, when the number of the service ports is smaller than the number of the tested ports, the service end has virtual ports with the same number as the number of the tested ports, and the virtual ports are connected with the tested ports in a one-to-one correspondence manner through the service ports and the switches.
Optionally, the communication test module 703 includes:
the data packet sending submodule is configured to send a data packet to a corresponding service network port through the tested network port;
and the result determination submodule is configured to test the tested network port normally when receiving the data packet returned by the corresponding service network port within the preset time, and otherwise, test the tested network port abnormally.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A network port testing method is applied to a tested end, wherein the tested network port of the tested end is connected with a service network port of a service end, and the method comprises the following steps:
step S101: controlling the tested network port to seize the resource lock;
step S102: when the preemption is successful, configuring a first communication address corresponding to the resource lock for the tested network port, wherein the first communication address and the communication address of the service network port corresponding to the tested network port belong to the same network segment;
step S103: carrying out communication test between the tested network port and the corresponding service network port to obtain a test result;
step S104: modifying the first communication address of the tested network port into a second communication address, wherein the second communication address is different from the first communication address of any tested network port;
step S105: and releasing the resource lock preempted by the tested port, and executing the step S101.
2. The method of claim 1, wherein the tested port is connected to the service port through the switch when the number of service ports is less than the number of tested ports.
3. The method according to claim 1, wherein when the number of the service ports is greater than or equal to the number of the tested ports, the service ports are connected with the tested ports in a one-to-one correspondence manner;
and when the number of the service network ports is smaller than that of the network ports to be tested, the service network ports are correspondingly connected with part of the network ports to be tested one by one.
4. The method according to claim 1, wherein when the number of the service ports is smaller than the number of the tested ports, the service end has the same number of virtual ports as the number of the tested ports, and the virtual ports are connected with the tested ports in a one-to-one correspondence manner through the service ports and the switches.
5. The method according to any one of claims 1 to 4, wherein the performing a communication test between the tested port and the corresponding service port to obtain a test result comprises:
sending a data packet to a corresponding service network port through the tested network port;
and when receiving the data packet returned by the corresponding service network port within the preset time, the tested network port is tested normally, otherwise, the tested network port is tested abnormally.
6. An internet access testing device, which is applied to a tested end, wherein the tested internet access of the tested end is connected with a service internet access of a service end, and the device comprises:
the resource lock preemption module is configured to control the tested network port to preempt the resource lock;
the address configuration module is configured to configure a first communication address corresponding to the resource lock for the tested port when the preemption is successful, wherein the first communication address and a communication address of a service port corresponding to the tested port belong to the same network segment;
the communication test module is configured to perform communication test between the tested network port and the corresponding service network port to obtain a test result;
the address modification module is configured to modify the first communication address of the tested network port into a second communication address, and the second communication address is different from the first communication address of any tested network port;
and the resource lock releasing module is configured to release the resource lock preempted by the tested interface.
7. The apparatus of claim 6, wherein the tested port is connected to the service port through the switch when the number of service ports is less than the number of tested ports.
8. The device of claim 6, wherein when the number of the service ports is greater than or equal to the number of the tested ports, the service ports are connected with the tested ports in a one-to-one correspondence;
and when the number of the service network ports is smaller than that of the network ports to be tested, the service network ports are correspondingly connected with part of the network ports to be tested one by one.
9. The apparatus according to claim 6, wherein when the number of the service ports is smaller than the number of the tested ports, the service end has the same number of virtual ports as the number of the tested ports, and the virtual ports are connected with the tested ports in a one-to-one correspondence manner through the service ports and the switches.
10. The apparatus of any of claims 6 to 10, wherein the communication test module comprises:
the data packet sending submodule is configured to send a data packet to a corresponding service network port through the tested network port;
and the result determination submodule is configured to test the tested network port normally when receiving the data packet returned by the corresponding service network port within the preset time, and otherwise, test the tested network port abnormally.
CN201910397782.XA 2019-05-14 2019-05-14 Network port testing method and network port testing device Active CN110890995B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910397782.XA CN110890995B (en) 2019-05-14 2019-05-14 Network port testing method and network port testing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910397782.XA CN110890995B (en) 2019-05-14 2019-05-14 Network port testing method and network port testing device

Publications (2)

Publication Number Publication Date
CN110890995A true CN110890995A (en) 2020-03-17
CN110890995B CN110890995B (en) 2021-08-13

Family

ID=69745795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910397782.XA Active CN110890995B (en) 2019-05-14 2019-05-14 Network port testing method and network port testing device

Country Status (1)

Country Link
CN (1) CN110890995B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111934945A (en) * 2020-07-10 2020-11-13 浪潮电子信息产业股份有限公司 Method and system for testing plugging and unplugging of BMC sharelink network port
CN112019400A (en) * 2020-07-31 2020-12-01 惠州高盛达科技有限公司 Radio frequency test method and system based on wireless communication tester
CN112565746A (en) * 2020-12-30 2021-03-26 杭州视洞科技有限公司 Automatic pressure test method and process for detecting IP address of wired network port of camera

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0606595A1 (en) * 1993-01-11 1994-07-20 Forte Networks Inc. Token ring local are network testing apparatus inserted in an active "T" configuration
CN1609819A (en) * 2003-10-24 2005-04-27 英业达股份有限公司 Test method for computer external equipment interface
CN1625271A (en) * 2003-12-01 2005-06-08 中兴通讯股份有限公司 One board testing device of digital user wire equipment
CN101145993A (en) * 2007-10-11 2008-03-19 中兴通讯股份有限公司 A multi-point access interface test method and its test system
CN101183315A (en) * 2007-12-10 2008-05-21 华中科技大学 Paralleling multi-processor virtual machine system
WO2011003201A1 (en) * 2009-07-10 2011-01-13 Certicom Corp. System and method for performing serialization of devices
US20120236727A1 (en) * 2011-03-15 2012-09-20 Askey Computer Corp. Network interface test device
CN103701664A (en) * 2013-12-25 2014-04-02 北京航天测控技术有限公司 Method for testing runtime of equipment and testing server
US8842125B2 (en) * 2011-10-26 2014-09-23 Google Inc. Automatically testing compatibility between a graphics card and a graphics program
CN105357076A (en) * 2015-11-20 2016-02-24 中国建设银行股份有限公司 Method and device used for detecting network connectivity between nodes
CN105376108A (en) * 2015-10-10 2016-03-02 普联技术有限公司 Parallel testing system and testing method
CN107204895A (en) * 2017-05-19 2017-09-26 上海斐讯数据通信技术有限公司 A kind of method of testing and system of DUT port collisions disposal ability
CN109039450A (en) * 2018-08-24 2018-12-18 武汉恒泰通技术有限公司 A kind of multi tate device for detecting code error and its detection method

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0606595A1 (en) * 1993-01-11 1994-07-20 Forte Networks Inc. Token ring local are network testing apparatus inserted in an active "T" configuration
CN1609819A (en) * 2003-10-24 2005-04-27 英业达股份有限公司 Test method for computer external equipment interface
CN1625271A (en) * 2003-12-01 2005-06-08 中兴通讯股份有限公司 One board testing device of digital user wire equipment
CN101145993A (en) * 2007-10-11 2008-03-19 中兴通讯股份有限公司 A multi-point access interface test method and its test system
CN101183315A (en) * 2007-12-10 2008-05-21 华中科技大学 Paralleling multi-processor virtual machine system
WO2011003201A1 (en) * 2009-07-10 2011-01-13 Certicom Corp. System and method for performing serialization of devices
US20120236727A1 (en) * 2011-03-15 2012-09-20 Askey Computer Corp. Network interface test device
US8842125B2 (en) * 2011-10-26 2014-09-23 Google Inc. Automatically testing compatibility between a graphics card and a graphics program
CN103701664A (en) * 2013-12-25 2014-04-02 北京航天测控技术有限公司 Method for testing runtime of equipment and testing server
CN105376108A (en) * 2015-10-10 2016-03-02 普联技术有限公司 Parallel testing system and testing method
CN105357076A (en) * 2015-11-20 2016-02-24 中国建设银行股份有限公司 Method and device used for detecting network connectivity between nodes
CN107204895A (en) * 2017-05-19 2017-09-26 上海斐讯数据通信技术有限公司 A kind of method of testing and system of DUT port collisions disposal ability
CN109039450A (en) * 2018-08-24 2018-12-18 武汉恒泰通技术有限公司 A kind of multi tate device for detecting code error and its detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈家栋,李祥梅: ""基于云进化算法的3D NoC测试端口优化选择"", 《电子科技》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111934945A (en) * 2020-07-10 2020-11-13 浪潮电子信息产业股份有限公司 Method and system for testing plugging and unplugging of BMC sharelink network port
CN112019400A (en) * 2020-07-31 2020-12-01 惠州高盛达科技有限公司 Radio frequency test method and system based on wireless communication tester
CN112565746A (en) * 2020-12-30 2021-03-26 杭州视洞科技有限公司 Automatic pressure test method and process for detecting IP address of wired network port of camera

Also Published As

Publication number Publication date
CN110890995B (en) 2021-08-13

Similar Documents

Publication Publication Date Title
CN110890995B (en) Network port testing method and network port testing device
US7177952B1 (en) Method and system for switching between two network access technologies without interrupting active network applications
CN109743370B (en) SD-WAN-based hybrid cloud connection method and system
KR100932585B1 (en) Method, device and system for sending messages
EP1482712A1 (en) Virtual network addresses
CN102916857B (en) Stacking and splitting quick detection method and device
JPH08249263A (en) Method and apparatus for constitution of fabric at inside of fiber channel system
CN108282385B (en) Port test method and communication equipment
CN109787864A (en) A kind of network automatic test approach, device, terminal and storage medium based on Netperf
US5854823A (en) System and method for providing resources to test platforms
JP2011015095A (en) Communication apparatus, address setting method, and address setting program
JP2001206654A (en) Local apparatus network for elevator and their transmission control method
US11522762B2 (en) Coordination device and method for providing control applications via a communication network for transmitting time-critical data
EP3989506A1 (en) Server communication method, broadband access server, and system
Cisco Configuring Interfaces
Cisco Configuring Interfaces
Cisco Configuring Interfaces
Cisco Configuring Interfaces
Cisco Configuring Interfaces
Cisco Configuring Interfaces
Cisco Configuring Interfaces
Cisco Configuring X.25
CN106992878B (en) Multicast detection method and device
CN110620725A (en) Method for expanding out-of-band interface of switching equipment and switching equipment
US20230029130A1 (en) Determination of a sequence of bus nodes in a multi-drop communication bus

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230616

Address after: B2, Floor 20, Yanxiang Science and Technology Building, No. 31, Gaoxin Middle Fourth Road, Maling Community, Yuehai Street, Nanshan District, Shenzhen, Guangdong 518057

Patentee after: Shenzhen Jiuniuyimao Intelligent Internet of Things Technology Co.,Ltd.

Address before: No.1, Yanxiang Zhigu chuangxiangdi, No.11, Gaoxin Road, Guangming New District, Shenzhen, Guangdong 518107

Patentee before: EVOC INTELLIGENT TECHNOLOGY Co.,Ltd.