Network special area test method based on OSPF protocol

By automatically configuring the switch and obtaining the routing table, the problem of low efficiency in functional testing of special areas of OSPF networks is solved, and comprehensive and accurate test results are achieved.

CN120602376APending Publication Date: 2025-09-05HANGZHOU ULIP XINCHUANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511029517.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-25
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

In the prior art, the special area functional testing of OSPF networks is inefficient and easy to miss, and manual testing is difficult to fully cover the functional branches of various special areas.

Method used

Provide a network special area testing method based on OSPF protocol. Using the switch control module and communication module in the test equipment, it automatically configures the switch and sends detection messages, obtains the routing table, determines that the communication and routing tables between switches meet preset requirements, and obtains the switch's routing table through the switch control module to determine whether it meets the expected results of the special area.

Benefits of technology

The special area function of automated testing of the OSPF network is realized, which improves the testing efficiency, ensures the comprehensiveness and accuracy of the test, and reduces omissions in manual testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602376A_ABST
    Figure CN120602376A_ABST
Patent Text Reader

Abstract

The invention discloses a network special area test method based on an OSPF protocol, and the method comprises the steps: configuring a first switch and a second switch in a to-be-tested network as switches in a backbone network through employing a switch control module, and configuring a third switch as a switch in a non-backbone network; sending a detection message from the first switch to a third switch by using a communication module; determining that the communication module can receive a response message corresponding to the third switch from the first switch and a routing table of the first switch and the third switch meets a first preset requirement; a second switch and a third switch are configured as switches of a special area, and the second switch is an area boundary router; and determining whether the routing table of the third switch accords with a corresponding expected result, and if not, determining that the function of the special area of the to-be-tested network is abnormal. Whether the function of the special area of the network is normal or not can be automatically tested, and the testing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network function testing, and in particular to a network special area testing method based on the OSPF protocol. Background Art

[0002] With the annual increase in the number of online users, surfing the internet has become a common part of daily life. The increasing number of electronic devices has also led to a corresponding increase in the number of switches. When networking a large number of switches, ensuring their proper functionality and performance is crucial. OSPF (Open Shortest Path First), a commonly used Layer 3 dynamic routing protocol, controls routing dynamic forwarding, offering high fault tolerance instead of static routing configurations, thus reducing maintenance costs. Special areas in OSPF networks can accommodate switches with lower performance, reducing the load on device routing tables and lowering costs in edge areas, making them highly practical. However, due to the complex functionalities of special areas in OSPF networks, manual testing of their functionality is inevitably prone to omissions and is relatively inefficient. Summary of the Invention

[0003] The purpose of this application is to provide a network special area testing method based on the OSPF protocol, which can automatically test whether the functions of the special areas of the OSPF network are normal.

[0004] To achieve the above objectives, the present application provides a method for testing a special area of ​​a network based on the OSPF protocol, comprising: S1, providing a test device, wherein the test device includes a switch control module and a communication module; S2, using the switch control module to configure the first switch and the second switch in the network to be tested as switches in the backbone network of the network to be tested, and to configure the third switch as a switch in the non-backbone network of the network to be tested, wherein the first switch, the second switch, and the third switch are sequentially signal-connected; S3: Using the communication module to send a detection message from the first switch to the third switch, and using the switch control module to obtain routing tables of the first switch and the third switch; S4, determining whether the communication module can receive a response message corresponding to the third switch from the first switch, and whether the routing tables of the first switch and the third switch meet a first preset requirement. If so, executing step S5; S5, configuring the second switch and the third switch as switches in a special area, wherein the second switch is an area border router of the special area; S6. Obtain the routing table of the third switch using the switch control module, and determine whether the routing table of the third switch meets the expected result corresponding to the special area. If not, the function of the special area of ​​the network under test is abnormal.

[0005] Optionally, the first preset requirement includes that the routing table of the first switch includes the route of the third switch, and the routing table of the third switch includes a routing table entry corresponding to the network segment of the backbone network and a routing table entry corresponding to the first switch.

[0006] Optionally, the special area includes a stub area, and the expected result corresponding to the stub area includes that a routing table entry corresponding to the first switch does not exist in the routing table of the third switch, and a default routing entry in the routing table of the third switch points to the second switch.

[0007] Optionally, the special area includes a completely stub area, and the expected result corresponding to the completely stub area includes that a routing table entry corresponding to the first switch and a routing table entry corresponding to the network segment of the backbone network do not exist in the routing table of the third switch, and a default routing entry in the routing table of the third switch points to the second switch.

[0008] Optionally, the special area includes a non-pure stub area, and the expected result corresponding to the non-pure stub area includes that the routing table of the third switch does not contain a routing table entry corresponding to the first switch, but contains a routing table entry corresponding to the network segment of the backbone network, and the default routing entry in the routing table of the third switch does not point to the second switch.

[0009] Optionally, the special area includes a completely non-pure stub area, and the expected result corresponding to the completely non-pure stub area includes that a routing table entry corresponding to the first switch and a routing table entry corresponding to the network segment of the backbone network do not exist in the routing table of the third switch, and a default routing entry in the routing table of the third switch points to the second switch.

[0010] Optionally, determining whether the routing table of the third switch meets the corresponding expected result further includes: If yes, proceed to step S7; The network special area testing method further includes: S7, confirm whether the test of all types of the special areas is completed. If not, configure the second switch and the third switch as switches in another special area without duplication, and configure the second switch as an area border router of the special area, and execute step S6.

[0011] Optionally, the step of confirming whether all types of tests on the special areas are completed further comprises: If so, it is determined that the function of the special area of ​​the network to be tested is normal.

[0012] Optionally, the testing device further includes a recording module; If it is determined that the function of the special area of ​​the network to be tested is normal, the test result is recorded by using the recording module.

[0013] Optionally, the testing device further includes a content filtering module; The content filtering module is configured to filter the content of the routing table of the first switch to confirm whether there is a routing table entry corresponding to the third switch in the routing table of the first switch; Optionally, the testing device further includes a content filtering module; The content filtering module is configured to filter the content of the routing table of the third switch to confirm whether the routing table of the third switch contains a routing entry corresponding to the first switch and a routing entry corresponding to the network segment of the backbone network.

[0014] The present application configures the first switch as a switch in the backbone network of the second switch network, and configures the third switch as a switch in the non-backbone network of the network to be tested, and uses the communication module to send a detection message from the first switch to the third switch, and uses the switch control module to obtain the routing tables of the first switch and the third switch to test whether the first switch and the third switch can communicate normally when they are in different network areas. If so, the second switch and the third switch are configured as switches in a special area, wherein the second switch is the area boundary router of the special area, and the switch control module is used to obtain the routing table of the third switch, and determine whether the routing table of the third switch meets the expected result corresponding to the special area. If not, the function of the special area of ​​the network to be tested is abnormal. The present application can use the test equipment to automatically test whether the function of the special area of ​​the network to be tested is normal by executing the above steps, which is conducive to improving the test efficiency of the function of the special area of ​​the network to be tested. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a flow chart of a network special area testing method based on the OSPF protocol according to an embodiment of the present application.

[0016] Figure 2 This is a schematic diagram of the structure of the test equipment of the embodiment of the present application.

[0017] Figure 3 This is a partial flow chart of the network special area testing method based on the OSPF protocol according to an embodiment of the present application. DETAILED DESCRIPTION

[0018] In order to explain the technical content, structural features, achieved objectives and effects of this application in detail, the following is a detailed description in conjunction with the implementation methods and the accompanying drawings.

[0019] Networks built using the OSPF protocol are divided into backbone networks (the corresponding network area is often represented as Area 0) and non-backbone networks (the corresponding network area can be represented as Area 1). Non-backbone networks are also called "other areas" and include standard areas and special areas. Special areas include the following: Stub Area. Only intra-area routes and default routes (Type 3 LSAs) are advertised; external routes are prohibited. Default routes are advertised through the Area Border Router (ABR) to maintain reachability to external networks.

[0020] Totally Stub Area: This area imposes further restrictions on the Stub Area, allowing only intra-area routes to be advertised and prohibiting the advertisement of any external routes (including Type 3 / 4 LSAs).

[0021] Non-stub area (NSSA). A non-stub area can import external routes, but the import method is Type 7. By default, these routes are propagated only within the non-stub area. To propagate them to other areas, the ABR must set the P-bit of the route to 1. This allows the ABR to convert the Type 7 LSA (Link State Advertisement) into a Type 5 LSA and propagate them to other areas. Type 3 LSAs from other areas are also allowed to enter the ABR. The ABR does not distribute default routes by default, but the distribution of default routes can be manually controlled.

[0022] Totally Non-Stub Area (Totally NSSA): This area differs from the previous areas in that it does not allow Type 3 LSAs to enter it, and the ABR delivers the default route by default.

[0023] It can be seen that the special areas in the network built based on the OSPF protocol have many branches and complex functions, and the efficiency of manually testing whether the functions of the special areas are normal is low.

[0024] For this, see Figure 1 and Figure 2 This application discloses a network special area testing method based on the OSPF protocol, comprising: S1 , providing a test device 1 , which includes a switch control module 11 and a communication module 12 .

[0025] S2: Use the switch control module 11 to configure the first switch sw1 and the second switch sw2 in the network to be tested as switches in the backbone network of the network to be tested, and configure the third switch sw3 as a switch in the non-backbone network of the network to be tested, wherein the first switch sw1, the second switch sw2, and the third switch sw3 are signal-connected in sequence.

[0026] That is, the third switch sw3 can communicate with the first switch sw1 only through the second switch sw2. Of course, multiple communication devices may be connected between the first switch sw1, the second switch sw2 and the third switch sw3.

[0027] In some embodiments, the test device 1 further includes a timing module 13. When the test device 1 completes configuration of the first switch sw1, the second switch sw2, and the third switch sw3, the timing module 13 is used to perform timing, and when the time of the timing module 13 is greater than the first preset time, step S3 is executed.

[0028] It is understandable that after the test device 1 completes the configuration of the first switch sw1, the second switch sw2, and the third switch sw3, it takes a certain amount of time to wait for the first switch sw1, the second switch sw2, and the third switch sw3 to establish a neighbor relationship. At this time, the first switch sw1, the second switch sw2, and the third switch sw3 can communicate normally, so that subsequent steps can be executed.

[0029] S3 : Use the communication module 12 to send a detection message from the first switch sw1 to the third switch sw3 , and use the switch control module 11 to obtain the routing tables of the first switch sw1 and the third switch sw3 .

[0030] In some embodiments, a detection message may be sent to the third switch sw3 in the form of a ping test through a cmd command line.

[0031] S4, determining whether the communication module 12 can receive a response message corresponding to the third switch sw3 from the first switch sw1, and whether the routing tables of the first switch sw1 and the third switch sw3 meet the first preset requirement. If so, executing step S5; if not, the function of the special area of ​​the network under test is abnormal.

[0032] It should be explained that, when performing a functional test on a special area of ​​the network under test, if the communication module 12 cannot receive a response message corresponding to the third switch sw3 from the first switch sw1, it indicates that the first switch sw1 and the third switch sw3 cannot communicate normally. Therefore, it can be determined that the function of the special area of ​​the network under test is abnormal, and there is no need to perform subsequent steps.

[0033] In some embodiments, the first preset requirement includes that the routing table of the first switch sw1 contains a route of the third switch sw3 , and the routing table of the third switch sw3 contains a routing table entry corresponding to the backbone network segment and a routing table entry corresponding to the first switch sw1 .

[0034] S5: Configure the second switch sw2 and the third switch sw3 as switches in a special area, wherein the second switch sw2 is an area border router of the special area.

[0035] It's important to note that according to the OSPF protocol, configuring a network area triggers a routing table update on each switch, ensuring that the switches can communicate with each other even after the network area configuration is complete. Therefore, after the network area configuration is complete for each switch, there's no need to send another probe message through the first switch sw1 to confirm normal communication between the first switch sw1 and the third switch sw3.

[0036] In some embodiments, the special area includes a stub area. The expected result corresponding to the stub area includes that the routing table of the third switch sw3 does not contain a routing table entry corresponding to the first switch sw1, and a default routing entry in the routing table of the third switch sw3 points to the second switch sw2.

[0037] It should be explained that for a stub area, according to the OSPF protocol, when the second switch sw2 and the third switch sw3 are configured as a stub area, the second switch sw2, as the area border router, will send a default route information to the third switch sw3. The third switch sw3 learns the default route information from the second switch sw2, so a default route entry in the routing table of the third switch sw3 points to the second switch sw2.

[0038] In some embodiments, the special area includes a completely stub area. The expected results corresponding to the completely stub area include the absence of a routing table entry corresponding to the first switch sw1 and a routing table entry corresponding to the network segment of the backbone network in the routing table of the third switch sw3, and a default routing entry in the routing table of the third switch sw3 pointing to the second switch sw2.

[0039] It should be explained that for a completely stub area, according to the OSPF protocol, when the second switch sw2 and the third switch sw3 are configured as a stub area, the second switch sw2, as the area border router, will send a default route information to the third switch sw3. The third switch sw3 learns the default route information from the second switch sw2, so a default route entry in the routing table of the third switch sw3 points to the second switch sw2.

[0040] In some embodiments, the special area includes a non-pure stub area. The expected result corresponding to the non-pure stub area includes that the routing table of the third switch sw3 does not contain a routing table entry corresponding to the first switch sw1, but there is a routing table entry corresponding to the network segment of the backbone network, and the default routing entry in the routing table of the third switch sw3 does not point to the second switch sw2.

[0041] In some embodiments, the special area includes a completely non-pure stub area. The expected results corresponding to the completely non-pure stub area include the absence of a routing table entry corresponding to the first switch sw1 and a routing table entry corresponding to the network segment of the backbone network in the routing table of the third switch sw3, and a default routing entry in the routing table of the third switch sw3 points to the second switch sw2.

[0042] It should be explained that for a completely non-pure stub area, according to the OSPF protocol, when the second switch sw2 and the third switch sw3 are configured as a stub area, the second switch sw2, as the area border router, will send a default route information to the third switch sw3. The third switch sw3 learns the default route information from the second switch sw2, so a default route entry in the routing table of the third switch sw3 points to the second switch sw2.

[0043] In some embodiments, the test device 1 further includes a timing module 13. When the test device 1 completes configuration of the first switch sw1, the second switch sw2, and the third switch sw3, the timing module 13 is used to perform timing. When the time of the timing module 13 is greater than a second preset time, step S6 is executed.

[0044] It is understandable that after the test device 1 completes the configuration of the first switch sw1, the second switch sw2 and the third switch sw3, it will take some time to wait for the routing tables between the first switch sw1, the second switch sw2 and the third switch sw3 to be updated before executing subsequent steps.

[0045] S6, using the switch control module 11 to obtain the routing table of the third switch sw3, and determine whether the routing table of the third switch sw3 meets the expected result corresponding to the special area. If not, the function of the special area of ​​the network under test is abnormal.

[0046] In some embodiments, the testing device 1 further includes a content filtering module 14 .

[0047] Specifically, the content filtering module 14 is configured to filter the content of the routing table of the first switch sw1 to confirm whether there is a routing table entry corresponding to the third switch sw3 in the routing table of the first switch sw1 .

[0048] Specifically, the content filtering module 14 is configured to filter the content of the routing table of the third switch sw3 to confirm whether the routing table of the third switch sw3 contains a routing entry corresponding to the first switch sw1 and a routing entry corresponding to the network segment of the backbone network.

[0049] See also Figures 1 to 3 In some embodiments, determining whether the routing table of the third switch sw3 meets the corresponding expected result further includes: if so, executing step S7.

[0050] Network special area testing methods also include: S7, confirm whether the test of all types of special areas is completed. If not, configure the second switch sw2 and the third switch sw3 as switches in another special area without duplication, and configure the second switch sw2 as an area border router of the special area, and execute step S6.

[0051] Specifically, the test device 1 further includes a timing module 13. When the test device 1 completes configuration of the first switch sw1, the second switch sw2 and the third switch sw3, the timing module 13 is used to perform timing. When the time of the timing module 13 is greater than the second preset time, step S6 is executed.

[0052] Specifically, confirmation of completion of all types of special area tests also includes: If so, the functionality of the particular area of ​​the network under test is confirmed to be normal.

[0053] Optionally, the testing device 1 further includes a recording module 15 .

[0054] If it is determined that the function of the special area of ​​the network to be tested is normal, the recording module 15 records the test results. The test results include the following: in step S4, the test device 1 is able to receive the response message corresponding to the third switch sw3 from the first switch sw1, and the routing tables of the first switch sw1 and the third switch sw3 meet the first preset requirement; and in step S6, it is determined that the routing table of the third switch sw3 meets the expected result corresponding to the special area.

[0055] In some embodiments, the test device 1 may be a computer, and the network special area testing method of the present application may be implemented on the test device 1 using programming languages ​​such as Python and Java.

[0056] The present application configures the first switch sw1 as a switch in the backbone network of the second switch sw2 network, and configures the third switch sw3 as a switch in the non-backbone network of the network to be tested, and uses the communication module 12 to send a detection message from the first switch sw1 to the third switch sw3, and uses the switch control module 11 to obtain the routing tables of the first switch sw1 and the third switch sw3 to test whether the first switch sw1 and the third switch sw3 can communicate normally when they are in different network areas. If so, the second switch sw2 and the third switch sw3 are configured as switches in a special area, wherein the second switch sw2 is the area boundary router of the special area, and the switch control module 11 is used to obtain the routing table of the third switch sw3, and determine whether the routing table of the third switch sw3 meets the expected result corresponding to the special area. If not, the function of the special area of ​​the network to be tested is abnormal. By executing the above steps, the present application can use the test device 1 to automatically test whether the function of the special area of ​​the network to be tested is normal, which is conducive to improving the test efficiency of the function of the special area of ​​the network to be tested.

[0057] To facilitate understanding of the technical solution of the present application, in combination with the above embodiments, the following briefly describes the technical solution of the present application by taking Python as an example to implement the network special area testing method of the present application. Of course, this should not be understood as a limitation of the present application.

[0058] The test device 1 of the present application includes the following modules: The switch control module 11 is used to connect to the switch command line to control each switch. It can be implemented using the paramiko module in the Python language.

[0059] Communication module 12 is used to send a probe message to the target switch. This can be accomplished by using the Python subprocess module to call the command line of the test device 1 itself to send a probe message to the target switch through a command line that performs a ping traffic test on each switch, and then receiving a response message from the target switch. This is not limited to this; for example, the Python telnet module can also be used for implementation.

[0060] The timing module 13 is used to wait for the completion of neighbor establishment in the OSPF network and the convergence of the routing tables of each switch. This can be implemented using the time module in the Python language.

[0061] Recording module 15 is used for collecting test results, and can utilize openyxl module in Python language to store test results in Excel table. Of course, not limited to this, for example, can also utilize pandas module in Python language to realize.

[0062] The content filtering module 14 is used to filter the content of the routing table of the first switch sw1 and the content of the routing table of the third switch sw3. The obtained routing table string can be filtered using the re module in the Python language to determine whether the routing table string has corresponding content.

[0063] Assuming that the loopback route of the first switch sw1 of the present application is 1.1.1.1 / 32, the network segment where the first switch sw1 is located is 192.168.1.0 / 24, the network segment where the second switch sw2 is located is 192.168.2.0 / 24, the loopback route of the third switch sw3 is 2.2.2.2 / 32, and the network segment where the first switch sw1 is located is 192.168.3.0 / 24, the network special area testing method of the present application includes the following steps: In step 1, the switch control module 11 of the test device 1 connects to the command lines of the first switch sw1, the second switch sw2, and the third switch sw3. The first switch sw1 and the second switch sw2 are configured as switches in the OSPF backbone network (area 0), and the third switch sw3 is configured as a switch in another area (area 1). The loopback routes of the first switch sw1 and the third switch sw3 are imported separately. The timing module 13 waits for the neighbor relationship between the communication devices to be established before executing step 2.

[0064] In step 2, the test device 1 uses the communication module 12 to call its own cmd command line to use the ping test function, and sends a probe message to the third switch sw3 through the first switch sw1 to test whether the third switch sw3 can communicate. The test device 1 uses the content filtering module 14 to filter the routing table strings returned by the first switch sw1 and the third switch sw3 to confirm whether the third switch sw3 can communicate normally, whether the routing table of the first switch sw1 has learned the 2.2.2.2 route of the third switch sw3, and whether the routing table of the third switch sw3 has learned the 192.168.1.0 network segment and the 1.1.1.1 route of the backbone network. If so, execute step 3.

[0065] In step 31, the switch control module 11 of the test device 1 is used to configure the second switch sw2 and the third switch sw3 as stub areas. The content filtering module 14 is then used to filter the routing table string returned by the third switch sw3. The filtered content is then tested. If it is detected that there is no routing table entry corresponding to 1.1.1.1 in the routing table of the third switch sw3, and there is a default routing entry pointing to the second switch sw2, step 32 is executed.

[0066] In step 32, the second switch sw2 and the third switch sw3 are modified to be in the Totally Stub Area. The content filtering module 14 is used to filter the routing table string returned by the third switch sw3 and the filtered content is tested. If it is detected that the routing table of the third switch sw3 does not contain routing table entries corresponding to the network segments 1.1.1.1 and 192.168.1.0, and there is a default routing entry pointing to the second switch sw2, step 33 is executed.

[0067] Step 33: Modify the second switch sw2 and the third switch sw3 to NSSA areas, use the content filtering module 14 to filter the routing table string returned by the third switch sw3, and detect the filtered content. If it is detected that there is no routing table entry corresponding to the route 1.1.1.1 in the routing table of the third switch sw3, no default routing entry points to the second switch sw2, and there is a routing table entry corresponding to the 192.168.1.0 network segment, then execute step 34.

[0068] In step 34, the second switch sw2 and the third switch sw3 are modified to be in a Totally NSSA area. The content filtering module 14 is used to filter the routing table string returned by the third switch sw3 and the filtered content is tested. If it is detected that the routing table of the third switch sw3 does not contain routing table entries corresponding to the network segments 1.1.1.1 and 192.168.1.0, and there is a default routing entry pointing to the second switch sw2, step 4 is executed.

[0069] Step 4: confirm that the function of the special area of ​​the network to be tested is normal, and use the recording module 15 to write the test results of steps 2 to 34 into Excel for storage. If it fails, report the abnormal information of failure to the user.

[0070] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the scope of the patent application of the present application are still within the scope covered by the present application.

Claims

1. A network special area testing method based on OSPF protocol, characterized in that: include: S1, providing a test device, wherein the test device includes a switch control module and a communication module; S2, using the switch control module to configure the first switch and the second switch in the network to be tested as switches in the backbone network of the network to be tested, and to configure the third switch as a switch in the non-backbone network of the network to be tested, wherein the first switch, the second switch, and the third switch are sequentially signal-connected; S3: Using the communication module to send a detection message from the first switch to the third switch, and using the switch control module to obtain routing tables of the first switch and the third switch; S4, determining whether the communication module can receive a response message corresponding to the third switch from the first switch, and whether the routing tables of the first switch and the third switch meet a first preset requirement. If so, executing step S5; S5, configuring the second switch and the third switch as switches in a special area, wherein the second switch is an area border router of the special area; S6. Obtain the routing table of the third switch using the switch control module, and determine whether the routing table of the third switch meets the expected result corresponding to the special area. If not, the function of the special area of ​​the network under test is abnormal.

2. The network special area testing method according to claim 1, wherein: The first preset requirement includes that the routing table of the first switch contains the route of the third switch, and the routing table of the third switch contains a routing table entry corresponding to the network segment of the backbone network and a routing table entry corresponding to the first switch.

3. The network special area testing method according to claim 1, wherein: The special area includes a stub area, and the expected result corresponding to the stub area includes that a routing table entry corresponding to the first switch does not exist in the routing table of the third switch, and a default routing entry in the routing table of the third switch points to the second switch.

4. The network special area testing method according to claim 1, wherein: The special area includes a completely stub area, and the expected result corresponding to the completely stub area includes that a routing table entry corresponding to the first switch and a routing table entry corresponding to the network segment of the backbone network do not exist in the routing table of the third switch, and a default routing entry in the routing table of the third switch points to the second switch.

5. The network special area testing method according to claim 1, wherein: The special area includes a non-pure stub area, and the expected result corresponding to the non-pure stub area includes that a routing table entry corresponding to the first switch does not exist in the routing table of the third switch, but a routing table entry corresponding to the network segment of the backbone network exists, and a default routing entry in the routing table of the third switch does not point to the second switch.

6. The network special area testing method according to claim 1, wherein: The special area includes a completely non-pure stub area, and the expected result corresponding to the completely non-pure stub area includes that a routing table entry corresponding to the first switch and a routing table entry corresponding to the network segment of the backbone network do not exist in the routing table of the third switch, and a default routing entry in the routing table of the third switch points to the second switch.

7. The network special area testing method according to any one of claims 1 to 6, characterized in that: The determining whether the routing table of the third switch meets the corresponding expected result further includes: If yes, proceed to step S7; The network special area testing method further includes: S7, confirm whether the test of all types of the special areas is completed. If not, configure the second switch and the third switch as switches in another special area without duplication, and configure the second switch as an area border router of the special area, and execute step S6.

8. The network special area testing method according to claim 1, wherein: The step of confirming whether all types of tests of the special area are completed further includes: If so, it is determined that the function of the special area of ​​the network to be tested is normal.

9. The network special area testing method according to claim 8, wherein: The testing device also includes a recording module; If it is determined that the function of the special area of ​​the network to be tested is normal, the test result is recorded by using the recording module.

10. The network special area testing method according to claim 1, wherein: The testing device also includes a content filtering module; The content filtering module is configured to filter the content of the routing table of the first switch to confirm whether there is a routing table entry corresponding to the third switch in the routing table of the first switch; and / or, The content filtering module is configured to filter the content of the routing table of the third switch to confirm whether the routing table of the third switch contains a routing entry corresponding to the first switch and a routing entry corresponding to the network segment of the backbone network.