CN114363210A - Startup and shutdown testing method, device, system and medium for distributed router - Google Patents

Startup and shutdown testing method, device, system and medium for distributed router Download PDF

Info

Publication number
CN114363210A
CN114363210A CN202011045130.9A CN202011045130A CN114363210A CN 114363210 A CN114363210 A CN 114363210A CN 202011045130 A CN202011045130 A CN 202011045130A CN 114363210 A CN114363210 A CN 114363210A
Authority
CN
China
Prior art keywords
communication
route
test
terminal
address
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.)
Pending
Application number
CN202011045130.9A
Other languages
Chinese (zh)
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 Qihu Intelligent Technology Co ltd
Original Assignee
Shenzhen Qihu 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 Shenzhen Qihu Intelligent Technology Co ltd filed Critical Shenzhen Qihu Intelligent Technology Co ltd
Priority to CN202011045130.9A priority Critical patent/CN114363210A/en
Publication of CN114363210A publication Critical patent/CN114363210A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a startup and shutdown test method, a startup and shutdown test device, a startup and shutdown test system and a startup and shutdown test medium of a distributed router, wherein the startup and shutdown test method is applied to a distributed router system comprising a sub-router in communication connection with a mother router and a test terminal, and is used for controlling the startup of the mother router and the sub-router and acquiring a terminal communication address of the test terminal, a mother communication address of the mother router and a sub-communication address of the sub-router; testing the communication of the parent route and the child route according to the matching of the parent communication address and the child communication address with the communication address of the terminal; and after the communication test is passed, controlling the power-off of the mother route and the sub-route, waiting for a preset discharge time, and then controlling the power-on start of the mother route and the sub-route until the number of times of passing the communication test reaches the preset number of times, thereby completing the startup and shutdown test. The invention sets a repeated test mechanism, if the communication test is normal within repeated preset times, the distributed router can stably realize communication by being turned on and off for multiple times, and the stability of the distributed router in the use process is ensured.

Description

Startup and shutdown testing method, device, system and medium for distributed router
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a method, an apparatus, a system, and a medium for testing a distributed router.
Background
With the development of communication technology, networks have been advanced to various fields of public life, and people use intelligent terminals to connect to the internet through routers, to obtain various information in the internet, or to share information. Therefore, the effective connection of the intelligent terminal on the internet through the router plays a crucial role in accessing the internet by the public.
And, in order to ensure the connection performance of the intelligent terminal, the router is also extended from a single router to a distributed router. Before the distributed router is put into use, a startup and shutdown test needs to be carried out to ensure stability; however, the current on-off test for the distributed router is limited to a single test, and only the parent route and not the child route can be tested. The startup and shutdown test of each route in the distributed router cannot be fully covered, and the stability of the distributed router in the use process is influenced.
Disclosure of Invention
The invention mainly aims to provide a method and a device for testing the startup and shutdown of a distributed router, a distributed routing system and a medium, and aims to solve the technical problem that the stability of the distributed router in the using process is influenced because the distributed router cannot completely cover the startup and shutdown test in the prior art.
In order to achieve the above object, the present invention provides a method for testing startup and shutdown of a distributed router, which is applied to a distributed routing system, wherein the distributed routing system includes a parent route, a child route and a test terminal, and the test terminal and the child route are both in communication connection with the parent route;
the startup and shutdown testing method of the distributed router comprises the following steps:
controlling the parent route and the child route to be powered on and started, and acquiring a terminal communication address of the test terminal, a parent communication address of the parent route and a child communication address of the child route;
according to the matching between the parent communication address and the child communication address and the terminal communication address, respectively, carrying out communication test on the parent route and the child route;
and after the communication test is passed, controlling the parent route and the sub-route to be powered off, and after waiting for a preset discharging time, executing the step of controlling the parent route and the sub-route to be powered on and started until the number of times of passing the communication test reaches a preset number of times, and finishing the on-off test of the distributed router.
Optionally, the step of performing a communication test on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively includes:
testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel;
and testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on a sub-wired communication channel and a sub-wireless communication channel.
Optionally, the test terminal comprises a first test terminal in communication connection with the mother router, the mother wired communication channel comprises a communication channel formed by a mother wired internet access, the mother wireless communication channel comprises a communication channel formed by a mother wireless address,
the step of testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel comprises the following steps:
determining a mother wired network port of a mother route according to the mother communication address, and determining a first wired network port of the first test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the first wired internet access and the mother wired internet access to form a communication channel, executing a preset command based on a first terminal wired address in the terminal communication addresses to test wired communication between the first test terminal and the mother route;
and according to a communication channel formed by matching and connecting a mother wireless address in the mother communication address and a terminal wireless address in the terminal communication address, accessing the wireless network card of the first test terminal to the mother route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the mother route.
Optionally, the step of executing a preset command based on the wired address of the first terminal in the terminal communication addresses, and testing the wired communication between the first test terminal and the parent route includes:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wired communication test between the first test terminal and the mother route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the abnormal prompt information of the main cable is output.
Optionally, the step of executing a preset command based on the terminal wireless address and testing the wireless communication of the parent route includes:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wireless communication test of the parent route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the primary wireless abnormity prompt information is output.
Optionally, the test terminal comprises a second test terminal communicatively connected to the sub-route, the sub-wired communication channel comprises a communication channel formed by a sub-wired network port, and the sub-wireless communication channel comprises a communication channel formed by a sub-wireless address,
the step of testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on the sub-wired communication channel and the sub-wireless communication channel comprises the following steps:
determining a sub wired network port of a sub-route according to the sub-communication address, and determining a second wired network port of the second test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the second wired network port and the sub-wired network port to form a communication channel, executing a preset command based on a second terminal wired address in the terminal communication address to test wired communication between the second test terminal and the sub-route;
and according to a communication channel formed by matching connection between the sub-wireless address in the sub-communication address and the terminal wireless address in the terminal communication address, accessing the wireless network card of the second test terminal to the sub-route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the sub-route.
Optionally, the step of determining the sub wired network port of the sub-route according to the sub communication address and determining the second wired network port of the second test terminal according to the terminal communication address includes:
determining a first wired network port of the first test terminal according to the terminal communication address, and determining the effectiveness of communication connection among the first wired network port, the second wired network port and the sub-wired network ports;
and if the communication connection among the first wired network port, the second wired network port and the sub wired network port is effective, executing a preset command based on a first terminal wired address in the terminal communication address, and testing the wired communication between the parent route and the sub route.
Optionally, the step of executing a preset command based on a second terminal wired address in the terminal communication addresses, and testing wired communication between the second test terminal and the sub-route includes:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wired communication test between the second test terminal and the sub-route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, sub-wired abnormity prompt information is output.
Optionally, the step of executing a preset command based on the terminal wireless address and testing the wireless communication of the sub-route includes:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wireless communication test of the sub-route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, sub-wireless abnormity prompt information is output.
Optionally, after the step of performing the communication test on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address, respectively, the step of performing the communication test on the parent route and the child route includes:
if the wired communication and the wireless communication of the parent route are tested, the wired communication and the wireless communication of the child route are tested, and the wired communication between the parent route and the child route is tested, initiating an access request based on the test terminal, and judging whether reply information corresponding to the access request is matched with preset information;
if the communication test is matched with the preset information, judging that the communication test carried out on the parent route and the child route passes;
if the access request is not matched with the preset information, the access request is retransmitted and initiated based on preset times and preset duration, and if the reply information obtained within the preset times is not matched with the preset information, access abnormity prompting information is output.
Optionally, the step of controlling the parent route and the child route to be powered off includes:
closing a first power supply channel corresponding to the parent route and a second power supply channel corresponding to the child route to control the parent route and the child route to be powered off;
and timing the power-off time length, and starting the first power supply channel and the second power supply channel when the timing reaches the preset discharge time length so as to execute the step of controlling the power-on starting of the mother route and the son route.
Optionally, the distributed routing system further includes a multi-path power relay, where the multi-path power relay includes multiple power channels, and the parent route and the child route are respectively connected to different power channels;
the step of turning off a first power channel corresponding to the parent route and a second power channel corresponding to the child route includes:
determining the first power supply channel and the second power supply channel from multiple power supply channels according to the parent routing channel number and the child routing channel number of the parent routing and the child routing in the multiple power supply channels respectively;
and switching the channel state of the first power channel and the channel state of the second power channel from an open state to a closed state based on the multi-channel power relay so as to close the first power channel and the second power channel.
Optionally, the step of controlling power-on start of the parent route and the child route includes:
after the starting time of the first power supply channel and the second power supply channel reaches the preset starting time, judging whether the test process corresponding to the distributed router is completely started or not;
and if the test terminal is completely started, executing the step of acquiring the terminal communication address of the test terminal, the parent communication address of the parent route and the child communication address of the child route.
Further, to achieve the above object, the present invention further provides a device for testing a distributed router, where the device for testing a distributed router comprises:
an obtaining module, configured to control the parent route and the child route to be powered on and started, and obtain a terminal communication address of the test terminal, a parent communication address of the parent route, and a child communication address of the child route;
the testing module is used for carrying out communication testing on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively;
and the control module is used for controlling the power-off of the parent route and the sub-route after the communication test is passed, and executing the step of controlling the power-on starting of the parent route and the sub-route after waiting for a preset discharging time period until the number of times of passing the communication test reaches a preset number of times, so as to finish the power-on and power-off test of the distributed router.
Optionally, the test module comprises:
the first testing unit is used for testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel;
and the second testing unit is used for testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on a sub-wired communication channel and a sub-wireless communication channel.
Optionally, the test terminal includes a first test terminal communicatively connected to the parent router, the parent wired communication channel includes a communication channel formed by a parent wired internet access, the parent wireless communication channel includes a communication channel formed by a parent wireless address, and the first test unit is further configured to:
determining a mother wired network port of a mother route according to the mother communication address, and determining a first wired network port of the first test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the first wired internet access and the mother wired internet access to form a communication channel, executing a preset command based on a first terminal wired address in the terminal communication addresses to test wired communication between the first test terminal and the mother route;
and according to a communication channel formed by matching and connecting a mother wireless address in the mother communication address and a terminal wireless address in the terminal communication address, accessing the wireless network card of the first test terminal to the mother route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the mother route.
Optionally, the first test unit is further configured to:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wired communication test between the first test terminal and the mother route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the abnormal prompt information of the main cable is output.
Optionally, the first test unit is further configured to:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wireless communication test of the parent route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the primary wireless abnormity prompt information is output.
Further, in order to achieve the above object, the present invention further provides a distributed routing system, where the distributed routing system includes a parent route, a child route, and a test terminal, and both the test terminal and the child route are in communication connection with the parent route; the distributed routing system further comprises a memory, a processor and a switching test program of the distributed router, which is stored on the memory and can run on the processor, and when the switching test program of the distributed router is executed by the processor, the steps of the switching test method of the distributed router are realized.
Further, to achieve the above object, the present invention also provides a medium, where the medium stores a power on/off test program of a distributed router, and the power on/off test program of the distributed router, when executed by a processor, implements the steps of the power on/off test method of the distributed router as described above.
The invention discloses a startup and shutdown testing method, a startup and shutdown testing device, a startup and shutdown testing system and a startup and shutdown testing medium for a distributed router. When in testing, the parent route and the child route are firstly controlled to be powered on and started, and a terminal communication address of a testing terminal, a parent communication address of the parent route and a child communication address of the child route are obtained, and then the parent route and the child route are subjected to communication testing according to the matching between the parent communication address and the child communication address and the terminal communication address respectively; and after the communication test is passed, the parent route and the sub-route are controlled to be powered off, and after the power-off time reaches the preset discharge time, the parent route and the sub-route are controlled to be powered on and started, so that the test is repeated until the number of times that the communication test is passed reaches the preset number, and the startup and shutdown test of the distributed router is completed. The test terminal and the sub-route are both set to be in communication connection with the parent route, and the parent communication address of the parent route is in matched connection with the terminal communication address of the test terminal, so that the communication test of the parent route is realized; meanwhile, the communication test of the sub-route is realized by matching connection between the sub-communication address of the sub-route and the terminal communication address of the test terminal. Therefore, comprehensive testing of the parent route and the child route in the distributed router is realized, and the performance of connecting to the Internet through the distributed router is ensured. And moreover, a repeated test mechanism is set, the number of times of passing the repeated on-off communication test reaches the preset number of times, the communication performance of the parent route and the child route is normal within the repeated preset number of times, and the distributed router can stably realize communication after being turned on and off for many times, so that the on-off test of the distributed router is completed, and the stability of the distributed router in the use process is ensured.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the distributed routing system of the present invention;
fig. 2 is a schematic flowchart of a first embodiment of a power on/off test method for a distributed router according to the present invention;
FIG. 3 is a functional block diagram of a preferred embodiment of a power on/off test apparatus for a distributed router according to the present invention;
fig. 4 is a schematic structural diagram of a distributed routing system to which the power on/off test method of the distributed router of the present invention is applied.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The present invention provides a distributed routing system, and referring to fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment according to an embodiment of the distributed routing system of the present invention.
As shown in fig. 1, the distributed routing system may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a memory distributed routing system separate from the processor 1001 described above.
Those skilled in the art will appreciate that the hardware configuration of the distributed routing system shown in fig. 1 does not constitute a limitation of the distributed routing system, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a medium, may include therein an operating system, a network communication module, a user interface module, and a power on/off test program of the distributed router. The operating system is a program for managing and controlling hardware and software resources of the distributed routing system, and supports the running of a network communication module, a user interface module, a startup and shutdown test program of the distributed router and other programs or software; the network communication module is used to manage and control the network interface 1004; the user interface module is used to manage and control the user interface 1003.
In the hardware structure of the distributed routing system shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; the processor 1001 may call a power on/off test program of the distributed router stored in the memory 1005 and perform the following operations:
controlling the parent route and the child route to be powered on and started, and acquiring a terminal communication address of the test terminal, a parent communication address of the parent route and a child communication address of the child route;
according to the matching between the parent communication address and the child communication address and the terminal communication address, respectively, carrying out communication test on the parent route and the child route;
and after the communication test is passed, controlling the parent route and the sub-route to be powered off, and after waiting for a preset discharging time, executing the step of controlling the parent route and the sub-route to be powered on and started until the number of times of passing the communication test reaches a preset number of times, and finishing the on-off test of the distributed router.
Further, the step of performing a communication test on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively includes:
testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel;
and testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on a sub-wired communication channel and a sub-wireless communication channel.
Further, the test terminal comprises a first test terminal which is connected with the mother router in a communication mode, the mother wired communication channel comprises a communication channel formed by a mother wired internet access, the mother wireless communication channel comprises a communication channel formed by a mother wireless address,
the step of testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel comprises the following steps:
determining a mother wired network port of a mother route according to the mother communication address, and determining a first wired network port of the first test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the first wired internet access and the mother wired internet access to form a communication channel, executing a preset command based on a first terminal wired address in the terminal communication addresses to test wired communication between the first test terminal and the mother route;
and according to a communication channel formed by matching and connecting a mother wireless address in the mother communication address and a terminal wireless address in the terminal communication address, accessing the wireless network card of the first test terminal to the mother route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the mother route.
Further, after the step of performing a preset command based on the wired address of the first terminal in the terminal communication addresses to test the wired communication between the first test terminal and the parent route, the processor 1001 may call an on/off test program of the distributed router stored in the memory 1005, and perform the following operations:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wired communication test between the first test terminal and the mother route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the abnormal prompt information of the main cable is output.
Further, after the step of executing the preset command based on the wireless address of the terminal to test the wireless communication of the parent route, the processor 1001 may call a power on/off test program of the distributed router stored in the memory 1005, and perform the following operations:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wireless communication test of the parent route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the primary wireless abnormity prompt information is output.
Further, the test terminal comprises a second test terminal which is connected with the sub-route in a communication mode, the sub-wired communication channel comprises a communication channel formed by a sub-wired network port, the sub-wireless communication channel comprises a communication channel formed by a sub-wireless address,
the step of testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on the sub-wired communication channel and the sub-wireless communication channel comprises the following steps:
determining a sub wired network port of a sub-route according to the sub-communication address, and determining a second wired network port of the second test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the second wired network port and the sub-wired network port to form a communication channel, executing a preset command based on a second terminal wired address in the terminal communication address to test wired communication between the second test terminal and the sub-route;
and according to a communication channel formed by matching connection between the sub-wireless address in the sub-communication address and the terminal wireless address in the terminal communication address, accessing the wireless network card of the second test terminal to the sub-route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the sub-route.
Further, the test terminals include a first test terminal, and after the step of determining the sub-wired network port of the sub-route according to the sub-communication address and determining the second wired network port of the second test terminal according to the terminal communication address, the processor 1001 may call an on/off test program of the distributed router stored in the memory 1005, and perform the following operations:
determining a first wired network port of the first test terminal according to the terminal communication address, and determining the effectiveness of communication connection among the first wired network port, the second wired network port and the sub-wired network ports;
and if the communication connection among the first wired network port, the second wired network port and the sub wired network port is effective, executing a preset command based on a first terminal wired address in the terminal communication address, and testing the wired communication between the parent route and the sub route.
Further, after the step of testing the wired communication between the second test terminal and the sub-route based on the step of executing the preset command by the second terminal wired address in the terminal communication addresses, the processor 1001 may call an on/off test program of the distributed router stored in the memory 1005, and perform the following operations:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wired communication test between the second test terminal and the sub-route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, sub-wired abnormity prompt information is output.
Further, after the step of executing the preset command based on the terminal wireless address to test the wireless communication of the sub-route, the processor 1001 may call a power on/off test program of the distributed router stored in the memory 1005, and perform the following operations:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wireless communication test of the sub-route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, sub-wireless abnormity prompt information is output.
Further, after the step of performing the communication test on the parent route and the child route according to the matching between the parent communication address and the child communication address respectively and the terminal communication address, the processor 1001 may call a power on/off test program of the distributed router stored in the memory 1005, and perform the following operations:
if the wired communication and the wireless communication of the parent route are tested, the wired communication and the wireless communication of the child route are tested, and the wired communication between the parent route and the child route is tested, initiating an access request based on the test terminal, and judging whether reply information corresponding to the access request is matched with preset information;
if the communication test is matched with the preset information, judging that the communication test carried out on the parent route and the child route passes;
if the access request is not matched with the preset information, the access request is retransmitted and initiated based on preset times and preset duration, and if the reply information obtained within the preset times is not matched with the preset information, access abnormity prompting information is output.
Further, the step of controlling the parent route and the child route to be powered off includes:
closing a first power supply channel corresponding to the parent route and a second power supply channel corresponding to the child route to control the parent route and the child route to be powered off;
and timing the power-off time length, and starting the first power supply channel and the second power supply channel when the timing reaches the preset discharge time length so as to execute the step of controlling the power-on starting of the mother route and the son route.
Furthermore, the distributed routing system further comprises a multi-path power supply relay, the multi-path power supply relay comprises a plurality of power supply channels, and the parent route and the child route are respectively connected with different power supply channels;
the step of turning off a first power channel corresponding to the parent route and a second power channel corresponding to the child route includes:
determining the first power supply channel and the second power supply channel from multiple power supply channels according to the parent routing channel number and the child routing channel number of the parent routing and the child routing in the multiple power supply channels respectively;
and switching the channel state of the first power channel and the channel state of the second power channel from an open state to a closed state based on the multi-channel power relay so as to close the first power channel and the second power channel.
Further, the step of controlling the power-on start of the parent route and the child route includes:
after the starting time of the first power supply channel and the second power supply channel reaches the preset starting time, judging whether the test process corresponding to the distributed router is completely started or not;
and if the test terminal is completely started, executing the step of acquiring the terminal communication address of the test terminal, the parent communication address of the parent route and the child communication address of the child route.
The specific implementation of the distributed routing system of the present invention is substantially the same as the following embodiments of the startup and shutdown testing method of the distributed router, and will not be described herein again.
The invention also provides a startup and shutdown test method of the distributed router.
Referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a power on/off test method of a distributed router according to the present invention.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than that shown or described herein. Specifically, the power on/off test method of the distributed router of this embodiment is applied to a distributed routing system, where the distributed routing system includes a parent route, a child route, and a test terminal, and both the test terminal and the child route are in communication connection with the parent route, and the power on/off test method of the distributed router includes:
step S10, controlling the parent route and the child route to be powered on and started, and acquiring the terminal communication address of the test terminal, the parent communication address of the parent route and the child communication address of the child route;
the method for testing the startup and shutdown of the distributed router in this embodiment is applied to a distributed routing system, where the distributed routing system includes a parent route, at least one child route, and at least one test terminal, and both the test terminal and the child route are in communication connection with the parent route. And, the number of the test terminals may be consistent with the sum of the numbers of the parent routes and the child routes, or may be smaller than the sum of the numbers of the parent routes and the child routes. For the condition of the sum of the number, the wired Network port and the serial port of one test terminal are respectively connected with the LAN (Local Area Network) Network port and the serial port of one sub-route or one main route. For the condition that the quantity is less than the sum of the quantities, one test terminal comprises a plurality of wired network ports and a plurality of serial ports; different wired network ports are connected with LAN network ports of different sub-routes or mother routes, and different serial ports are connected with serial ports of different sub-routes or mother routes. In this embodiment, taking the case of consistent quantity as an example, please refer to fig. 4, in an embodiment, the distributed routing system includes two testing terminals, which are PC1 and PC2, a parent route CAP and a child route RE, respectively. The wired network port and the serial port of the PC1 are in communication connection with the LAN network port and the serial port of the CAP respectively, the wired network port and the serial port of the PC2 are in communication connection with the LAN network port and the serial port of the RE respectively, and the CAP and the RE are in communication connection in a wired or wireless mode. In addition, a multi-path power supply relay and a WAN PPPoE Server are also arranged in the distributed routing system. The multi-path power supply relay comprises a plurality of power supply channels, and the mother route and the sub-route are connected to different power supply channels so as to provide power for the mother route and the sub-route through different power supply channels. The WAN PPPoE Server can be a Linux system provided with the PPPoE Server, or can be a virtual machine provided with an ROS soft route, and a WAN port of the CAP can access the WAN PPPoE Server through PPPoE dialing.
Further, when the on-off test requirement for the distributed router is met, the multi-path power supply relay controls the parent router and the sub-router to be powered on and started, and obtains the terminal communication address of the test terminal, the parent communication address of the parent router and the sub-communication address of the sub-router. Because the test terminal can be connected to the router in a wireless mode and can also be connected to the router in a wired mode, both wired and wireless communication modes need to be tested. Therefore, the terminal communication address, the parent communication address and the child communication address acquired in this embodiment all include various addresses for implementing wired communication and addresses for implementing wireless communication. And, for the case of more than one test terminal and sub-route, the terminal communication addresses of all the test terminals and the sub-communication addresses of all the sub-routes are acquired. Meanwhile, as for the address of the wireless communication, different communication addresses are also provided according to the type difference of the wireless communication; as for the address for implementing wireless communication in the parent communication address of the parent route, there is a difference between the address for implementing 2G (2-Generation wireless telephone technology) type wireless communication and the address for implementing 5G (5th-Generation, fifth Generation mobile communication technology) type wireless communication.
And step S20, according to the matching between the parent communication address and the child communication address and the terminal communication address, performing communication test on the parent route and the child route.
Furthermore, after the terminal communication address, the parent communication address and the child communication address are obtained, the test can be realized only by establishing communication connection by matching the addresses of the same type because each address includes addresses for realizing different types of communication. And, the test terminal tests the parent route and the child route respectively. Therefore, the communication test is respectively carried out on the mother route and the child route according to the matching between the mother communication address and the child communication address and the terminal communication address. Specifically, the step of performing communication test on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively comprises:
step S21, according to the matching between the mother communication address and the terminal communication address on the mother wired communication channel and the mother wireless communication channel, testing the wired communication and the wireless communication of the mother route;
and step S22, testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on a sub-wired communication channel and a sub-wireless communication channel.
Further, for the mother route, a mother wired communication channel and a mother wireless communication channel between the mother route and the test terminal are established through a mother communication address and a terminal communication address; thus, the matching between the mother communication address and the terminal communication address on the mother wired communication channel and the mother wireless communication channel is determined, and the wired communication and the wireless communication of the mother route are tested according to the matching. Meanwhile, for the sub-route, a sub-wired communication channel and a sub-wireless communication channel between the sub-route and the test terminal are established through the sub-communication address and the terminal communication address; thus, the matching between the sub communication address and the terminal communication address on the sub wired communication channel and the sub wireless communication channel is determined, and the wired communication and the wireless communication of the sub route are tested according to the matching. The wired communication and the wireless communication of the parent route and the child route are respectively tested, so that the comprehensive test coverage of each route in the distributed router is realized, and the effectiveness of connecting the Internet with any route through any route in the distributed router is ensured.
And step S30, after the communication test is passed, controlling the parent route and the child route to be powered off, and after waiting for a preset discharging time, executing the step of controlling the parent route and the child route to be powered on and started until the number of times of passing the communication test reaches a preset number of times, and finishing the power on and power off test of the distributed router.
Further, if both the wired communication test and the wireless communication test performed on the parent route and the child route pass, the communication test performed on the parent route and the child route passes. After the communication test is passed, the multi-path power supply relay controls the power-off processing of the parent route and the sub-route. And presetting preset discharge duration, and waiting for the preset discharge duration after a breakpoint so as to enable the capacitors on the mother route circuit board and the sub-route circuit board to be completely discharged. And then, controlling the power-on start of the parent route and the child route through the multi-path power relay again to perform the on-off test on the distributed router again, and testing the connectivity of the parent route and the child route in the network topology of the distributed router and important processes in the on-off test process, namely performing the communication test on the parent route and the child route. Presetting the preset times for representing the required repeated tests, such as 200 times or 1000 times; counting statistics is carried out after each communication test is passed, and the startup and shutdown test of the distributed router is completed after the counted times reach the preset times.
Further, the step of controlling the parent route and the child route to be powered off includes:
step S31, closing a first power supply channel corresponding to the parent route and a second power supply channel corresponding to the child route to control the parent route and the child route to be powered off;
step S32, timing a power-off duration, and starting the first power channel and the second power channel when the timing reaches a preset discharging duration, so as to execute the step of controlling the power-on start of the parent route and the child route.
Furthermore, in this embodiment, after the communication test performed on the parent route and the child route passes and the current access test on the distributed router is successful, the first power channel corresponding to the parent route in the multi-path power relay and the second power channel corresponding to the child route in the multi-path power relay are turned off. And controlling the power-off of the parent route and the child route by closing the first power supply channel and the second power supply channel. And counting the power-off time length in a timing mode, and if the counted time length reaches the preset discharge time length, waiting for the preset discharge time length after the breakpoint. And at the moment, the first power supply channel and the second power supply channel are started again through the multi-path power supply relay so as to control the main route and the sub-route to be electrified and started again, and the distributed router is tested for many times.
Understandably, different power channels in the multi-channel power relay included in the distributed routing system are used for supplying power to the distributed router, so that the first power channel corresponding to the parent route and the second power channel corresponding to the child route are closed, and the control of the multi-channel power relay can be realized. Specifically, the step of closing the first power channel corresponding to the parent route and the second power channel corresponding to the child route includes:
step S311, determining the first power channel and the second power channel from multiple power channels according to the mother route channel number and the sub route channel number of the mother route and the sub route in the multiple power channels respectively;
step S312, based on the multi-channel power relay, switching the channel state of the first power channel and the channel state of the second power channel from an on state to an off state, so as to turn off the first power channel and the second power channel.
Furthermore, a plurality of power channels in the multi-channel power relay are distinguished through different channel numbers, the mother route and the sub-route are respectively connected with different power channels in the multi-channel power relay, the channel number of the power channel connected with the mother route is used as the channel number of the mother route, and the channel number of the power channel connected with the sub-route is used as the channel number of the sub-route. And then, searching a power supply channel connected with the mother route from the multi-path power supply channels as a first power supply channel and searching a power supply channel connected with the child route as a second power supply channel according to the mother route channel number and the child route channel number. Then, controlling a multi-path power supply relay to switch the channel state of the first power supply channel from an open state to a closed state; and simultaneously, the channel state of the second power channel is switched from the open state to the closed state, so that the first power channel and the second power channel are closed, and the power failure of the mother route and the son route is realized.
Further, the step of controlling the power-on start of the parent route and the child route includes:
step S11, after the starting time of the first power channel and the second power channel reaches the preset starting time, judging whether the test process corresponding to the distributed router is completely started;
step S12, if the test terminal is completely started, the step of obtaining the terminal communication address of the test terminal, the parent communication address of the parent route, and the child communication address of the child route is executed.
Further, after the first power channel and the second power channel are started to supply power to the parent route and the child route, in order to ensure that the distributed router is completely in a working state, after the starting time of the first power channel and the second power channel reaches a preset starting time, whether the test process corresponding to the distributed router is completely started is judged. The preset starting time is preset and is used for ensuring the time for completely starting the first power supply channel and the second power supply channel, for example, the preset starting time is set to be 3 seconds. And if all the processes for testing the distributed router are judged to be in the activated state, the testing process corresponding to the distributed router is completely started. Therefore, the terminal communication address of the test terminal, the parent communication address of the parent route and the child communication address of the child route are obtained, and the distributed router is subjected to comprehensive coverage test through the obtained addresses. If the processes for the distributed router test have the processes in the non-activated state, continuing to wait for the preset starting time length, judging whether the processes are in the activated state again after waiting for the preset starting time length, and if the processes in the non-activated state still exist, outputting process abnormity prompting information. The method and the device can be used for reminding timely processing of the abnormal process, ensuring the effective starting of the process and comprehensively covering and testing the distributed router.
The startup and shutdown testing method of the distributed router is applied to a distributed testing system, the distributed routing system comprises a mother route, a child route and a testing terminal, and the testing terminal and the child route are in communication connection with the mother route. When in testing, the parent route and the child route are firstly controlled to be powered on and started, and a terminal communication address of a testing terminal, a parent communication address of the parent route and a child communication address of the child route are obtained, and then the parent route and the child route are subjected to communication testing according to the matching between the parent communication address and the child communication address and the terminal communication address respectively; and after the communication test is passed, the parent route and the sub-route are controlled to be powered off, and after the power-off time reaches the preset discharge time, the parent route and the sub-route are controlled to be powered on and started, so that the test is repeated until the number of times that the communication test is passed reaches the preset number, and the startup and shutdown test of the distributed router is completed. The test terminal and the sub-route are both set to be in communication connection with the parent route, and the parent communication address of the parent route is in matched connection with the terminal communication address of the test terminal, so that the communication test of the parent route is realized; meanwhile, the communication test of the sub-route is realized by matching connection between the sub-communication address of the sub-route and the terminal communication address of the test terminal. Therefore, comprehensive testing of the parent route and the child route in the distributed router is realized, and the performance of connecting to the Internet through the distributed router is ensured. And moreover, a repeated test mechanism is set, the number of times of passing the repeated on-off communication test reaches the preset number of times, the communication performance of the parent route and the child route is normal within the repeated preset number of times, and the distributed router can stably realize communication after being turned on and off for many times, so that the on-off test of the distributed router is completed, and the stability of the distributed router in the use process is ensured.
Further, based on the first embodiment of the power on/off test method of the distributed router of the present invention, a second embodiment of the power on/off test method of the distributed router of the present invention is provided.
The second embodiment of the method for testing the on/off of the distributed router is different from the first embodiment of the method for testing the on/off of the distributed router in that the test terminal comprises a first test terminal which is in communication connection with the parent router, the parent wired communication channel comprises a communication channel formed by a parent wired internet access, the parent wireless communication channel comprises a communication channel formed by a parent wireless address,
the step of testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel comprises the following steps:
step S211, determining a mother wired network port of a mother route according to the mother communication address, and determining a first wired network port of the first test terminal according to the terminal communication address;
step S212, when it is detected that a network matching connection is established based on the first wired internet access and the mother wired internet access to form a communication channel, executing a preset command based on a first terminal wired address in the terminal communication address to test wired communication between the first test terminal and the mother route;
in the embodiment, a test terminal in communication connection with the parent route is used as a first test terminal, and the first test terminal is used for testing wireless communication and wired communication of the parent route. Specifically, the parent communication address carries information representing the wired network port of the parent route, and the wired network port of the parent route is determined as the parent wired network port according to the information. Meanwhile, the terminal communication address carries information representing the wired network port of the first test terminal, and the wired network port of the first test terminal is determined as the first wired network port according to the information. And then, detecting whether a network matching connection is established between the first wired network port and the mother wired network port, namely detecting whether the first wired network port and the mother wired network port are in a network connection state. If the first test terminal is in the network connection state, the network matching connection between the first test terminal and the mother route is successfully established, a communication channel between the first test terminal and the mother route is formed, the preset command is executed based on the first terminal wired address in the terminal communication address, and the wired communication between the first test terminal and the mother route is tested according to the execution result of the preset command. The wired address of the first terminal is preferably an IP address of a wired network card in the first test terminal, and the preset command is preferably a preset ping command. As with the embodiment shown in fig. 4 above, the PC1 forms the first test terminal and the IP address of the PC1 wired network card is the first terminal wired address, which is designated as the source IP. And meanwhile, setting the preset command as a ping command, taking the IP address of the WAN PPPoE Server as a target IP, and executing the ping command, namely, a ping WAN Server IP address. If the ping operation is successful, the communication connection between the first test terminal and the mother route is in a connected state; otherwise, the two are in an unconnected state, so that the wired communication test between the two is realized.
Further, the step of testing the wired communication between the first test terminal and the parent route by executing a preset command based on the wired address of the first terminal in the terminal communication addresses comprises:
a1, judging whether the preset command is executed successfully, if so, judging that the wired communication test between the first test terminal and the mother route is finished;
step a2, if the execution fails, based on the preset times, the preset command is executed repeatedly, and if the preset commands all fail within the preset times, the mother wire abnormity prompt information is output.
Furthermore, whether the preset command is executed successfully is judged by determining whether the operation of the ping command is successful, if so, the communication connection between the first test terminal and the mother route is in a connected state, the wired communication test between the first test terminal and the mother route is completed, and the wireless communication test is performed. Otherwise, if the execution of the preset command fails, the preset command is repeatedly executed according to preset times until the execution is successful, and the wired communication test of the mother route is judged to be completed; wherein the preset times are set according to requirements, for example, 10 times; if the preset commands are failed to execute within the preset times, judging that the wired communication between the first test terminal and the mother route is abnormal, and outputting mother wired abnormality prompt information to remind to eliminate the abnormality in time.
Step S213, according to a communication channel formed by matching connection between a mother wireless address in the mother communication address and a terminal wireless address in the terminal communication address, the wireless network card of the first test terminal is accessed to the mother route according to a preset access rule, and a preset command is executed based on the terminal wireless address to test the wireless communication of the mother route.
Further, the wireless communication test for the mother route at least comprises a 2G wireless communication test and a 5G wireless communication test. The mother wireless address in the mother communication addresses correspondingly comprises an address for realizing 2G wireless communication and an address for realizing 5G wireless communication. And the terminal wireless address in the terminal communication address correspondingly comprises an address for realizing 2G wireless communication and an address for realizing 5G wireless communication. During testing, respectively establishing matching connection according to the consistency of the wireless communication address types in the two to form a communication channel; respectively establishing matching connection between a 2G wireless communication address in a mother wireless address and a 2G wireless communication address in a terminal wireless address, and matching connection between a 5G wireless communication address in the mother wireless address and a 5G wireless communication address in the terminal wireless address; to perform a test of 2G wireless communication and a test of a 5G communication network, respectively.
Furthermore, after the matching connection is established in the wireless communication test, the wireless network card of the first test terminal is accessed into the mother route through the preset access rule. The preset rule is a preset access rule, and may be BSSID access, password access, or encryption access. Where BSSID is locally managed IEEE MAC address, the present embodiment divides BSSID into BSSID1 on 2G network and BSSID2 on 5G network for the parent route according to the difference between 2G wireless communication and 5G wireless communication. And then, executing a preset command based on the terminal wireless address in the terminal communication address, and testing the wireless communication of the mother route according to the execution result of the preset command. The terminal wireless address is preferably an IP address of the wireless network card, and the preset command is preferably a preset ping command.
It should be noted that, for the wireless communication test including the 2G wireless communication and the 5G wireless communication, the test sequence is not limited. As with the embodiment shown in fig. 4 described above, the 2G wireless communication is tested before the 5G wireless communication. When 2G wireless communication is tested, a wireless network card of the PC1 is accessed to a 2G wireless network on a mother route through a BSSID1, a password or an encryption mode. After waiting for a preset time (such as 3 seconds) and ensuring stable access, the IP address of the wireless network card of the PC1, which is the wireless address of the terminal, is designated as a source IP, meanwhile, the preset command is set as a ping command, and the IP address of the WAN PPPoE Server is used as a destination IP, and the ping command, namely the ping WAN Server IP address, is executed. If the ping operation is successful, the 2G wireless communication test of the parent route is successful, and the 5G wireless communication test is continued; otherwise, the 2G wireless communication test on the parent route fails.
Similarly, for the 5G wireless communication test, the wireless network card of the PC1 is accessed to the 5G wireless network on the mother route by means of BSSID2, password or encryption. After waiting for a preset time (such as 3 seconds) and ensuring stable access, the IP address of the wireless network card of the PC1, which is the wireless address of the terminal, is designated as a source IP, meanwhile, the preset command is set as a ping command, and the IP address of the WAN PPPoE Server is used as a destination IP, and the ping command, namely the ping WAN Server IP address, is executed. If the ping operation is successful, the 5G wireless communication test on the parent route is successful, otherwise, the 5G wireless communication test on the parent route is failed.
Further, the step of executing a preset command based on the terminal wireless address and testing the wireless communication of the parent route includes:
b1, judging whether the preset command is executed successfully, if so, judging that the wireless communication test of the parent route is finished;
step b2, if the execution fails, based on the preset times, the preset command is executed repeatedly, and if the preset commands all fail to be executed within the preset times, the mother wireless abnormity prompting information is output.
Furthermore, whether the wireless communication is 2G wireless communication or 5G wireless communication, whether the execution of the preset command is successful can be determined by determining whether the operation of the ping command is successful, and if the execution of the preset command is successful, the wireless communication test on the parent route is successful, and the wireless communication test on the parent route is completed. Otherwise, if any preset command fails to be executed, the preset command is repeatedly executed according to preset times until the execution is successful, and the wireless communication test of the mother route is judged to be completed; if the preset commands are failed to execute within the preset times, judging that the wireless communication of the primary route is abnormal, and outputting primary wireless abnormal prompt information. If the preset commands are failed to be executed within the preset times during the 2G wireless communication test, the fact that the parent routing is abnormal on the 2G wireless communication is indicated; if the preset commands fail to be executed within the preset times for the 5G wireless communication test, it indicates that the parent route is abnormal in the 5G wireless communication. And outputting corresponding mother wireless abnormity prompt information for each time aiming at the abnormity so as to prompt to eliminate the abnormity in time.
It should be noted that, for the exception in the test process, the subsequent test may be terminated, or the current exception test may be skipped to continue the subsequent test. If the 2G wireless communication test is abnormal, the subsequent 5G wireless communication test can be stopped, so that the influence of the 2G wireless communication test on the 5G wireless communication test is avoided; and after corresponding mother wireless abnormal prompt information is output aiming at the 2G wireless communication test, the subsequent 5G wireless communication test is continued to improve the test efficiency.
The implementation carries out repeated tests on wired communication and wireless communication of the mother route by preset times, and the wireless communication is at least subdivided into 2G wireless communication and 5G wireless communication for testing, so that the test is more comprehensive and accurate, and the effectiveness of communication in various ways is favorably ensured.
Further, based on the first or second embodiment of the power on/off test method of the distributed router of the present invention, a third embodiment of the power on/off test method of the distributed router of the present invention is provided.
The third embodiment of the method for testing the on/off of the distributed router is different from the first or second embodiment of the method for testing the on/off of the distributed router in that the test terminal comprises a second test terminal which is in communication connection with the sub-router, the sub-wired communication channel comprises a communication channel formed by sub-wired network ports, the sub-wireless communication channel comprises a communication channel formed by sub-wireless addresses,
the step of testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on the sub-wired communication channel and the sub-wireless communication channel comprises the following steps:
step S221, determining a sub wired network port of a sub-route according to the sub-communication address, and determining a second wired network port of the second test terminal according to the terminal communication address;
in the embodiment, the test terminal in communication connection with the sub-route is used as the second test terminal, and the second test terminal is used for testing the wireless communication and the priority communication of the sub-route. Specifically, the sub-communication address carries information representing the wired network port of the sub-route, and the wired network port of the sub-route is determined as the sub-wired network port according to the information. Meanwhile, the terminal communication address carries information representing the wired network port of the second test terminal, and the wired network port of the second test terminal is determined as the second wired network port according to the information. Then, wired network communication between the target route and the sub-route is tested by combining a first test terminal in the test terminal, wherein the first test terminal is in communication connection with the master route; specifically, the step of determining the sub wired network port of the sub-route according to the sub communication address, and determining the second wired network port of the second test terminal according to the terminal communication address includes:
step c1, determining the first wired network port of the first test terminal according to the terminal communication address, and determining the effectiveness of the communication connection among the first wired network port, the second wired network port and the sub-wired network port;
step c2, if the communication connection among the first wired internet access, the second wired internet access and the sub-wired internet access is valid, executing a preset command based on the first terminal wired address in the terminal communication address, and testing the wired communication between the parent route and the sub-route.
Further, the terminal communication address carries information representing the wired network port of the first test terminal, and the wired network port of the first test terminal is determined as the first wired network port according to the information. And, whether effective network matching connection is established among the first wired network port, the second wired network port and the sub-wired network port is detected, namely whether the first wired network port, the second wired network port and the sub-wired network port are in a network connection state is detected. If the router is in a network connection state, the communication connection among the router, the router and the sub-router is effective, and then the preset command is executed based on the first terminal wired address in the terminal communication addresses, and the wired communication between the parent router and the sub-router is tested according to the execution result of the preset command.
Similarly, the wired address of the first terminal is preferably an IP address of a wired network card in the first test terminal, and the preset command is preferably a preset ping command. That is, for the embodiment shown in fig. 4 described above, the IP address of the PC1 wired network card forming the wired address of the first terminal is designated as the source IP. And meanwhile, setting the preset command as a ping command, taking the IP address of the sub-route RE as a destination IP, and executing the ping command, namely the ping RE IP address. If the ping operation is successful, the wired communication between the parent route and the child route is in an effective communication state; otherwise, the two are in an unconnected state, so that the wired communication test between the two is realized.
Step S222, when it is detected that network matching connection is established based on the second wired internet access and the sub-wired internet access to form a communication channel, executing a preset command based on a second terminal wired address in the terminal communication address to test wired communication between the second test terminal and the sub-route;
further, wired communication between the second test terminal and the sub-route is tested. And detecting whether a network matching connection is established between the second wired network port and the sub-wired network port, namely detecting whether the second wired network port and the sub-wired network port are in a network connection state. If the terminal is in the network connection state, the network matching connection between the terminal and the mother route is successfully established to form a communication channel between the terminal and the mother route, the preset command is executed based on the second terminal wired address in the terminal communication address, and the wired communication between the second test terminal and the mother route is tested according to the execution result of the preset command. The wired address of the second terminal is preferably an IP address of a wired network card in the second test terminal, and the preset command is preferably a preset ping command. As with the embodiment shown in fig. 4 above, the PC2 forms the second test terminal, and the IP address of the PC2 wired network card is the second terminal wired address, which is designated as the source IP. And meanwhile, setting the preset command as a ping command, taking the IP address of the WAN PPPoE Server as a target IP, and executing the ping command, namely, a ping WAN Server IP address. If the ping operation is successful, the communication connection between the second test terminal and the sub-route is in a communication state; otherwise, the two are in an unconnected state, so that the wired communication test between the two is realized.
Still further, the step of testing the wired communication between the second test terminal and the sub-route by executing a preset command based on the wired address of the second terminal in the terminal communication addresses comprises:
step e1, determining whether the preset command is executed successfully, if so, determining that the wired communication test between the second test terminal and the sub-route is completed;
and e2, if the execution fails, repeatedly executing the preset command based on preset times, and if the preset commands all fail to be executed within the preset times, outputting sub-wired abnormity prompt information.
Further, whether the preset command is executed successfully is judged by determining whether the operation of the ping command is successful, if so, the communication connection between the second test terminal and the sub-route is in a connected state, the wired communication test between the second test terminal and the sub-route is completed, and the wireless communication test is performed. Otherwise, if the execution of the preset command fails, the preset command is repeatedly executed according to the preset times until the execution is successful, and the wired communication test on the sub-route is judged to be completed; wherein the preset times are set according to requirements, for example, 10 times; if the preset commands are failed to execute within the preset times, judging that the wired communication between the second test terminal and the sub-router is abnormal, and outputting sub-wired abnormal prompt information to remind of timely eliminating the abnormality.
Step S223, according to a communication channel formed by matching and connecting the sub-wireless address in the sub-communication address and the terminal wireless address in the terminal communication address, accessing the wireless network card of the second test terminal to the sub-route according to a preset access rule, and executing a preset command based on the terminal wireless address to test the wireless communication of the sub-route.
Further, the wireless communication test for the sub-route at least includes a 2G wireless communication test and a 5G wireless communication test. The sub-wireless address in the sub-communication addresses correspondingly comprises an address for realizing 2G wireless communication and an address for realizing 5G wireless communication. And the terminal wireless address in the terminal communication address correspondingly comprises an address for realizing 2G wireless communication and an address for realizing 5G wireless communication. During testing, respectively establishing matching connection according to the consistency of the wireless communication address types in the two to form a communication channel between the two; respectively establishing matching connection between the 2G wireless communication address in the sub wireless address and the 2G wireless communication address in the terminal wireless address, and matching connection between the 5G wireless communication address in the sub wireless address and the 5G wireless communication address in the terminal wireless address; to perform a test of 2G wireless communication and a test of a 5G communication network, respectively.
Furthermore, after the matching connection is established in the wireless communication test, the wireless network card of the second test terminal is accessed into the sub-route through the preset access rule. The preset rule is a preset access rule, and may be BSSID access, password access, or encryption access. Where BSSID is locally managed IEEE MAC address, the present embodiment divides BSSID into BSSID1 routed on the 2G network and BSSID2 routed on the 5G network in accordance with the difference between 2G wireless communication and 5G wireless communication. And then, executing a preset command based on the terminal wireless address in the terminal communication address, and testing the sub-routed wireless communication through the execution result of the preset command. The terminal wireless address is preferably an IP address of the wireless network card, and the preset command is preferably a preset ping command.
It should be noted that, for the wireless communication test including the 2G wireless communication and the 5G wireless communication, the test sequence is not limited. As with the embodiment shown in fig. 4 described above, the 2G wireless communication is tested before the 5G wireless communication. When 2G wireless communication is tested, the wireless network card of the PC1 is accessed to the 2G wireless network on the sub-route through BSSID1, password or encryption. After waiting for a preset time (such as 3 seconds) and ensuring stable access, the IP address of the wireless network card of the PC1, which is the wireless address of the terminal, is designated as a source IP, meanwhile, the preset command is set as a ping command, and the IP address of the WAN PPPoE Server is used as a destination IP, and the ping command, namely the ping WAN Server IP address, is executed. If the ping operation is successful, the 2G wireless communication test of the sub-route is successful, and the 5G wireless communication test is continued; otherwise, the 2G wireless communication test on the sub-route fails.
Similarly, for the 5G wireless communication test, the wireless network card of the PC1 is accessed to the 5G wireless network on the sub-route by means of BSSID2, password or encryption. After waiting for a preset time (such as 3 seconds) and ensuring stable access, the IP address of the wireless network card of the PC1, which is the wireless address of the terminal, is designated as a source IP, meanwhile, the preset command is set as a ping command, and the IP address of the WAN PPPoE Server is used as a destination IP, and the ping command, namely the ping WAN Server IP address, is executed. If the ping operation is successful, the 5G wireless communication test on the sub-route is successful, otherwise, the 5G wireless communication test on the sub-route is failed.
Further, the step of executing a preset command based on the terminal wireless address and testing the wireless communication of the sub-route includes:
step f1, judging whether the preset command is executed successfully, if so, judging that the wireless communication test of the sub-route is finished;
and f2, if the execution fails, repeatedly executing the preset command based on preset times, and if the preset command fails to be executed within the preset times, outputting sub-wireless abnormity prompt information.
Furthermore, whether the wireless communication is 2G wireless communication or 5G wireless communication, whether the execution of the preset command is successful can be determined by determining whether the operation of the ping command is successful, and if the execution of the preset command is successful, the wireless communication test on the sub-route is successful, and the wireless communication test on the sub-route is completed. Otherwise, if any preset command fails to be executed, the preset command is repeatedly executed according to preset times until the execution is successful, and the wireless communication test on the sub-route is judged to be completed; if the preset commands are failed to execute within the preset times, judging that the wireless communication of the sub-route is abnormal, and outputting sub-wireless abnormal prompt information. If the preset commands are failed to be executed within the preset times during the 2G wireless communication test, the sub-route is abnormal in the 2G wireless communication; if the preset commands fail to be executed within the preset times for the 5G wireless communication test, it is indicated that the sub-route has an abnormality on the 5G wireless communication. And outputting corresponding sub-wireless abnormity prompt information for each time aiming at the abnormity so as to prompt the timely elimination of the abnormity.
It should be noted that, for the exception in the test process, the subsequent test may be terminated, or the current exception test may be skipped to continue the subsequent test. If the 2G wireless communication test is abnormal, the subsequent 5G wireless communication test can be stopped, so that the influence of the 2G wireless communication test on the 5G wireless communication test is avoided; and after corresponding sub-wireless abnormal prompt information is output aiming at the 2G wireless communication test, the subsequent 5G wireless communication test is continued to improve the test efficiency.
The embodiment performs repeated tests on wired communication and wireless communication of the sub-route for preset times, and performs the tests on the wireless communication at least by dividing the wireless communication into 2G wireless communication and 5G wireless communication, so that the tests are more comprehensive and accurate, and the effectiveness of communication in various ways is ensured.
Further, based on the first, second or third embodiment of the power on/off test method of the distributed router of the present invention, a fourth embodiment of the power on/off test method of the distributed router of the present invention is provided.
The fourth embodiment of the method for testing power on/off of a distributed router is different from the first, second or third embodiment of the method for testing power on/off of a distributed router in that, after the step of performing the communication test on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively, the method for testing power on/off of a distributed router comprises:
step S40, if the wired communication and the wireless communication of the parent route are tested, the wired communication and the wireless communication of the child route are tested, and the wired communication between the parent route and the child route is tested, an access request is initiated based on the test terminal, and whether reply information corresponding to the access request is matched with preset information is judged;
step S50, if matching with the preset information, judging that the communication test of the parent route and the child route passes;
step S60, if not matched with the preset information, retransmitting the access request based on the preset times and the preset duration, and if none of the reply information obtained within the preset times is matched with the preset information, outputting access abnormality prompt information.
The embodiment tests the access performance of the distributed router through the test terminal. Specifically, after the wired communication and wireless communication test of the parent route is completed, the wired communication and wireless communication test of the child route is completed, and the wired communication test between the parent route and the child route is completed, the normal communication of the parent route, the normal communication of the child route, and the normal communication between the child route and the parent route are represented, an access request, such as an http (HyperText Transfer Protocol) request, is initiated through the test terminal, the web server (web server) of the distributed router is accessed, and information returned by the web server is received as reply information corresponding to the access request. Presetting preset information for representing whether the access is successful or not, comparing the received reply information with the preset information, and judging whether the reply information is matched with the preset information or not. If the reply information is consistent with the preset information, the reply information and the preset information are judged to be matched, the initiated access request successfully accesses the web server through the distributed router, the access test on the distributed router passes, the communication of the parent route and the child route in all aspects is represented to be normal, and therefore the communication test on the parent route and the child route passes is judged to be passed.
Further, if the reply information is judged to be inconsistent with the preset information and the reply information is judged not to be consistent with the preset information, repeated testing is carried out according to preset times and preset duration, the access request is repeatedly initiated to carry out the access test until the test is successful, and the access test on the distributed router is judged to be completed. The preset times and the preset duration are set according to requirements, if the preset times and the preset duration are respectively set to 10 times and 3 seconds, 10 times of repeated tests are initiated in total, and the repeated test interval is initiated every time in 3 seconds. If the reply information obtained within the preset times is inconsistent with the preset information, namely is not matched with the preset information, judging that the access to the web server through the distributed router is abnormal, and outputting access abnormity prompt information to remind of timely eliminating the abnormity.
It should be noted that the test sequence of the access test of the distributed router, the wired test and the wireless test of the parent route, and the wired test and the wireless test of the child route can be changed; however, no matter what sequence is used for testing, all functions need to be tested in a comprehensive coverage manner.
In the embodiment, an access test mechanism is set for the distributed router, and further, a comprehensive coverage test is realized from the access dimension. The repeated testing mechanism set for the startup and shutdown test of the distributed router is combined, so that the stability of the distributed router is tested from multiple dimensions for multiple times.
The invention also provides a startup and shutdown testing device of the distributed router. The startup and shutdown testing device of the distributed router comprises:
an obtaining module, configured to control the parent route and the child route to be powered on and started, and obtain a terminal communication address of the test terminal, a parent communication address of the parent route, and a child communication address of the child route;
the testing module is used for carrying out communication testing on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively;
and the control module is used for controlling the power-off of the parent route and the sub-route after the communication test is passed, and executing the step of controlling the power-on starting of the parent route and the sub-route after waiting for a preset discharging time period until the number of times of passing the communication test reaches a preset number of times, so as to finish the power-on and power-off test of the distributed router.
Further, the test module includes:
the first testing unit is used for testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel;
and the second testing unit is used for testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on a sub-wired communication channel and a sub-wireless communication channel.
Further, the test terminal includes a first test terminal connected to the mother router in communication, the mother wired communication channel includes a communication channel formed by a mother wired internet access, the mother wireless communication channel includes a communication channel formed by a mother wireless address, and the first test unit is further configured to:
determining a mother wired network port of a mother route according to the mother communication address, and determining a first wired network port of the first test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the first wired internet access and the mother wired internet access to form a communication channel, executing a preset command based on a first terminal wired address in the terminal communication addresses to test wired communication between the first test terminal and the mother route;
and according to a communication channel formed by matching and connecting a mother wireless address in the mother communication address and a terminal wireless address in the terminal communication address, accessing the wireless network card of the first test terminal to the mother route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the mother route.
Further, the first test unit is further configured to:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wired communication test between the first test terminal and the mother route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the abnormal prompt information of the main cable is output.
Judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wireless communication test of the parent route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the primary wireless abnormity prompt information is output.
The specific implementation of the power on/off test device of the distributed router of the present invention is substantially the same as the above-mentioned embodiments of the power on/off test method of the distributed router, and is not described herein again.
In addition, the embodiment of the invention also provides a medium.
The medium stores a startup and shutdown test program of the distributed router, and the startup and shutdown test program of the distributed router realizes the steps of the startup and shutdown test method of the distributed router when being executed by the processor.
The medium of the present invention may be a computer-readable storage medium, and the specific implementation manner of the medium of the present invention is substantially the same as that of each embodiment of the power on/off testing method of the distributed router, and is not described herein again.
The present invention is described in connection with the accompanying drawings, but the present invention is not limited to the above embodiments, which are only illustrative and not restrictive, and those skilled in the art can make various changes without departing from the spirit and scope of the invention as defined by the appended claims, and all changes that come within the meaning and range of equivalency of the specification and drawings that are obvious from the description and the attached claims are intended to be embraced therein.

Claims (10)

1. The startup and shutdown testing method of the distributed router is characterized by being applied to a distributed routing system, wherein the distributed routing system comprises a mother route, a child route and a testing terminal, and the testing terminal and the child route are in communication connection with the mother route;
the startup and shutdown testing method of the distributed router comprises the following steps:
controlling the parent route and the child route to be powered on and started, and acquiring a terminal communication address of the test terminal, a parent communication address of the parent route and a child communication address of the child route;
according to the matching between the parent communication address and the child communication address and the terminal communication address, respectively, carrying out communication test on the parent route and the child route;
and after the communication test is passed, controlling the parent route and the sub-route to be powered off, and after waiting for a preset discharging time, executing the step of controlling the parent route and the sub-route to be powered on and started until the number of times of passing the communication test reaches a preset number of times, and finishing the on-off test of the distributed router.
2. The method for testing the power on/off of the distributed router according to claim 1, wherein the step of performing the communication test on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively comprises:
testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel;
and testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on a sub-wired communication channel and a sub-wireless communication channel.
3. The method for testing the power on/off of the distributed router according to claim 2, wherein the test terminal comprises a first test terminal communicatively connected to the mother router, the mother wired communication channel comprises a communication channel formed by a mother wired network port, and the mother wireless communication channel comprises a communication channel formed by a mother wireless address,
the step of testing the wired communication and the wireless communication of the mother route according to the matching between the mother communication address and the terminal communication address on a mother wired communication channel and a mother wireless communication channel comprises the following steps:
determining a mother wired network port of a mother route according to the mother communication address, and determining a first wired network port of the first test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the first wired internet access and the mother wired internet access to form a communication channel, executing a preset command based on a first terminal wired address in the terminal communication addresses to test wired communication between the first test terminal and the mother route;
and according to a communication channel formed by matching and connecting a mother wireless address in the mother communication address and a terminal wireless address in the terminal communication address, accessing the wireless network card of the first test terminal to the mother route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the mother route.
4. The method for testing power on/off of a distributed router according to claim 3, wherein the step of testing the wired communication between the first test terminal and the parent router based on the wired address of the first terminal among the terminal communication addresses by executing the preset command comprises the steps of:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wired communication test between the first test terminal and the mother route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the abnormal prompt information of the main cable is output.
5. The method for testing the power on/off of the distributed router according to claim 3, wherein the step of executing the preset command based on the wireless address of the terminal to test the wireless communication of the parent router is followed by the steps of:
judging whether the preset command is successfully executed or not, and if the preset command is successfully executed, judging that the wireless communication test of the parent route is finished;
if the execution fails, the preset command is repeatedly executed based on preset times, and if the preset command fails to be executed within the preset times, the primary wireless abnormity prompt information is output.
6. The method for testing the power on/off of the distributed router according to claim 2, wherein the test terminal comprises a second test terminal communicatively connected to the sub-router, the sub-wired communication channel comprises a communication channel formed by a sub-wired network port, and the sub-wireless communication channel comprises a communication channel formed by a sub-wireless address,
the step of testing the wired communication and the wireless communication of the sub-route according to the matching between the sub-communication address and the terminal communication address on the sub-wired communication channel and the sub-wireless communication channel comprises the following steps:
determining a sub wired network port of a sub-route according to the sub-communication address, and determining a second wired network port of the second test terminal according to the terminal communication address;
when it is detected that network matching connection is established based on the second wired network port and the sub-wired network port to form a communication channel, executing a preset command based on a second terminal wired address in the terminal communication address to test wired communication between the second test terminal and the sub-route;
and according to a communication channel formed by matching connection between the sub-wireless address in the sub-communication address and the terminal wireless address in the terminal communication address, accessing the wireless network card of the second test terminal to the sub-route according to a preset access rule, executing a preset command based on the terminal wireless address, and testing the wireless communication of the sub-route.
7. The method for testing startup and shutdown of a distributed router according to claim 6, wherein the test terminals include a first test terminal, and the step of determining the sub-wired network ports of the sub-routes according to the sub-communication addresses and determining the second wired network port of the second test terminal according to the terminal communication addresses is followed by the steps of:
determining a first wired network port of the first test terminal according to the terminal communication address, and determining the effectiveness of communication connection among the first wired network port, the second wired network port and the sub-wired network ports;
and if the communication connection among the first wired network port, the second wired network port and the sub wired network port is effective, executing a preset command based on a first terminal wired address in the terminal communication address, and testing the wired communication between the parent route and the sub route.
8. The utility model provides a switching on and shutting down testing arrangement of distributed router which characterized in that, switching on and shutting down testing arrangement of distributed router includes:
an obtaining module, configured to control the parent route and the child route to be powered on and started, and obtain a terminal communication address of the test terminal, a parent communication address of the parent route, and a child communication address of the child route;
the testing module is used for carrying out communication testing on the parent route and the child route according to the matching between the parent communication address and the child communication address and the terminal communication address respectively;
and the control module is used for controlling the power-off of the parent route and the sub-route after the communication test is passed, and executing the step of controlling the power-on starting of the parent route and the sub-route after waiting for a preset discharging time period until the number of times of passing the communication test reaches a preset number of times, so as to finish the power-on and power-off test of the distributed router.
9. A distributed routing system is characterized by comprising a parent route, a child route and a test terminal, wherein the test terminal and the child route are in communication connection with the parent route; the distributed routing system further comprises a memory, a processor and a switch-on/off test program of the distributed router stored on the memory and executable on the processor, the switch-on/off test program of the distributed router, when executed by the processor, implementing the steps of the switch-on/off test method of the distributed router according to any one of claims 1-7.
10. A medium having stored thereon a power on/off test program for a distributed router, the power on/off test program for the distributed router, when executed by a processor, implementing the steps of the power on/off test method for the distributed router according to any one of claims 1-7.
CN202011045130.9A 2020-09-28 2020-09-28 Startup and shutdown testing method, device, system and medium for distributed router Pending CN114363210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011045130.9A CN114363210A (en) 2020-09-28 2020-09-28 Startup and shutdown testing method, device, system and medium for distributed router

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011045130.9A CN114363210A (en) 2020-09-28 2020-09-28 Startup and shutdown testing method, device, system and medium for distributed router

Publications (1)

Publication Number Publication Date
CN114363210A true CN114363210A (en) 2022-04-15

Family

ID=81089721

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011045130.9A Pending CN114363210A (en) 2020-09-28 2020-09-28 Startup and shutdown testing method, device, system and medium for distributed router

Country Status (1)

Country Link
CN (1) CN114363210A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117061402A (en) * 2023-10-10 2023-11-14 联和存储科技(江苏)有限公司 Router testing method, device, equipment and computer readable storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117061402A (en) * 2023-10-10 2023-11-14 联和存储科技(江苏)有限公司 Router testing method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110601871B (en) Virtual equipment testing method and device
CN109525461B (en) Network equipment testing method, device, equipment and storage medium
CN113452830B (en) Batch control method of android cloud mobile phone, computer readable medium and electronic device
CN109587005B (en) Connection detection method and device, computer equipment and readable storage medium
CN102609356B (en) Terminal product driver loading stability testing method
CN111404779B (en) Method, device and system for testing role switching of router nodes
CN111885579B (en) Bluetooth device testing method, device, equipment and storage medium
CN110011877B (en) Switch testing method and device
CN113419812A (en) Port forwarding test method, device, equipment and medium in virtualization environment
CN111478983A (en) Three-layer switch port IP address configuration method, system, terminal and storage medium
CN103490945A (en) Method for detecting maximum telnet user quantity
CN114363210A (en) Startup and shutdown testing method, device, system and medium for distributed router
CN109857471A (en) Method, apparatus, terminal and the storage medium of the tactful real-time synchronization of electricity under a kind of BIOS and BMC
CN109660386A (en) A kind of semiconductor memory aging testing system method for upgrading software
CN112099902A (en) Network adapter configuration method and device of virtual machine, electronic device and storage medium
CN113038499B (en) Terminal Wi-Fi compatibility testing method, device, system, equipment and medium
CN109039747B (en) Dual-computer hot standby control method and device for DPDK service
US11888812B1 (en) Host discovery and addition method and apparatus in data center, and device and medium
CN113590401B (en) CPE equipment multifunctional test method, CPE equipment multifunctional test device, computer equipment and storage medium
CN114143237A (en) Extensible router startup and shutdown automatic test method and system
CN115484129A (en) Multi-process data processing method and device, gateway and readable storage medium
CN111708348B (en) Diagnostic service test method, device, equipment and storage medium
CN109450682B (en) IB network card communication configuration method and device, terminal and storage medium
CN112188327B (en) Optical network unit burning method, device, medium and equipment
CN116389188B (en) Data transmission method and related device

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