Method and system for testing wireless transmission rate of router
Technical Field
The invention relates to the technical field of routers, in particular to a method and a system for testing the wireless transmission rate of a router.
Background
With the development of the times, the internet has deeply merged into our lives, and various devices provide networking services. A router is a network-connected device widely used in our work and life.
The performance test of the router usually needs to test whether each performance index of the product is qualified, wherein the test of the transmission rate is particularly important.
Since many routers now support 5G WiFi, which has a high transmission rate, the conventional method for testing the transmission rate of the router may have problems.
Sometimes, due to the limited number of LAN interfaces designed in the current technology, it often happens that the theoretical maximum transmission rate of the LAN interface is still much less than the 5G WiFi maximum connection rate. Taking a dual-frequency hundred million household router with 4 LAN interfaces as an example, the 4 LAN interfaces of the router are respectively connected with 4 network cables of a computer provided with 4 wired network cards, the other computer is connected with 5G WiFi of the router, and the transmission rate of the router is tested between the two computers. On one hand, the rate theory of 5G WiFi can reach 867Mbps, on the other hand, the measured rate is much smaller than the theoretical rate of 5G WiFi due to the rate limitation of 4 LAN interfaces. Resulting in measured data that does not correspond to actual performance.
For example, patent publication No. CN105357709A discloses a method, system, and router for testing throughput of wireless router; the method for testing the throughput of the wireless router comprises the following steps: binding a first port of a wireless router with one or more of the other ports; enabling the first port to be in wired connection with a first terminal; enabling a second terminal to communicate with the router wirelessly; and running a preset test program at the first terminal, enabling the first terminal and the second terminal to carry out wireless communication, and judging the throughput of the wireless router according to the wireless communication condition of the first terminal and the second terminal. Sometimes, due to the insufficient number of LAN interfaces of the router, the transmission rate is limited during testing, which results in inaccurate throughput testing results.
The problem of testing the transmission rate of the router in the prior art is mainly that the sum of the connection rates of the LAN interfaces is not matched with the connection rate of the 5G WiFi, so that the tested connection rate is not accurate. Especially, the transmission rate of the current 5G WiFi is very high, and other ports are difficult to match in speed, so that the test result is easy to be inaccurate.
Disclosure of Invention
The technical problem to be solved by the invention is that the wireless transmission rate of the router cannot be accurately tested due to the limitation of the number of LAN interfaces.
The invention solves the technical problem and provides a method and a system for testing the wireless transmission rate of a router.
The method for testing the wireless transmission rate of the router comprises the following steps:
providing a first terminal to establish wireless connection with the router through a first frequency wireless network; providing a second terminal to establish wired connection with the router through all LAN ports;
acquiring a first transmission rate between a first terminal and a second terminal;
when the first transmission rate cannot reach the preset maximum transmission rate of the first frequency wireless network connection, providing a third terminal to establish wireless connection with the router through a second frequency wireless network;
simultaneously acquiring a first transmission rate between the first terminal and the second terminal and a second transmission rate between the first terminal and the third terminal;
and superposing the first transmission rate and the second transmission rate to acquire the transmission rate of the current first frequency wireless network.
Further, after providing the first terminal to establish a wireless connection with the router through the first frequency wireless network, the method further includes:
whether a first terminal and a router can normally communicate is judged by sending a ping packet to the router from the first terminal.
Further, after the second terminal is provided to establish wired connection with the router through all LAN ports, the method further includes:
and judging whether the second terminal and the router can normally communicate or not by sending a ping packet to the router from the second terminal.
Further, the method further comprises:
all test data is stored for analysis by the tester.
Wherein the router comprises a plurality of LAN ports and two wireless networks of different frequencies.
In another aspect, the present invention further provides a system for testing a wireless transmission rate of a router, where the system includes:
the first connection establishing module is used for establishing wireless connection between the first terminal and the router through a first frequency wireless network;
the second connection establishing module is used for establishing wired connection between the second terminal and the router through all LAN ports;
a first transmission rate obtaining module, configured to obtain a first transmission rate between a first terminal and a second terminal;
the third connection establishing module is used for providing a third terminal to establish wireless connection with the router through a second frequency wireless network when the first transmission rate cannot reach the preset maximum transmission rate of the first frequency wireless network connection;
a second transmission rate obtaining module, configured to obtain a first transmission rate between the first terminal and the second terminal and a second transmission rate between the first terminal and the third terminal at the same time;
and the third transmission rate acquisition module is used for superposing the first transmission rate and the second transmission rate to acquire the transmission rate of the current first frequency wireless network.
Further, the system further comprises:
the first judging module is used for judging whether the first terminal and the router can normally communicate by sending a ping packet to the router from the first terminal.
Further, the system further comprises:
and the second judging module is used for judging whether the second terminal and the router can normally communicate by sending a ping packet to the router from the second terminal.
Further, the system further comprises:
and the data storage module is used for storing all the test data so as to be convenient for a tester to analyze.
Further, the first frequency wireless network is a 5G WiFi network, and the second frequency wireless network is a 2.4G WiFi network.
Wherein the router comprises a plurality of LAN ports and two wireless networks of different frequencies.
The transmission rate tested in the present invention refers to the maximum transmission rate.
5G WiFi refers to the fifth generation Wi-Fi transmission technology and operates in the 5Ghz radio band
When the method provided by the invention is used for testing the maximum transmission rate of the router, when the number of the LAN interfaces of the router is not enough to meet the maximum transmission rate of 5G WiFi, the extra wireless connection is added to serve as a new LAN interface, namely, the additionally added transmission rate of the wireless connection is superposed with the connection rate of the original LAN interface, so that the maximum transmission rate test result is improved and is closer to the real maximum transmission rate level.
Drawings
Fig. 1 is a flowchart of a method for testing a wireless transmission rate of a router according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for testing a wireless transmission rate of a router according to a second embodiment of the present invention;
fig. 3 is a block diagram of a system for testing a wireless transmission rate of a router according to a third embodiment of the present invention;
Detailed Description
The following are specific embodiments of the present invention and are further described with reference to the drawings, but the present invention is not limited to these embodiments.
It should also be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention.
The invention comprises a first terminal, a second terminal, a third terminal and a router.
In the present invention, the first frequency wireless network is a 5G WiFi network, and the second frequency wireless network is a 2.4G WiFi network.
And the first terminal establishes 5G WiFi connection with the router.
And the second terminal establishes wired connection with the router.
And the third terminal establishes 2.4G WiFi connection with the router.
The 5G WiFi refers to a fifth generation WiFi transmission technology and operates in a 5Ghz radio wave band.
The 2.4G WiFi is a traditional WiFi connection and supports a 2.4Ghz frequency band.
The router supports both 2.4G WiFi and 5G WiFi.
In order to ensure the accuracy of the test result and reduce the interference of wireless signals, the test device can be arranged in an electromagnetic shielding space.
Example one
The present embodiment provides a method for testing a wireless transmission rate of a router, a flowchart of which is shown in fig. 1 and detailed as follows:
wherein the router comprises a plurality of LAN ports and two wireless networks of different frequencies.
And step S101, establishing wireless connection between the first terminal and the router through a first frequency wireless network.
Optionally, the first frequency wireless network is a 5G WiFi network, and the following description takes 5G WiFi as an example.
The router sets 5G WiFi connection, and the first terminal is connected to the router after searching for a 5G WiFi signal of the router.
Optionally, the Service Set Identification (SSID) of the router is tagged with a keyword of 5G for the first terminal to recognize.
And step S102, providing that the second terminal establishes wired connection with the router through all the LAN ports.
Specifically, the second terminal establishes wired connections with all LAN interfaces of the router.
For example, if the router includes 4 LAN interfaces, the second terminal should also set 4 wired network cards, and the 4 wired network cards are respectively connected to the 4 LAN interfaces of the router.
The first terminal is connected with the second terminal through the router. The first terminal is connected with the router through 5G WiFi, the second terminal is connected through a wire, and the transmission rate of the 5G WiFi is high; if the speed of the wired connection cannot be kept up with, the transmission rate of the tested router is small. This situation is often caused by an insufficient number of LAN interfaces.
Step S103, a first transmission rate between the first terminal and the second terminal is obtained.
Optionally, a test program is run on the first terminal to test a first transmission rate between the first terminal and the second terminal.
Optionally, a first transmission rate between the first terminal and the second terminal is tested by invoking a Chariot program test.
What needs to be tested by the test is the maximum transmission rate of the router's 5G WiFi, i.e. the first connection rate between the first terminal and the router.
In this step, the wired connection between the second terminal and the router may not reach the connection rate of 5G WiFi, resulting in the first transmission rate being much lower than the connection rate of 5G WiFi, and thus resulting in an inaccurate test result.
And step S104, when the first transmission rate cannot reach the preset maximum transmission rate of the first frequency wireless network connection, providing a third terminal to establish wireless connection with the router through a second frequency wireless network.
The second frequency wireless network is a 2.4G WiFi network.
Specifically, when the first transmission rate cannot reach the preset maximum transmission rate of the 5G WiFi connection, the third terminal establishes a 2.4G WiFi connection with the router.
Further, the preset maximum transmission rate is determined according to the maximum transmission rate of the first frequency wireless network connection and actual test requirements, and when the first transmission rate cannot reach the preset maximum transmission rate of the first frequency wireless network connection, it may be determined that the first transmission rate is limited by the wired connection between the second terminal and the router, so that the test result of the first transmission rate is smaller.
The router sets the 2.4G WiFi connection so that the third terminal searches for the 2.4G WiFi signal of the router.
Further, after searching for the 2.4G WiFi signal of the router, the third terminal connects to the router through the signal.
Optionally, the Service Set Identifier (SSID) of the router is tagged with a keyword of 2.4G for the first terminal to recognize.
Further, Service Set Identifications (SSIDs) of the 5G WiFi signal and the 2.4G WiFi signal are set to different names.
The third terminal and the router establish 2.4G WiFi connection, and the defect that the number of LAN ports of the router is insufficient when the transmission rate is tested is overcome by increasing the communication between the first terminal and the third terminal.
Step S105, a first transmission rate between the first terminal and the second terminal and a second transmission rate between the first terminal and the third terminal are obtained at the same time.
And step S106, superposing the first transmission rate and the second transmission rate to obtain the transmission rate of the current first frequency wireless network.
Specifically, a first transmission rate of a first terminal and a second transmission rate of the first terminal and a third terminal are tested simultaneously; and taking the superposed transmission rate of the first transmission rate and the second transmission rate as the transmission rate of the first frequency wireless network.
In this step, two connections are tested, one being the connection of the first terminal with the second terminal and the other being the connection of the first terminal with the third terminal.
By overlapping the two connection rates, the test result is improved, and the measured transmission rate is closer to the theoretical transmission rate of 5G WiFi. I.e. the superposition of the first transmission rate and the second transmission rate.
The test in this step is that the two connections simultaneously perform transmission rate test to obtain the superimposed transmission rate, so that the test result is more accurate.
It should be understood that the steps described above are not in the exact order of execution and that all changes that can be envisioned and do not affect the implementation of the functions are intended to be within the scope of the invention.
Example two
The present embodiment provides a method for testing a wireless transmission rate of a router, a flowchart of which is shown in fig. 2 and is detailed as follows:
step S201, providing a first terminal to establish a wireless connection with the router through a first frequency wireless network.
Step S202, whether the first terminal and the router can normally communicate is judged by sending ping packets from the first terminal to the router.
Sending a ping packet from the first terminal to the router to determine whether the first terminal and the router are in normal communication.
Before testing, the validity of the connection needs to be determined.
In particular, ping also belongs to a communication protocol, being part of the TCP/IP protocol. Whether the network is connected or not can be checked by utilizing the ping command, and the analysis and the judgment of the network fault can be well assisted.
By sending a ping packet to determine that the first terminal is active for a WiFi connection with router 5G.
And step S203, the second terminal is provided to establish wired connection with the router through all the LAN ports.
And step S204, judging whether the second terminal and the router can normally communicate by sending a ping packet to the router from the second terminal.
Specifically, a ping packet is sent from the second terminal to the router to determine whether the second terminal and the router can normally communicate.
Step S205, a first transmission rate between the first terminal and the second terminal is obtained.
Step S206, when the first transmission rate can not reach the preset maximum transmission rate of the first frequency wireless network connection, providing a third terminal to establish wireless connection with the router through a second frequency wireless network.
Step S207, a first transmission rate between the first terminal and the second terminal and a second transmission rate between the first terminal and the third terminal are obtained at the same time.
And step S208, superposing the first transmission rate and the second transmission rate to acquire the transmission rate of the current first frequency wireless network.
It should be understood that the steps described above are not in the exact order of execution and that all changes that can be envisioned and do not affect the implementation of the functions are intended to be within the scope of the invention.
EXAMPLE III
The present embodiment provides a system for testing a wireless transmission rate of a router, a block diagram of which is shown in fig. 3, and the system includes:
a first connection establishing module 310, configured to provide a first terminal to establish a wireless connection with the router through a first frequency wireless network;
a second connection establishing module 320, configured to provide a wired connection between the second terminal and the router through all LAN ports;
a first transmission rate obtaining module 330, configured to obtain a first transmission rate between the first terminal and the second terminal;
a third connection establishing module 340, configured to provide a third terminal to establish a wireless connection with a router through a second frequency wireless network when the first transmission rate cannot reach a preset maximum transmission rate of the first frequency wireless network connection;
a second transmission rate obtaining module 350, configured to obtain a first transmission rate between the first terminal and the second terminal and a second transmission rate between the first terminal and the third terminal at the same time;
and a third transmission rate obtaining module 360, configured to superimpose the first transmission rate and the second transmission rate to obtain a transmission rate of the current first frequency wireless network.
Further, still include:
the first judging module is used for judging whether the first terminal and the router can normally communicate by sending a ping packet to the router from the first terminal.
Further, still include:
and the second judging module is used for judging whether the second terminal and the router can normally communicate by sending a ping packet to the router from the second terminal.
Further, still include:
and the data storage module is used for storing all the test data so as to be convenient for a tester to analyze.
Further, the first frequency wireless network is a 5G WiFi network, and the second frequency wireless network is a 2.4G WiFi network.
Wherein the router comprises a plurality of LAN ports and two wireless networks of different frequencies.
In the embodiments provided in this application, it should be understood that the methods and systems described are illustrative and that variations may be made in the actual implementation by adaptation.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.