UNI interface marking service test method and device, electronic equipment and storage medium
By controlling Router OS1 and Router OS2 to create VLAN interfaces and DHCP server/client, and enabling bandwidth test server/client functions, the fast and comprehensive testing of the UNI interface communication function of the PON terminal ONU is achieved, solving the problem of testing time and inability to traverse the test in the existing technology.
Patent Information
- Application Number
- CN202411531749.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-14
AI Technical Summary
When testing the support of UNI interface VLAN tag processing rules of the PON terminal ONU, the prior art workload is large, time-consuming, and traversal testing cannot be carried out, which cannot guarantee the basic business requirements of network equipment.
Provides a UNI interface marking service testing method, which automatically conducts communication function testing of UNI interfaces by controlling Router OS1 and Router OS2.
It realizes rapid and comprehensive testing of the UNI interface communication function of the ONU under test, improves the test speed, reduces the test cost, and can traverse and test various VLAN processing rules.
Smart Images

Figure CN119629515A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a UNI interface marking service testing method, device, electronic device and storage medium. Background Art
[0002] The passive optical network system consists of an optical line terminal (OLT), an optical distribution network (ODN) and a passive optical network (PON) terminal, where the PON terminal includes an optical network unit (ONU) and an optical network terminal (ONT).
[0003] With the continuous development of PON product technology, major operators widely use PON products in network deployment, resulting in an increasing number of PON terminal ONUs. At the same time, the services carried by ONUs are becoming more and more abundant, such as the mixed use of multi-port ONU port virtual local area network (VLAN) mode and the support of VLAN ID (virtual network number), including tag addition, removal, conversion, transparent transmission and double-layer tag processing rules. At present, manual traversal testing of UNI interface VLAN tag processing rule support is usually used, which is not only labor-intensive and time-consuming, but also cannot be traversed on devices with mixed multi-port configurations. In addition, most of the existing VLAN test methods focus on connectivity, lack of service testing for each VLAN processing mode, and cannot guarantee the basic service requirements of network equipment. Summary of the invention
[0004] In order to overcome the deficiencies of the prior art, the present invention provides a UNI interface tag service testing method, device, electronic device and storage medium, which automatically and quickly complete the test of the UNI interface communication function of the tested ONU, thereby improving the test speed and reducing the test cost.
[0005] A first aspect of the present application provides a UNI interface marking service testing method, the method comprising: When receiving a test instruction of the UNI interface of the ONU under test, control Router OS1 to create a first VLAN interface and a DHCP server, and enable a bandwidth test server function to obtain a first test result; Control the OLT to register the ONU under test, and send the first VLAN processing rule corresponding to the UNI interface to the ONU under test to obtain a second test result; Controlling the tested ONU to verify the first VLAN processing rule to obtain a third test result; Control Router OS2 to create a second VLAN interface and a DHCP client, and enable the bandwidth test client function to obtain the fourth test result; A test report for the UNI interface is generated based on the first test result, the second test result, the third test result, and the fourth test result.
[0006] In an optional implementation manner, the controlling Router OS1 to create a first VLAN interface and a DHCP server and enable a bandwidth test server function to obtain a first test result includes: Control the Router OS1 to create the first VLAN interface and obtain a first sub-test result; Adding a DHCP network to the DHCP server, and verifying whether the DHCP server correctly configures a first IP address for the DHCP client based on the DHCP network, to obtain a second subtest result; Enable the bandwidth test server function, and perform a bandwidth test on the ONU under test based on the bandwidth test server function to obtain a third sub-test result; The first test result is generated based on the first sub-test result, the second sub-test result, and the third sub-test result.
[0007] In an optional implementation manner, the controlling OLT registers the ONU under test, and sends the first VLAN processing rule corresponding to the UNI interface to the ONU under test, and obtaining the second test result includes: Controlling the OLT to register the ONU under test to obtain a fourth sub-test result; Configuring the VLAN processing rule to the UNI interface to obtain a fifth subtest result; The second test result is generated based on the fourth sub-test result and the fifth sub-test result.
[0008] In an optional embodiment, the method further comprises: Create an IP address pool; Determine the address range of the IP address pool.
[0009] In an optional implementation manner, the controlling Router OS2 to create a second VLAN interface and a DHCP client, and enabling a bandwidth test client function, to obtain a fourth test result includes: Control the Router OS2 to create the second VLAN interface, and obtain a sixth subtest result; Controlling the DHCP client to obtain a second IP address from the DHCP server, and determining whether the second IP address is within the address range, to obtain a seventh subtest result; Enable the bandwidth test client function, and perform a bandwidth test on the ONU under test based on the bandwidth test client function to obtain an eighth sub-test result; The third test result is generated based on the sixth sub-test result, the seventh sub-test result, and the eighth sub-test result.
[0010] In an optional implementation, before controlling Router OS1 to create the first VLAN interface and the DHCP server, the method further includes: When a power-on instruction of a target device is received, the operating status of the target device is obtained, wherein the target device includes the ONU under test and the OLT; Determining whether the target device is operating normally based on the operating status; When it is determined that the target device operates normally, the operation of controlling Router OS1 to create the first VLAN interface and the DHCP server is performed.
[0011] In an optional embodiment, the method further comprises: When receiving a switching instruction of the first VLAN processing rule, determining a second VLAN processing rule corresponding to the switching instruction; Control the ONU under test to verify the second VLAN processing rule.
[0012] A second aspect of the present application provides a UNI interface marking service testing device, the device comprising: The first test module is used to control Router OS1 to create a first VLAN interface and a DHCP server and enable a bandwidth test server function to obtain a first test result when receiving a test instruction of a UNI interface of the ONU under test; The second test module is used to control the OLT to register the ONU under test, and send the first VLAN processing rule corresponding to the UNI interface to the ONU under test to obtain a second test result; A third test module is used to control the ONU under test to verify the first VLAN processing rule to obtain a third test result; The fourth test module is used to control Router OS2 to create a second VLAN interface and a DHCP client, and to enable a bandwidth test client function to obtain a fourth test result; A report generation module is used to generate a test report of the UNI interface based on the first test result, the second test result, the third test result and the fourth test result.
[0013] A third aspect of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the UNI interface marking service testing method when executing the computer program.
[0014] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned UNI interface marking service testing method are implemented.
[0015] In summary, the UNI interface tag service test method, device, electronic device and storage medium provided by the present application, when receiving a test instruction, first control Router OS1 to automatically create a first VLAN interface, and also automatically configure and start the DHCP server to provide an IP address allocation service for the test environment, and turn on the bandwidth test server function to test the network bandwidth performance, control the OLT to register the ONU under test, and after successful registration, the OLT can establish a communication connection with the ONU under test, and automatically send the first VLAN processing rule corresponding to the UNI interface to the ONU under test. After receiving the VLAN processing rule, the ONU under test automatically verifies. Similarly, control Router OS2 to create a second VLAN interface, and configure it as a DHCP client to obtain an IP address from the DHCP server of Router OS1, and Router OS2 also turns on the bandwidth test client function to measure the network bandwidth between the ONU under test. Through the bandwidth test server and client functions between Router OS1 and Router OS2, the bandwidth performance of the ONU under test can be automatically measured, and the UNI interface communication function of the ONU under test can be quickly and comprehensively tested, which not only improves the test speed, but also reduces the test cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a structural diagram of a UNI interface marking service test system shown in an embodiment of the present application; Figure 2 It is a flow chart of a UNI interface marking service testing method shown in an embodiment of the present application; Figure 3 Another flowchart of a UNI interface tag service testing method shown in an embodiment of the present application; Figure 4It is a functional module diagram of a UNI interface marking service testing device shown in an embodiment of the present application; Figure 5 It is a structural schematic diagram of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0018] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interchangeably without conflicting with each other.
[0019] Reference Figure 1 The figure is a schematic diagram of the structure of a UNI interface marking service testing system shown in an embodiment of the present application.
[0020] When it is necessary to test the VLAN processing communication function of the User Network Interface (UNI) of the ONU, it is first necessary to build a test environment, that is, to build a UNI interface tag service test system. The UNI interface tag service test system includes OLT, ONU, a first routing operating system Router OS (1) device (hereinafter referred to as Router OS1) and a first routing operating system Router OS (2) device (hereinafter referred to as Router OS2). Among them, the Router OS1 acts as a server and the Router OS2 acts as a client. Similarly, the Router OS2 can also act as a server, and the Router OS2 acts as a client accordingly. The Router OS1 and Router OS2 can be both physical devices and virtual devices. When Router OS1 and Router OS2 are physical devices, both can be multi-physical interface devices.
[0021] The OLT is connected to the Router OS1 port via a network cable, and is connected to the ONU via an optical fiber jumper and an optical distributor (such as an optical splitter). The ONU is used to convert the optical signal generated by the OLT into an electrical signal, and is also connected to the Router OS2 port via a network cable, and multiple ONUs can be connected to the Router OS2 port at the same time.
[0022] It should be noted that the intensity of the optical signal during transmission needs to be within a specific range to ensure signal quality and communication stability. EPON and GPON have different optical power range requirements, and the industry standards for ONU registration to OLT need to be strictly followed. For example, for EPON, the optical signal strength needs to be between -3dB and -24dB; for GPON, the optical signal strength needs to be between -8dB and -27dB.
[0023] In some embodiments, the UNI interface tag service test system further includes a personal computer (PC) for configuring and managing the OLT, ONU, Router OS1 and Router OS2. The PC is connected to the OLT and ONU via a console cable / network cable, and the PC can also be connected to Router OS1 and Router OS2 via a network cable.
[0024] When the VLAN processing communication of the UNI interface needs to be tested, the telnet client software on the PC is used to remotely log in to Router OS1 and Router OS2, and configure test parameters on Router OS1 and Router OS2. Specifically, the PC can be used to perform Dynamic Host Configuration Protocol (DHCP) server testing, Point-to-Point Protocol Over Ethernet (PPPOE) server testing, and Bandwidth Test server testing methods on Router OS1 to reduce the PC's dependence on the OLT. Similarly, the PC can be used to perform DHCP client testing, PPPOE client testing, and Bandwidth Test client testing methods on Router OS2 to solve the problem that the PC network card cannot directly send VLAN communications.
[0025] Compared with the prior art, the present application implements the testing of the DHCP / PPPOE / Bandwidth Test server and the DHCP / PPPOE / Bandwidth Test client based on RouterOS, without the need for external server equipment and VLAN switches and other hardware equipment, and the testing process is carried out automatically, thereby improving the testing efficiency and reducing the testing cost.
[0026] Reference Figure 2 As shown, it is a flow chart of a UNI interface marking service testing method shown in an embodiment of the present application, and the UNI interface marking service testing method includes the following steps.
[0027] S21, when receiving the test instruction of the UNI interface of the ONU under test, control Router OS1 to create a first VLAN interface and a DHCP server, and enable the bandwidth test server function to obtain a first test result.
[0028] When the VLAN processing communication function of the UNI interface of the ONU under test needs to be tested, the electronic equipment first needs to clarify the VLAN processing rules currently being used by the ONU under test, the VLAN ID of the VLAN interface and the test service. Among them, the VLAN ID, VLAN processing rules and test services are one-to-one corresponding, and are adjusted according to the VLAN processing rules actually tested.
[0029] The ONU under test refers to the test object in the test scenario at the current moment, that is, the ONU device whose VLAN processing communication function of the UNI interface needs to be verified or tested. The VLAN processing rules may include, but are not limited to: marking, adding, removing, converting, transparent transmission and double-layer marking, etc. The test services may include, but are not limited to: DHCP test, PPPOE test and bandwidth test, etc. In addition, the electronic device can determine which VLAN interface it is by obtaining the identification VLAN ID of the VLAN interface. It should be noted that in the embodiments of the present application, the created VLAN interfaces are all virtual interfaces. VLAN interfaces can include single-layer VLAN and double-layer VLAN. Single-layer VLAN and double-layer VLAN are standard technologies, and Router OS devices have built-in technologies that can create single-layer VLAN and double-layer VLAN.
[0030] In an optional implementation manner, the controlling Router OS1 to create a first VLAN interface and a DHCP server and enable a bandwidth test server function to obtain a first test result includes: Control the Router OS1 to create the first VLAN interface and obtain a first sub-test result; Adding a DHCP network to the DHCP server, and verifying whether the DHCP server correctly configures a first IP address for the DHCP client based on the DHCP network, to obtain a second sub-test result; Enable the bandwidth test server function, and perform a bandwidth test on the ONU under test based on the bandwidth test server function to obtain a third sub-test result; The first test result is generated based on the first sub-test result, the second sub-test result, and the third sub-test result.
[0031] Refer to Figure 3 In some embodiments, when a test instruction of the UNI interface of the ONU under test is received, the electronic device can control Router OS1 through the Telnet client so that Router OS1 creates a VLAN interface (referred to as the first VLAN interface), a DHCP server (Dynamic Host Configuration Protocol Server, DHCP Server) and allocates an IP address pool, and turns on the bandwidth test server (Bandwidth Test Server) function, that is, the electronic device can write command line instructions into Router OS1 through the Telnet client, and create the first VLAN interface, DHCP Server, and turn on the Bandwidth Test Server through the command line instructions.
[0032] Specifically, in the command line interface of Router OS1, a VLAN interface is created as the first VLAN interface using the interface / vlan / add command to obtain a first subtest result. When the first subtest result is a test success, that is, when the first VLAN interface is successfully created, the VLAN ID (referred to as the first VLAN ID) of the first VLAN interface is specified based on the physical interface (e.g., Ethernet interface), for example, the first VLAN ID=100, and a VLAN name is specified for the first VLAN interface, for example, the first VLAN interface=VLAN100, for convenience of subsequent management. Then, the electronic device can also use the ip / address / add command to assign an IP address as the first IP address to the first VLAN interface, and set the subnet mask corresponding to the first IP address. For example, the IP address is set to 10.0.100.1 / 24, and the first IP address is specified to be applied to the first VLAN interface. At the same time, the electronic device can also use the ip / pool / add command to create an IP address pool, specify an IP address pool name for the IP address pool, and specify the address range corresponding to the IP address pool. For example, create an IP address pool named VLAN100, and the address range of the IP address pool is 10.0.100.2 to 10.0.100.10.
[0033] Furthermore, the electronic device can use the ip / dhcp-server / network / add command to add the DHCP network to the DHCP server configuration, that is, to create a DHCP server. When the DHCP server successfully configures the DHCP network, it verifies whether the DHCP server can correctly assign IP addresses and related configuration information to the DHCP client, that is, specify the subnet managed by the DHCP server (for example, 10.0.100.0 / 24), and specify the gateway address in the subnet (for example, 10.0.100.1) and the address of the DNS server. For example, the gateway address in the subnet can be used as the address of the DNS server to obtain the second sub-test result. When it is determined that the subnet of the DHCP server is successfully specified, and the gateway address in the subnet and the address of the DNS server are also successfully specified, then the second sub-test result can be determined as a test success, otherwise the second sub-test result is determined as a test failure.
[0034] Finally, the electronic device can start the Bandwidth Test Server and set its corresponding test parameters (for example, test port, test time, etc.) to allow the Telnet client to connect to Router OS1 through a specific telnet protocol to test the bandwidth performance of the Router OS1 network, that is, to perform a speed test on the ONU under test based on the Bandwidth Test Server, that is, to test the uplink and downlink bandwidths between Router OS1 and the ONU under test, and obtain the third sub-test result. In other embodiments, since Router OS1 is connected to one end of the ONU under test, and the other end of the ONU under test is connected to Router OS2, the electronic device can also test the uplink and downlink bandwidths between Router OS1 and Router OS2, and the corresponding test results are still equivalent to the rate of the ONU under test.
[0035] During the test execution, the electronic device can also use the log recording function of Router OS1 to save the operation log to a specified log file or database for subsequent viewing and analysis. That is, the electronic device can obtain the first test sub-result, the second test sub-result, and the third test sub-result in the configuration process based on the operation log, and determine whether the first test result is a test success or a test failure based on the first test sub-result, the second test sub-result, and the third test sub-result. When the first test sub-result, the second test sub-result, and the third test sub-result are all test successes, the electronic device can determine that the first test result is a test success, but if any of the first test sub-result, the second test sub-result, and the third test sub-result is a test failure, the first test result can be determined to be a test failure. When the first test result is a test failure, the electronic device can determine from the operation log what the cause is, whether it is a DHCP server test failure or a Bandwidth Test server test failure.
[0036] To facilitate understanding of the inventive concept of the embodiment of the present application, the present application provides an example of a command line instruction used in an embodiment as follows: Create a VLAN interface with VLAN ID 100: [admin@MikroTik]>interface / vlan / add vlan-id=100 interface=ether2 name= VLAN100; Create a DHCP Server: [admin@MikroTik]>ip / address / add address=10.0.100.1 / 24 interface=VLAN100; [admin@MikroTik]>ip / pool / add name=VLAN100 ranges=10.0.100.2-10.0.100.10; [admin@MikroTik]>ip / dhcp-server / network / add address=10.0.100.0 / 24gateway=10.0.100.1 dns-server=10.0.100.1; Enable Bandwidth Test Server: [admin@MikroTik]>tool / bandwidth-server / set enabled=yes. It should be noted that the above command line instructions are only examples, and the paths and parameters of the command line instructions may vary depending on the version and specific configuration of the Router OS.
[0037] In some embodiments, when the electronic device opens a Telnet client and controls Router OS1 through the Telnet client, the electronic device can use the Telnet command to connect to the IP address of Router OS1. When the connection is successful, based on the identity authentication rules, such as entering the user name and password to log in to the management interface of Router OS1, after successful login, the above-mentioned test operations are allowed to be performed in the management interface of Router OS1.
[0038] Through the above optional implementation, the Router OS1 is controlled to create a VLAN interface and a DHCP server, and the bandwidth test server function is enabled, so as to achieve a comprehensive test of the UNI interface of the ONU under test, which not only improves the automation of the test, but also ensures the accuracy and reliability of the test. By recording the operation log, it is convenient to view and analyze the test results later and quickly locate the problem. In addition, by creating a VLAN interface through Router OS1, an external switch is omitted, which has good flexibility and scalability and can adapt to different test scenarios and requirements.
[0039] In an optional implementation, after the DHCP server test, and / or PPPOE server test and / or Bandwidth Test server test are completed through Router OS1, the electronic device can connect to the OLT device through Console / Telnet, and control the OLT to create 4094 VLAN interfaces, and process all VLAN interfaces based on the VLAN processing rules. For example, when the VLAN processing rule is transparent transmission, all VLAN interfaces are transparently transmitted. Specifically, when the electronic device successfully connects to the OLT device through the Console line or Telnet command, it can perform identity authentication rules, such as logging in to the management interface of the OLT with the administrator username and password, entering the VLAN configuration part through the management interface of the OLT, and creating 4094 VLAN interfaces in turn, specifying a unique VLAN ID for each VLAN interface. In the interface configuration of the OLT, the UNI interface that needs to be transparently transmitted is set to the VLAN transparent transmission mode to ensure that all created VLAN interfaces can be transparently transmitted on the specified port.
[0040] It should be noted that the number of VLAN interfaces is only an example. Since some OLTs may not support setting too many VLAN interfaces, the number of VLAN interfaces is modified according to the actual needs of the test VLAN. In addition, by creating 4094 VLAN interfaces, when the VLAN processing rules are sent and changed, there is no need to reset them.
[0041] S22, controlling the OLT to register the ONU under test, and sending the first VLAN processing rule corresponding to the UNI interface to the ONU under test, to obtain a second test result.
[0042] Refer to Figure 3 In some embodiments, in the management interface of the OLT, find the ONU registration related function under test, trigger the ONU registration process, wait for the ONU to successfully register with the OLT, and obtain the fourth sub-test result. Among them, ONU registration is a standard function of the OLT, but the command of each manufacturer's equipment may be different, which depends on the actual OLT equipment setting.
[0043] When the fourth sub-test result is a successful test, that is, when the tested ONU is successfully registered with the OLT, a stable communication link is established between the OLT and the tested ONU, and the tested ONU can start to receive and send data normally. At this time, the OLT can send configuration information, such as VLAN processing rules, to the tested ONU to obtain the fifth sub-test result. Specifically, in the management interface of the OLT, find the VLAN configuration or port management related functions, select the UNI interface that needs to configure the VLAN processing rules, and after confirming that the configuration information is correct, save and apply the configuration. The OLT can send the configuration information to the UNI interface of the tested ONU. When the VLAN processing rules are successfully sent to the UNI interface, the fifth sub-test result can be determined to be a successful test, otherwise the fifth sub-test result is determined to be a test failure. After receiving the VLAN processing rules (called the first VLAN processing rules) sent by the OLT, the tested ONU will process the received data according to the first VLAN processing rules. Exemplarily, if the first VLAN processing rule is set to pass through the VLAN tag, the ONU under test will forward the received data packet with the VLAN tag to the upper layer device as is; if the first VLAN processing rule is set to strip the VLAN tag, the ONU under test will remove the VLAN tag in the data packet before forwarding it.
[0044] When the ONU under test is successfully registered with the OLT, the OLT can also record the relevant information of the ONU under test, such as the MAC address, ONU-ID, etc., and allocate resources for it. If the fourth sub-test result is a test failure, that is, the registration of the ONU under test fails, the OLT will not be able to identify or manage the ONU under test, and the electronic device can further check the connection, configuration and status between the ONU under test and the OLT to ensure that the ONU registration process can be successfully completed.
[0045] Similarly, during the test execution, the electronic device can also use the log recording function of the OLT to save the operation log to a specified log file or database for subsequent viewing and analysis. That is, the electronic device can obtain the fourth test sub-result and the fifth test sub-result in the configuration process based on the operation log, and determine whether the second test result is a test success or a test failure based on the fourth test sub-result and the fifth test sub-result. When the fourth test sub-result and the fifth test sub-result are both test successes, the electronic device can determine that the second test result is a test success, but whenever any of the fourth test sub-result and the fifth test sub-result is a test failure, the second test result can be determined to be a test failure. When the second test result is a test failure, the electronic device can determine from the operation log what the cause is, whether the ONU under test is not successfully registered, or the VLAN processing rule is not successfully issued.
[0046] Through the above optional implementation, by controlling the OLT to register the ONU under test and issuing VLAN processing rules, accurate configuration and testing of the ONU under test is achieved, which not only ensures that the ONU successfully registers with the OLT and establishes a stable communication link, but also correctly processes the data packet according to the VLAN processing rules. At the same time, by recording the operation log and sub-test results, it is possible to accurately determine whether the test is successful or not, and quickly locate the cause of the failure, thereby improving the test efficiency and accuracy.
[0047] S23, controlling the ONU under test to verify the first VLAN processing rule to obtain a third test result.
[0048] Refer to Figure 3 In some embodiments, the electronic device can be connected to the ONU under test via a console line. When the connection is successful, it can also be based on the identity authentication rules, such as entering the administrator username and password to log in to the management interface of the ONU under test. In the management interface of the ONU under test, the configuration part related to the UNI interface is searched to check whether the first VLAN processing rule issued by the OLT is correctly applied to the UNI interface of the ONU under test. Obtain the third test result. Specifically, the electronic device can navigate to the configuration part related to the UNI interface through the management interface of the ONU under test, and search for configuration items related to the first VLAN processing rule, such as VLAN ID, VLAN tag processing method (such as transparent transmission, stripping, adding, etc.). By checking the configuration items one by one, comparing the VLAN processing rules issued by the OLT with the actual configuration on the UNI interface of the ONU under test, it is determined whether the first VLAN processing rule is configured successfully. When the first VLAN processing rule is consistent with the actual configuration on the UNI interface, it can be determined that the first VLAN processing rule issued by the OLT has been successfully applied to the UNI interface of the ONU under test, and the third test result is recorded as a successful test. When the first VLAN processing rule is inconsistent with the actual configuration on the UNI interface, it can be determined that the third test result is a test failure.
[0049] It should be noted that detecting the ONU configuration is to verify whether the OLT is successfully sent, and is also a prerequisite for subsequent execution of other test services. If the third test result is a test failure, there is no need to continue to execute other tests.
[0050] Similarly, during the test, the electronic device can also use the log recording function of the tested ONU to save the operation log to a specified log file or database for subsequent viewing and analysis. That is, the electronic device can obtain the third test result in the configuration process based on the operation log.
[0051] Through the above optional implementation method, the ONU under test is connected through the Console line, and the VLAN processing rules issued by the OLT are automatically checked to see whether they are successfully applied to the UNI interface of the ONU, so as to timely discover configuration errors, ensure the normal operation of the network, reduce the useless work of subsequent tests, and improve the test efficiency and the accuracy of network configuration.
[0052] S24, controlling Router OS2 to create a second VLAN interface and a DHCP client, and enabling a bandwidth test client function, to obtain a fourth test result.
[0053] Refer to Figure 3 In some embodiments, the electronic device first controls RouterOS2 through a Telnet client so that Router OS2 creates a VLAN interface (referred to as a second VLAN interface), a DHCP client (Dynamic Host Configuration Protocol Client, DHCP Client), allocates an IP address pool, and enables a bandwidth test client (Bandwidth Test Client) function, that is, the electronic device can write command line instructions into Router OS2 through a Telnet client, and create a second VLAN interface, a DHCP Client, and enable the Bandwidth Test Client through command line instructions.
[0054] Specifically, in the command line interface of Router OS2, use the interface / vlan / add command to create a new VLAN interface as the second VLAN interface, and obtain the sixth sub-test result. When the sixth sub-test result is a test success, that is, when the second VLAN interface is successfully created, the VLAN ID (called the second VLAN ID) of the second VLAN interface is specified based on the physical interface (for example, the Ethernet interface), for example, the second VLAN ID=100, and a VLAN name is specified for the second VLAN interface, for example, VLAN100, to facilitate subsequent management.
[0055] Next, the electronic device can use the ip / dhcp-client / add command to configure a DHCP client on the created second VLAN interface, that is, to create a DHCP client. Specifically, the DHCP network is added to the DHCP client configuration, and the DHCP client can try to obtain the IP address configuration from the DHCP server on the DHCP network, that is, the second VLAN interface and the DHCP client are bound to specify that the DHCP client runs on the second VLAN interface.
[0056] To facilitate understanding of the inventive concept of the embodiment of the present application, the present application provides an example of a command line instruction used in an embodiment as follows: Create a VLAN interface with VLAN ID 100: [admin@MikroTik]>interface / vlan / add vlan-id=100 interface=ether2 name= VLAN100; Create a DHCP Client: [admin@MikroTik]>ip / dhcp-client / add interface=VLAN100.
[0057] Further, the electronic device can query the DHCP client status on the second VLAN interface by using the ip / dhcp-client / print command and specifying the from parameter. After the command is executed, Router OS2 can return one or more records, each of which represents the status of a DHCP client, including the interface name where the DHCP client is located, whether the DHCP client uses the DNS server address obtained from the DHCP server, whether the DHCP client adds a default route through DHCP, etc., and judges whether it has been bound according to the current status of the DHCP client. If so, it means that the IP address (called the second IP address) and its subnet mask have been successfully obtained. Then verify whether the second IP address is assigned by Router OS1, that is, whether the second IP address exists in the IP address pool set in the Router OS1 device, and obtain the seventh subtest result. Specifically, the electronic device can log in to the CLI of Router OS1, use the ip / pool / print command to view the address pool configuration of the DHCP server, and check whether the IP range in the IP address pool contains the second IP address. If 10.0.100.2 is within the IP address pool of Router OS1, it can be confirmed that the second IP address is allocated by Router OS1, and the seventh subtest result is recorded as a success. If it is not within the IP address pool, there may be a configuration error, address conflict, or other network problems, and the seventh subtest result is recorded as a failure.
[0058] To facilitate understanding of the inventive concept of the embodiment of the present application, the present application provides an example of a command line instruction used in an embodiment as follows: [admin@MikroTik]>ip / dhcp-client / print from=VLAN100; Flags: X - disabled, I - invalid, D - dynamic; # INTERFACE USE-PEER-DNS ADD-DEFAULT-ROUTE STATUSADDRESS 0VLAN100yesyesbONUd10.0.100.2 / 24. When the read second IP address exists in the IP address pool, the electronic device can turn on the Bandwidth Test Client function in Router OS2, set the test time (for example, 10 seconds), and perform a bandwidth test on the ONU under test based on the test time to obtain the eighth sub-test result. Among them, the bandwidth test can include an upstream bandwidth (bandwidth from the ONU under test to Router OS2) test, and a downstream (that is, the bandwidth from Router OS2 to the ONU under test) test. After the command is executed, Router OS2 can display a series of test results, including: the test has been completed, the actual test time, the upstream bandwidth at the current moment, the average upstream bandwidth during the test time, the total average upstream bandwidth, the downstream bandwidth at the current moment, the average downstream bandwidth during the test time, the total average downstream bandwidth, the number of lost data packets, whether to use random data for testing, the direction of the test, the size of the sent and received data packets, the number of connections used during the test, and the CPU load percentage of the local and remote devices, etc.
[0059] To facilitate understanding of the inventive concept of the embodiment of the present application, the present application provides an example of a command line instruction used in an embodiment as follows: [admin@MikroTik]>tool / bandwidth-test address=10.0.100.1 user=adminpassword=admin direction=both duration=10; status: done testing; duration: 11s; tx-current: 58.3Mbps; tx-10-second-average: 60.9Mbps; tx-total-average: 60.9Mbps; rx-current: 95.5Mbps; rx-10-second-average: 95.2Mbps; rx-total-average: 94.5Mbps; lost-packets: 757; random-data: no; direction: both; tx-size: 1500; rx-size: 1500; connection-cONUt: 20; local-cpu-load: 100%; remote-cpu-load: 19%. Further, the electronic device can determine whether the eighth test result is a test success or a test failure based on the test result of the bandwidth test. Specifically, the electronic device can pre-set a standard threshold, compare the test parameters in the test result with the standard threshold, and if both meet the standard threshold, record the eighth sub-test result as a test success, otherwise record the eighth sub-test result as a test failure. For example, when the test parameter is the actual test time, the actual test time is compared with the standard threshold (corresponding to the pre-set test time, assumed to be 10s). When the actual test time is greater than 10s, the eighth sub-test result may be recorded as a test failure due to processing delays. Assuming that the test parameter is the average downstream bandwidth, the corresponding standard threshold is 80Mbps. When the average downstream bandwidth is less than 80Mbps, the eighth sub-test result is recorded as a test failure.
[0060] Similarly, during the test execution, the electronic device can also use the logging function of Router OS2 to save the operation log to a specified log file or database for subsequent viewing and analysis. That is, the electronic device can obtain the sixth test sub-result, the seventh test sub-result, and the eighth test sub-result in the configuration process based on the operation log, and determine whether the third test result is a test success or a test failure based on the sixth test sub-result, the seventh test sub-result, and the eighth test sub-result. When the sixth test sub-result, the seventh test sub-result, and the eighth test sub-result are all test successes, the electronic device can determine that the third test result is a test success, but if any of the sixth test sub-result, the seventh test sub-result, and the eighth test sub-result is a test failure, the third test result can be determined to be a test failure. When the third test result is a test failure, the electronic device can determine from the operation log what the cause is, whether it is a DHCP client test failure or a Bandwidth Test client test failure.
[0061] Through the above optional implementation, by controlling Router OS2 to create a VLAN interface and a DHCP client, and opening the bandwidth test client function, a comprehensive test of the ONU under test is achieved, which not only improves the automation and accuracy of the test, but also enhances the traceability of the test through the logging function. Similarly, by creating a VLAN interface through Router OS2, an external switch is omitted, which has good flexibility and scalability and can adapt to different test scenarios and requirements.
[0062] S25: Generate a test report for the UNI interface based on the first test result, the second test result, the third test result, and the fourth test result.
[0063] Refer to Figure 3 In some embodiments, during the test process, the electronic devices all use a telnet client to record the commands executed during the test process, determine the test results of each test process, and record the test results as test success or test failure to generate a test report.
[0064] When the test is completed, the electronic device can generate a test report of the UNI interface of the tested ONU according to the collated test results, including the first test result, the second test result, the third test result and the fourth test result. The test report may include contents such as the test purpose, the test environment, the test steps and the test results. Then, the electronic device can also save the test report to the test system for the test personnel to review and analyze.
[0065] In an optional implementation, before controlling Router OS1 to create the first VLAN interface and the DHCP server, the method further includes: When a power-on instruction of a target device is received, the operating status of the target device is obtained, wherein the target device includes the ONU under test and the OLT; Determining whether the target device is operating normally based on the operating status; When it is determined that the target device operates normally, the operation of controlling Router OS1 to create the first VLAN interface and the DHCP server is performed.
[0066] Refer to Figure 3In some embodiments, before testing the VLAN communication processing of the UNI interface of the ONU under test, it is first necessary to confirm whether the communication connection between the devices is established, and each device (e.g., the ONU under test, OLT, etc.) is powered on and operating normally. If there is a fault or anomaly in the device, the test result is likely to be disturbed, resulting in test failure or inaccurate results, which will not only waste test resources, but also mislead subsequent troubleshooting and repair work. Therefore, it is first necessary to ensure that the necessary physical cables, such as network cables, optical fibers, etc., meet the required specifications and standards and can be used normally. When Router OS1 is a physical device, insert one end of the network cable into the Ethernet port of Router OS1, ensure that it is plugged in and fixed, and connect the other end of the network cable to the corresponding Ethernet port of the OLT device, and also ensure that the connection is firm. Similarly, when Router OS2 is a physical device and needs to be connected to the OLT device, repeat the above steps to ensure that all network cables are correctly connected. Similarly, insert one end of the optical fiber into the optical fiber output port of the OLT device, ensure that the optical fiber connector is clean, dust-free, and correctly aligned with the port, and connect the other end of the optical fiber to the optical fiber input port of the ONU device under test, ensuring that the connection is firm and not loose. After completing all physical connections, carefully check each connection point to ensure that there are no loose or damaged ports and cables. Next, check whether the power cord and power plug of each device (OLT, ONU, Router OS, etc.) are intact, and ensure that each device is correctly inserted into the power port of the device so that each device has a stable power supply. By turning on the power, check the operating status of each device through the electronic device to ensure that each device is started and running normally. In addition, after the device is started, the electronic device can perform initialization on each device to further maintain the stable operation of the device.
[0067] When it is determined that each device is working properly, the electronic device continues to perform the test. If any device does not work properly, the test is stopped to avoid the test result generated in the subsequent test process being that the test failure is caused by abnormal operation of the device.
[0068] Through the above optional implementation, by checking the physical connection, power supply and device status, the normal connection and operation of the device before testing are ensured, which effectively avoids test failures due to device abnormalities and improves the accuracy and reliability of the test.
[0069] In an optional embodiment, the method further comprises: When receiving a switching instruction of the first VLAN processing rule, determining a second VLAN processing rule corresponding to the switching instruction; Control the ONU under test to verify the second VLAN processing rule.
[0070] In some embodiments, the electronic device can switch the UNI interface VLAN processing rule issued by the OLT through the management interface or command line tool of the OLT, and the switched VLAN processing rule is referred to as the second VLAN processing rule. Then, the electronic device can verify the communication status of the first VLAN interface through Router OS1 based on the same implementation method of step S23, and verify whether the second VLAN processing rule works as expected. And verify the communication status of the second VLAN interface through Router OS1, and verify whether the second VLAN processing rule works as expected. Similarly, the electronic device can continuously adjust the VLAN processing rule of the OLT to traverse each VLAN processing rule of the UNI interface and perform repeated tests.
[0071] In some embodiments, the electronic device may also modify the VLAN ID (single layer / double layer) corresponding to the VLAN interface in the Router OS, and implement the VLAN processing rules for traversing the UNI interface according to the same embodiment as above.
[0072] In some embodiments, when there are multiple UNI interfaces in the ONU under test, the electronic device can still be connected to the ONU under test through Router OS1 and Router OS2 according to the same embodiment as the above, so that the electronic device can control Router OS1 and Router OS2, and repeat the above steps to realize the traversal of the VLAN processing rules of multiple UNI interfaces in the ONU under test, as well as the multi-port mixed rule test. Specifically, a VLAN interface is created for each UNI interface in Router OS1 and Router OS2, and the corresponding VLAN ID (single-layer VLAN or double-layer VLAN) is set to ensure that the VLAN interface configuration of Router OS1 and Router OS2 matches the VLAN processing rules of the UNI interface of the ONU under test. As with the single UNI interface test, the VLAN processing rules of the UNI interface issued by the OLT are switched through the management interface or command line tool of the OLT, and the communication status of each VLAN interface is verified through Router OS2, and it is verified whether the multiple UNI interfaces of the ONU under test process the VLAN tags according to the VLAN processing rules.
[0073] To facilitate understanding of the inventive concept of the embodiment of the present application, the present application provides an example of a command line instruction used in an embodiment as follows: The VLAN ID of the custom VLAN interface includes a single-layer VLAN and a double-layer VLAN: Single-layer VLAN: [admin@MikroTik]>interface / vlan / add vlan-id=100 interface=ether2 name= VLAN100; Double-layer VLAN (inner VLAN ID 200): [admin@MikroTik]>interface / vlan / add vlan-id=200 interface=VLAN100name=VLAN100_200. In some embodiments, when there are multiple UNI interfaces, the electronic device can also configure different VLAN processing rules for each UNI interface through the management interface or command line tool of the OLT, and perform multi-port mixed rule testing, that is, test different VLAN processing rule combinations on different UNI interfaces at the same time. During the test, the electronic device can adjust the VLAN interface configuration of Router OS1 and Router OS2, the VLAN processing rules of the OLT, or the UNI interface configuration of the ONU, and repeat the test.
[0074] Through the above optional implementation, by controlling the ONU to verify the VLAN processing rules, the traversal test of the ONU's VLAN processing rules is realized. At the same time, it supports the test of multiple UNI interfaces and the test of multi-port mixed rules, which improves the flexibility and comprehensiveness of the test. By constantly adjusting the configuration and repeating the test, it is ensured that the ONU processes the VLAN tag according to the expected VLAN processing rules.
[0075] In an optional implementation, the electronic device can switch DHCP to PPPOE mode, perform speed measurement after dialing, or verify DHCP and PPPOE at the same time. According to the same implementation method as the above-mentioned DHCP test, the electronic device can configure a PPPOE server and a PPPOE client in Router OS1 and Router OS2 to ensure that the PPPOE dial-up process can be successfully completed. After the dial-up is successful, use the Bandwidth Test Client function to perform a bandwidth test and record the test results of the bandwidth test. In addition, the electronic device can also switch or perform a PING test at the same time, for example, using the PING command to test the connectivity of a certain IP address, specify which VLAN interface to use, send an ICMP request packet, etc.
[0076] To facilitate understanding of the inventive concept of the embodiment of the present application, the present application provides an example of a command line instruction used in an embodiment as follows: PPPOE Server: [admin@MikroTik]>ppp / profile / add name=VLAN100 local-address=10.0.100.1 remote-address=VLAN100; [admin@MikroTik]>ppp / secret / add name=VLAN100_TEST password=123456profile=VLAN100 service=pppoe; [admin@MikroTik]>interface / pppoe-server / server / add service-name=VLAN100 interface=VLAN100 default-profile=VLAN100 ; PPPOE Client: [admin@MikroTik]>interface / pppoe-server / server / add service-name=VLAN100 interface=VLAN100 default-profile=VLAN100; PING: [admin@MikroTik]>tool / ping address=www.baidu.com interface=vlan5cONUt=4; 0 183.2.172.1855653 19ms62us 1 183.2.172.1855653 17ms734us 2 183.2.172.1855653 18ms70us 3 183.2.172.1855653 18ms67us sent=4 received=4 packet-loss=0% min-rtt=17ms734us avg-rtt=18ms233usmax-rtt=19ms62us. In some embodiments, when Router OS1 or Router OS2 is connected to the external network, the electronic device can also use PING to complete the DNS function verification. Specifically, a network card is configured on Router OS1 and Router OS2 to connect to the external network. In the configuration interface of Router OS1 and Router OS2, query and configure the network card to obtain an IP address that can access the Internet, and then use the PING command to test the connectivity with the external network IP address. If it can be pinged, it can be determined that Router OS1 and Router OS2 have successfully connected to the external network. Further, configure the DNS service on Router OS1 and Router OS2, which can be either a public DNS server or the address of an internal DNS server, and then use the PING command to test the DNS resolution function, for example, enter a domain name and check whether it can be correctly resolved to an IP address.
[0077] Through the above optional implementation, by allowing switching between DHCP and PPPOE, or verifying both methods at the same time, it is possible to adapt to different network environment requirements, improve the flexibility of network configuration and compatibility with different network protocols. Similarly, using the PING test to verify the connectivity of the network can ensure that data packets can be correctly transmitted in the network, timely discover and solve network faults, and improve the stability and reliability of the network.
[0078] Reference Figure 4 , which is a functional module diagram of the UNI interface marking service testing device shown in an embodiment of the present application.
[0079] In some embodiments, the UNI interface tag service test device 40 may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments of the UNI interface tag service test device 40 may be stored in a memory of an electronic device and executed by at least one processor to perform (see Figure 1 Description) UNI interface marking service test function.
[0080] According to the functions performed, it can be divided into multiple functional modules. The functional modules may include: a first test module 401, a second test module 402, a third test module 403, a fourth test module 404, a report generation module 405 and a processing module 406. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0081] The first test module 401 is used to control Router OS1 to create a first VLAN interface and a DHCP server and enable the bandwidth test server function to obtain a first test result when receiving a test instruction of the UNI interface of the ONU under test.
[0082] The second test module 402 is used to control the OLT to register the ONU under test, and send the first VLAN processing rule corresponding to the UNI interface to the ONU under test to obtain a second test result.
[0083] The third test module 403 is used to control the ONU under test to verify the first VLAN processing rule to obtain a third test result.
[0084] The fourth test module 404 is used to control Router OS2 to create a second VLAN interface and a DHCP client, and enable the bandwidth test client function to obtain a fourth test result.
[0085] The report generating module 405 is used to generate a test report of the UNI interface based on the first test result, the second test result, the third test result and the fourth test result.
[0086] The first test module 401 is further specifically used to: control the Router OS1 to create the first VLAN interface to obtain a first sub-test result; add a DHCP network to the DHCP server, and verify whether the DHCP server correctly configures the first IP address for the DHCP client based on the DHCP network to obtain a second sub-test result; enable the bandwidth test server function, and perform a bandwidth test on the ONU under test based on the bandwidth test server function to obtain a third sub-test result; generate the first test result based on the first sub-test result, the second sub-test result and the third sub-test result.
[0087] The second test module 402 is further specifically used to: control the OLT to register the ONU under test to obtain a fourth sub-test result; configure the VLAN processing rule to the UNI interface to obtain a fifth sub-test result; and generate the second test result based on the fourth sub-test result and the fifth sub-test result.
[0088] The processing module 406 is used to: create an IP address pool; and determine the address range of the IP address pool.
[0089] The fourth test module 404 is further specifically used to: control the Router OS2 to create the second VLAN interface to obtain a sixth sub-test result; control the DHCP client to obtain a second IP address from the DHCP server, and determine whether the second IP address is within the address range to obtain a seventh sub-test result; enable the bandwidth test client function, and perform a bandwidth test on the ONU under test based on the bandwidth test client function to obtain an eighth sub-test result; and generate the third test result based on the sixth sub-test result, the seventh sub-test result, and the eighth sub-test result.
[0090] The processing module 406 is further used for: when receiving a power-on instruction of a target device, obtaining the operating status of the target device, the target device including the ONU under test and the OLT; judging whether the target device is operating normally based on the operating status; and when it is determined that the target device is operating normally, executing the operation of controlling Router OS1 to create a first VLAN interface and a DHCP server.
[0091] The processing module 406 is further configured to: when receiving a switching instruction of the first VLAN processing rule, determine a second VLAN processing rule corresponding to the switching instruction; and control the ONU under test to verify the second VLAN processing rule.
[0092] It should be understood that the various variations and specific embodiments of the UNI interface marking service testing method provided in the above-mentioned embodiment are also applicable to the UNI interface marking service testing device of the present embodiment. Through the above-mentioned detailed description of the UNI interface marking service testing method, those skilled in the art can clearly know the implementation method of the UNI interface marking service testing device in the present embodiment. For the sake of brevity of the specification, it will not be described in detail here.
[0093] See also Figure 5 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. In a preferred embodiment of the present application, the electronic device 5 includes a memory 51 , at least one processor 52 and at least one communication bus 53 .
[0094] Those skilled in the art should understand that Figure 5 The structure of the electronic device shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The electronic device 5 may also include more or less other hardware or software than shown in the figure, or a different component arrangement.
[0095] In some embodiments, the electronic device 5 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The electronic device 53 may also include user equipment, which includes but is not limited to any electronic product that can interact with a user through a keyboard, mouse, remote control, touchpad, or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc.
[0096] In the above embodiments provided in the present application, it should be understood that the disclosed methods, devices, computer-readable storage media, and electronic devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or components or modules, which can be electrical, mechanical or other forms.
[0097] The components described as separate components may or may not be physically separated, and the components shown as components may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the components may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each component may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0099] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0100] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0101] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0102] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A UNI interface marking service testing method, characterized in that: The method comprises: When receiving a test instruction of the UNI interface of the ONU under test, control Router OS1 to create a first VLAN interface and a DHCP server, and enable a bandwidth test server function to obtain a first test result; Control the OLT to register the ONU under test, and send the first VLAN processing rule corresponding to the UNI interface to the ONU under test to obtain a second test result; Controlling the tested ONU to verify the first VLAN processing rule to obtain a third test result; Control Router OS2 to create a second VLAN interface and a DHCP client, and enable the bandwidth test client function to obtain the fourth test result; A test report for the UNI interface is generated based on the first test result, the second test result, the third test result, and the fourth test result.
2. The UNI interface marking service testing method according to claim 1, characterized in that: The controlling of RouterOS1 to create a first VLAN interface and a DHCP server, and to enable the bandwidth test server function, to obtain a first test result includes: Control the Router OS1 to create the first VLAN interface and obtain a first sub-test result; Adding a DHCP network to the DHCP server, and verifying whether the DHCP server correctly configures a first IP address for the DHCP client based on the DHCP network, to obtain a second subtest result; Enable the bandwidth test server function, and perform a bandwidth test on the ONU under test based on the bandwidth test server function to obtain a third sub-test result; The first test result is generated based on the first sub-test result, the second sub-test result, and the third sub-test result.
3. The UNI interface tag service testing method according to claim 1, characterized in that: The controlling OLT registers the ONU under test, and sends the first VLAN processing rule corresponding to the UNI interface to the ONU under test, and obtaining the second test result includes: Controlling the OLT to register the ONU under test to obtain a fourth sub-test result; Configuring the VLAN processing rule to the UNI interface to obtain a fifth subtest result; The second test result is generated based on the fourth sub-test result and the fifth sub-test result.
4. The UNI interface tag service testing method according to claim 2, characterized in that: The method further comprises: Create an IP address pool; Determine the address range of the IP address pool.
5. The UNI interface tag service testing method according to claim 4, characterized in that: The control of RouterOS2 to create a second VLAN interface and a DHCP client, and to enable the bandwidth test client function, obtains a fourth test result including: Control the Router OS2 to create the second VLAN interface, and obtain a sixth subtest result; Controlling the DHCP client to obtain a second IP address from the DHCP server, and determining whether the second IP address is within the address range, to obtain a seventh subtest result; Enable the bandwidth test client function, and perform a bandwidth test on the ONU under test based on the bandwidth test client function to obtain an eighth sub-test result; The third test result is generated based on the sixth sub-test result, the seventh sub-test result, and the eighth sub-test result.
6. The UNI interface tag service testing method according to claim 1, characterized in that: Before controlling RouterOS1 to create the first VLAN interface and the DHCP server, the method further includes: When a power-on instruction of a target device is received, the operating status of the target device is obtained, wherein the target device includes the ONU under test and the OLT; Determining whether the target device is operating normally based on the operating status; When it is determined that the target device operates normally, the operation of controlling Router OS1 to create the first VLAN interface and the DHCP server is performed.
7. The UNI interface tag service testing method according to any one of claims 1 to 6, characterized in that: The method further comprises: When receiving a switching instruction of the first VLAN processing rule, determining a second VLAN processing rule corresponding to the switching instruction; Control the ONU under test to verify the second VLAN processing rule.
8. A UNI interface marking service testing device, characterized in that: The device comprises: The first test module is used to control Router OS1 to create a first VLAN interface and a DHCP server and enable a bandwidth test server function to obtain a first test result when receiving a test instruction of a UNI interface of the ONU under test; The second test module is used to control the OLT to register the ONU under test, and send the first VLAN processing rule corresponding to the UNI interface to the ONU under test to obtain a second test result; A third test module is used to control the ONU under test to verify the first VLAN processing rule to obtain a third test result; The fourth test module is used to control Router OS2 to create a second VLAN interface and a DHCP client, and to enable a bandwidth test client function to obtain a fourth test result; A report generation module is used to generate a test report of the UNI interface based on the first test result, the second test result, the third test result and the fourth test result.
9. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the UNI interface marking service testing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the UNI interface marking service testing method described in any one of claims 1 to 7 are implemented.