A single board and testing method thereof

Through the network startup server to download and install the test system, combined with the Telnet connection to receive instructions, it solves the problem of low test efficiency of single board testing of frame-type firewall equipment, realizes automated batch testing, and improves testing efficiency.

CN113485876BActive Publication Date: 2024-10-01NEW H3C SECURITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110554452.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-20
Publication Date
2024-10-01
Estimated Expiration
2041-05-20

AI Technical Summary

Technical Problem

The single board test process of frame-type firewall equipment requires manual operation, the test system installation efficiency is low, the test efficiency is reduced due to the inability to support virtualization software, and batch testing of multiple single boards cannot be performed.

Method used

Start the server through the network to download the test system and install it in the storage unit, establish a Telnet connection to receive test instructions, realize automated testing, and avoid dependence on virtualization software and manual input of test instructions.

Benefits of technology

It improves the testing efficiency of single boards in frame-type firewall equipment, supports batch testing, and eliminates the need to manually enter test instructions, thereby enhancing the automation and efficiency of the testing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113485876B_ABST
    Figure CN113485876B_ABST
Patent Text Reader

Abstract

The present application provides a single board and a test method thereof. In the test method, the single board receives a network startup instruction from a test host to restart and execute a startup from the network; the single board downloads a test system from a network startup server; the single board installs the downloaded test system in a storage unit; wherein a test software package is mounted in a separate test directory of the test system; the single board establishes a Telnet connection with the test host and receives a test software package installation instruction; the single board installs the test software package in the storage unit; the single board receives a test instruction in the test software package to be executed through a Telnet connection, and the test system performs a test according to the test instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to communication technology, and in particular to a single board and a testing method thereof. Background Art

[0002] The single-board testing process of the frame-type firewall device requires installing the test system on the single board under test through the virtualization software, then switching from the virtualization software to the test system on the single board under test, installing the test software package on the test system, manually entering the test instructions in the test software package, and the test system testing the single board under test according to the test instructions.

[0003] The limitation of the above single board test process is that the test system installation requires manual operation. After the single board completes the test system installation, the single board needs to be switched from the virtualization software environment to the test system environment, which has low switching efficiency. In addition, the test software package of each single board needs to be updated after the test software package is updated. In the scenario where multiple single boards of a frame-type firewall device need to be tested, each single board can only be switched and tested one by one, resulting in a decrease in the test efficiency of the frame-type firewall device. Once the single board under test cannot support the virtualization software, the single board inserted in the frame-type firewall device cannot be tested. Summary of the invention

[0004] The purpose of the present application is to provide a network device and a testing method thereof, which can perform batch testing on multiple tested boards of the network device without requiring each tested board to support virtualization software.

[0005] To achieve the above-mentioned invention objectives, the present application provides a single-board testing method, which includes: the single board receives a network startup instruction from a test host to restart and execute startup from the network; the single board downloads a test system from a network startup server; the single board installs the downloaded test system in a storage unit; wherein a test software package is mounted in a separate test directory of the test system; the single board establishes a Telnet connection with the test host and receives a test software package installation instruction; the single board installs the test software package in the storage unit; the single board receives the test instructions in the test software package to be executed through the Telnet connection, and the test system performs testing according to the test instructions.

[0006] To achieve the above-mentioned purpose of the invention, the present application also provides a single board, which includes a serial port, a network port, a switching module, a processor and a storage unit, wherein the processor performs the following operations by running the processor executable instructions in the storage unit: receiving a network startup instruction to restart and execute startup from the network; downloading a test system; installing the downloaded test system in the storage unit; wherein a test software package is mounted in a separate test directory of the test system; establishing a Telnet connection and receiving a test software package installation instruction; installing the test software package in the storage unit; receiving the test instructions in the test software package to be executed through the Telnet connection, and the test system performs testing according to the test instructions.

[0007] The beneficial effect of the present application is that the tested single board is started from the network, and the test system is downloaded and installed from the network startup server, so that the installed test system mounts the test software package in a separate test directory. The single board does not need to support virtualization software to install the test system, and there is no need to switch from the virtualization software environment to the installed test system environment. Batch testing can be supported, thereby improving the testing efficiency of single boards in frame-type firewall devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 A flowchart of an embodiment of a network device testing method provided in an embodiment of the present application;

[0009] Figure 2 A schematic diagram of a network device testing environment provided in an embodiment of the present application;

[0010] Figure 3 A schematic diagram of the single board structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0011] The present invention will be described in detail with multiple examples shown in multiple figures. In the following detailed description, multiple specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components and circuits are not described in detail in the examples to avoid making these examples difficult to understand.

[0012] Among the terms used, the term "include" means including but not limited to; the term "contain" means including but not limited to; the terms "above", "within" and "below" are inclusive of the number; the terms "greater than" and "less than" are exclusive of the number. The term "based on" means based on at least a part thereof.

[0013] Figure 1 A flowchart of an embodiment of a network device testing method provided in an embodiment of the present application; the method comprises:

[0014] Step 101, the board receives a network startup instruction from a test host to restart and executes startup from the network;

[0015] Step 102, the board downloads the test system from the network startup server;

[0016] Step 103, the board installs the downloaded test system in the storage unit; wherein the test software package is mounted in a separate test directory of the test system;

[0017] Step 104, the board establishes a Telnet connection with the test host and receives a test software package installation instruction;

[0018] Step 105, the board installs the test software package in the storage unit;

[0019] Step 106: The board receives the test instructions in the test software package to be executed through the Telnet connection, and the test system executes the test according to the test instructions.

[0020] Figure 1 The beneficial effect of the illustrated embodiment is that the tested single board is started from the network, and the test system is downloaded and installed from the network startup server, so that the installed test system mounts the test software package in a separate test directory. The single board does not need to support virtualization software to install the test system, and does not need to switch from the virtualization software environment to the installed test system environment. Batch testing can be supported, and automated testing can be implemented according to the test instructions of the test software package to be executed received through the Telnet connection, without manually entering the test instructions of the test software package, thereby improving the testing efficiency of the single board in the frame-type firewall device in many aspects.

[0021] Figure 2 A schematic diagram of a network equipment testing environment provided in an embodiment of the present application. Figure 2 In the test environment, the test host is used to run test scripts and console programs, and the test switch is used to connect single board 1 to single board 3 of the frame-type firewall device in the test environment with other devices. The network boot server is used to store and provide the test system and test software package. The serial port server is used to expand the serial port. Figure 2 The mid-frame firewall also has a main main control board and a backup main control board inserted into the single board slot, multiple power supplies inserted into the power supply slot, and multiple fan modules, but these modules are not related to the single board testing process and are not further explained in this application.

[0022] The serial port of the test host is connected to the serial port 11, serial port 12, and serial port 13 on the single board 1 to single board 3 through the serial port server. The test switch is connected to the network boot service, serial port server, test host, and network port 12, network port 22, and network port 32 of the single board 11-13 of the frame-type firewall device through the network port.

[0023] The test script running in the test host sends a "start command from the network" from the serial port through the console program, and the serial port server sends the "start command from the network" to serial port 11 of board 1, serial port 21 of board 2, and serial port 31 of board 3 respectively.

[0024] After receiving the "start from network command", single board 1, single board 2, and single board 3 each restart and execute the startup from network. After restarting, single board 1, 2, and 3 each send an IP address request message through network port 12, network port 22, and network port 32 to obtain the IP address required for "start from network" to perform three-layer communication.

[0025] The test switch receives the IP address request message from board 1 through the network port connected to board 1, selects an IP address in the IP address pool corresponding to the receiving network port, carries IP1 in the IP address response message, and sends it through the network port connected to board 1.

[0026] Similarly, the test switch receives IP address request messages from boards 2 and 3, selects IP addresses IP2 and IP3 from the IP address pools of the network ports connected to boards 2 and 3, carries IP2 and IP3 in different IP address response messages, and sends them through the network ports connected to boards 2 and 3, respectively.

[0027] The test switch sends a server address notification message with the IP address of the network boot server and a notification message of the storage location of the test system stored in the network boot server through the respective network ports of single board 1, single board 2, and single board 3.

[0028] exist Figure 2 In the test environment, when the network ports of the test switch connected to boards 1-3 and the network port connected to the network boot server are in different network segments, board 1 determines that the IP addresses of the two devices are in different network segments based on the obtained IP address of the network boot server, and obtains the MAC address of the gateway of the test switch as the gateway through the ARP protocol message. Board 1 generates a test system download message with the storage location of the test system using IP address IP1 as the source IP address and the IP address of the network boot server as the destination IP address, encapsulates the Ethernet header using the gateway MAC address of the test switch as the outer destination MAC address, and sends it to the test switch as the gateway through network port 1. The test switch receives the test system download message, determines to perform three-layer forwarding based on the destination MAC address, obtains the MAC address of the network boot server based on the ARP protocol message, re-encapsulates the source MAC address and destination MAC address of the test system download message, and then sends the test system download message to the network boot server.

[0029] exist Figure 2In the test environment, when the network port of the test switch connected to single board 1-single board 3 and the network port connected to the network boot server are in the same network segment, single board 1 determines that the IP addresses of the two devices are in the same network segment based on the IP address of the network boot server, obtains the MAC address of the network boot server through the ARP protocol message, and encapsulates the Ethernet header of the test system download message with the MAC address of the network boot server as the destination MAC address. After receiving the test system download message, the network boot server transmits the test system to single board 1. Similarly, single board 2 and single board 3 each send a test system download message to the network boot server and receive the test system transmitted by the network boot server. The present application does not limit the method of obtaining the test system through layer 2 forwarding or layer 3 forwarding between the network boot server in the test switch and single board 1-single board 3 of the frame firewall device.

[0030] After receiving the test system, each of the boards 1, 2, and 3 installs the test system in their respective memories. After the three boards install the test system, the test software package is mounted in the separate test directory of the test system of each board. The test systems of the boards 1, 2, and 3 start the Telnet function.

[0031] The test script running in the test host sends an ICMP (Internet Control Message Protocol) Echo request message to the test switch. The test switch connects to the reachable host in the network segment corresponding to the IP address pool of the three network ports of boards 1 to 3 to obtain the IP addresses IP1, IP2 and IP3 assigned to boards 1 to 3 by the test switch.

[0032] The test script of the test host sends a test software installation command to the corresponding telnet window. Board 1, board 2, and board 3 receive the test software package installation command through the Telnet connection respectively, and the test systems of the three boards install the test software packages in the memory.

[0033] The test script of the test host inputs the test instructions in the test software package through the Telnet window of the corresponding single board 1, and then sends the test instructions in the test software package to single board 1 through the Telnet connection, realizing automatic single board testing of the frame-type firewall device, without manually entering the test instructions in the test software package installed on the single board, thereby improving the test efficiency.

[0034] For example, the test script of the test host sends a test of the USB interface read and write speed test through Telnet connection; or, the test host sends a message to single board 1 through Telnet connection to test the PCIE (peripheral component interconnect express) channel between the network card and FPGA of single board 1. The test system installed on single board 1 performs corresponding test processing according to these test instructions.

[0035] Figure 3 A schematic diagram of the single board structure provided in an embodiment of the present application. Figure 3 In the figure, the single board 330 includes a serial port (not shown), a network port (not shown), a network card (not shown), an FPGA chip (not shown), a switching module 331, a processor 332 and a storage unit 333. The processor 332 performs the following operations by running the processor executable instructions in the storage unit 333: receiving a network startup instruction to restart and execute startup from the network; downloading a test system; installing the downloaded test system in the storage unit; wherein a test software package is mounted in a separate test directory of the test system; establishing a Telnet connection and receiving a test software package installation instruction; installing the test software package in the storage unit; receiving a test instruction through a Telnet connection, and executing a test according to the received test instruction.

[0036] The processor 332 executes the download test system by running the processor executable instructions in the storage unit 333, including: obtaining the IP address of the board; obtaining the IP address of the network boot server that stores the test system; obtaining the storage location of the test system in the network boot server; sending a test system download message with the storage location of the test system; the source IP address and destination IP address of the test system download message are the IP address of the board and the IP address of the network boot server respectively.

[0037] The processor 332 obtains the IP address of the board by running the processor executable instructions in the storage unit 333, including: sending an IP address request message to the test switch; receiving an address response message with the IP address of the board; wherein the IP address of the board belongs to the IP address pool corresponding to the port at which the test switch receives the IP address request message.

[0038] The processor 332 executes the processor executable instructions in the storage unit 333 to obtain the IP address of the network boot server of the storage test system, including: receiving a server address notification message sent by the test switch; wherein the server address notification message carries the IP address of the network boot server.

[0039] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for testing a single board, characterized in that: The method comprises: The board receives a network startup instruction from a test host to restart and execute startup from the network; The single board starts downloading the test system from the network server; The single board installs the downloaded test system in the storage unit; wherein the test software package is mounted in the separate test directory of the test system; The single board establishes a Telnet connection with the test host and receives a test software package installation instruction; The board installs the test software package in the storage unit; The single board receives the test instructions in the test software package to be executed through the Telnet connection, and the test system performs the test according to the test instructions; wherein the single board downloads the test system from the network startup server comprises: The board obtains the IP address of the board; The single board obtains the IP address of the network boot server; The single board obtains a storage location in the network boot server where the test system is stored; The single board sends a test system download message with the storage location of the test system to the network server to request the test system in the storage location; the source IP address and the destination IP address of the test system download message are the IP address of the local board and the IP address of the network boot server; The single board receives the test system transmitted by the network server.

2. The method according to claim 1, characterized in that: The board obtaining the IP address includes: The single board sends an IP address request message to the test switch; The single board receives the IP address response message sent by the test switch; wherein the IP address carried in the IP address response message belongs to the IP address pool corresponding to the port of the test switch that receives the IP address request message.

3. The method according to claim 2, characterized in that The board acquiring the IP address of the network boot server means that the board receives a server address notification message sent by the test switch; wherein the server address notification message carries the IP address of the network boot server.

4. A single board, comprising a serial port, a network port, a switching module, a processor and a storage unit, characterized in that ; The processor performs the following operations by running the processor executable instructions in the storage unit: Receive network startup instructions to restart and execute startup from the network; Download the test system; Installing the downloaded test system in a storage unit; wherein a test software package is mounted in a separate test directory of the test system; Establish a Telnet connection and receive the test software package installation instructions; installing the test software package in the storage unit; The test instructions in the test software package to be executed are received through the Telnet connection, and the test system performs the test according to the test instructions; wherein, The processor executes the download test system operation by running the processor executable instructions in the storage unit, including: Get the IP address of this board; Obtaining the IP address of the network boot server; Obtaining a storage location in the network boot server where the test system is stored; Sending a test system download message with the storage location of the test system to the network server to request the test system in the storage location; the source IP address and the destination IP address of the test system download message are the IP address of the local board and the IP address of the network boot server; The test system receives the test information transmitted by the network server.

5. The single board according to claim 4, characterized in that The processor executes the operation of obtaining the IP address of the board by running the processor executable instruction in the storage unit, including: Send an IP address request message to the test switch; An address response message carrying the IP address of the current board is received; wherein the IP address of the current board belongs to the IP address pool corresponding to the port of the test switch that receives the IP address request message.

6. The single board according to claim 5, characterized in that The processor executes the processor executable instructions in the storage unit to obtain the IP address of the network boot server storing the test system, including: receiving a server address notification message sent by the test switch; wherein the server address notification message carries the IP address of the network boot server.