Routing performance testing method

By using routing packet transmission and precision value approximation methods in layer three switches, the inconsistency and accuracy problems of routing performance testing in the prior art are solved, and fast and accurate routing performance evaluation is achieved, reducing labor costs and improving Test efficiency.

CN119030909APending Publication Date: 2024-11-26ALPHA NETWORKS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310590196.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2024-11-26

Smart Images

  • Figure CN119030909A_ABST
    Figure CN119030909A_ABST
Patent Text Reader

Abstract

A routing performance test method comprises the following steps: obtaining a successful transmission number and a failed transmission number according to a packet transmission number and a writable number of a to-be-tested unit which can be written into a routing table of the to-be-tested unit; obtaining a target transmission number according to the successful transmission number, the failed transmission number and a precision value; transmitting the routing packets of which the packet transmission number is set to be the target transmission number to the unit to be tested so as to obtain the new writable number and the forwarding ratio; obtaining a successful forwarding number and a failed forwarding number according to the packet transmission number and the forwarding ratio; and according to the successful forwarding number, the failed forwarding number and another precision value, obtaining a final forwarding number of all packets which can be completely forwarded by the to-be-tested unit, so as to test the routing efficiency of the to-be-tested unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a network performance testing method, in particular to a routing performance testing method for testing the routing performance of a unit to be tested including N switches. Background Art

[0002] The performance of a Layer 3 switch will directly affect the scale, stability, speed, and scalability of the Internet. Currently, there is no unified consistency test process defined for the routing performance test of a Layer 3 switch. Each tester designs different test steps, so it is impossible to estimate the test time required. During performance testing, indicators such as routing table capacity and the number of accurate routes that can stably forward all traffic are usually included in the test items.

[0003] Generally, when testing the capacity of the routing table and the exact number of routes that can stably forward all traffic, the binary search method is used to continuously take the middle value to find the capacity of the routing table and the exact number of routes that can stably forward all traffic. However, the binary search method converges slowly in the process of finding the capacity of the routing table and the exact number of routes that can stably forward all traffic, and is limited by taking the middle value to find the limit value each time, so the obtained routing table capacity and the exact number of routes that can stably forward all traffic may not be accurate enough, so it is necessary to find a solution. Summary of the invention

[0004] The object of the present invention is to provide a routing performance testing method for obtaining routing performance more quickly and accurately.

[0005] The routing performance testing method of the present invention is suitable for testing the routing performance of a unit under test comprising N switches, N≥1, and is implemented by a testing device connected to the unit under test via a communication network. The routing performance testing method comprises the following steps:

[0006] (A) taking a predetermined number as a packet transmission number, and generating and transmitting a routing packet of the packet transmission number to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as a writable number and transmits it to the test device;

[0007] (B) obtaining the number of successful transmissions that can be completely written into the routing table of the unit under test and the number of failed transmissions that cannot be completely written into the routing table of the unit under test according to the number of packet transmissions and the number of writable packets;

[0008] (C) obtaining a target transmission number that can be completely written into the routing table of the unit under test according to the successful transmission number, the failed transmission number and the accuracy value;

[0009] (D) setting the packet transmission quantity as the target transmission quantity, generating and transmitting routing packets of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table in the routing packets as the writable quantity, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio and transmits it to the test device;

[0010] (E) obtaining the number of successful forwardings of all routing packets that the unit under test can completely forward according to the number of packet transmissions and the forwardable ratio, and the number of failed forwardings of all routing packets that the unit under test cannot completely forward; and

[0011] (F) Obtaining a final forwarding quantity at which the unit under test can completely forward all packets according to the successful forwarding quantity, the failed forwarding quantity and another precision value, so as to test the routing performance of the unit under test.

[0012] The routing effectiveness testing method of the present invention, step (B) comprises the following sub-steps:

[0013] (B-1) obtaining the number of successful transmissions and the number of failed transmissions before success that can be completely written into the routing table of the unit under test according to the number of packet transmissions and the number of writable packets; (B-2) obtaining the number of attempted transmissions between the number of successful transmissions and the number of failed transmissions before success according to the number of successful transmissions and the number of failed transmissions before success;

[0014] (B-3) setting the packet transmission quantity to the attempted transmission quantity, generating and transmitting a routing packet of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as the writable quantity and transmits it to the test device;

[0015] (B-4) determining whether the packet transmission quantity is equal to the writable quantity;

[0016] (B-5) when it is determined that the packet transmission quantity is equal to the writable quantity, updating the successful transmission quantity according to the attempted transmission quantity, and returning to step (B-2); and

[0017] (B-6) When it is determined that the packet transmission quantity is not equal to the writable quantity, the failed transmission quantity is obtained according to the attempted transmission quantity.

[0018] The routing effectiveness testing method of the present invention, step (B-1) comprises the following sub-steps:

[0019] (B-1-1) obtaining another attempted transmission number between the packet transmission number and the writable number according to the packet transmission number and the writable number;

[0020] (B-1-2) setting the packet transmission quantity to the other attempted transmission quantity, generating and transmitting a routing packet of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as the writable quantity and transmits it to the test device;

[0021] (B-1-3) Determine whether the packet transmission quantity is equal to the writable quantity;

[0022] (B-1-4) when it is determined that the number of packet transmissions is equal to the writable number, the number of successful transmissions is obtained according to the number of another attempted transmissions, and the number of failed transmissions before success is obtained according to the number of packet transmissions when it was most recently determined that the number of packet transmissions was not equal to the writable number before it was determined that the number of packet transmissions was equal to the writable number; and

[0023] (B-1-5) When it is determined that the packet transmission quantity is not equal to the writable quantity, return to step (B-1-1).

[0024] The routing effectiveness testing method of the present invention, step (B-6) comprises the following sub-steps:

[0025] (B-6-1) when it is determined that the packet transmission quantity is not equal to the writable quantity, determining whether the writable quantity is greater than half of the packet transmission quantity;

[0026] (B-6-2) when it is determined that the writable number is greater than half of the packet transmission number, obtaining the failed transmission number according to the attempted transmission number; and

[0027] (B-6-3) When it is determined that the writable quantity is not greater than half of the packet transmission quantity, return to step (B-1).

[0028] The routing effectiveness testing method of the present invention, step (C) comprises the following sub-steps:

[0029] (C-1) obtaining a target approaching number between the successful transmission number and the failed transmission number according to the successful transmission number and the failed transmission number;

[0030] (C-2) updating one of the number of successful transmissions and the number of failed transmissions according to the target approach number;

[0031] (C-3) determining whether the difference between the number of successful transmissions and the number of failed transmissions is less than or equal to the accuracy value; and

[0032] (C-4) When it is determined that the difference between the number of successful transmissions and the number of failed transmissions is less than or equal to the accuracy value, the target transmission number is obtained according to the number of successful transmissions.

[0033] The routing effectiveness testing method of the present invention, after sub-step (C-3), further comprises the following sub-steps:

[0034] (C-5) When it is determined that the difference between the number of successful transmissions and the number of failed transmissions is greater than the accuracy value, return to step (C-1).

[0035] The routing effectiveness testing method of the present invention, sub-step (C-2) comprises the following sub-steps:

[0036] (C-2-1) setting the packet transmission quantity to the target approximate quantity, generating and transmitting a routing packet of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as the writable quantity and transmits it to the test device;

[0037] (C-2-2) determining whether the packet transmission quantity is equal to the writable quantity;

[0038] (C-2-3) when it is determined that the packet transmission quantity is equal to the writable quantity, updating the successful transmission quantity according to the target approach quantity; and

[0039] (C-2-4) When it is determined that the packet transmission quantity is not equal to the writable quantity, the failed transmission quantity is updated according to the target approach quantity.

[0040] The routing effectiveness testing method of the present invention, sub-step (C-2-4) comprises the following sub-steps:

[0041] (C-2-4-1) when it is determined that the packet transmission quantity is not equal to the writable quantity, determining whether the writable quantity is greater than half of the packet transmission quantity; and

[0042] (C-2-4-2) when it is determined that the writable number is greater than half of the packet transmission number, updating the failed transmission number according to the target approach number; and

[0043] (C-2-4-3) When it is determined that the writable quantity is not greater than half of the packet transmission quantity, return to step (B).

[0044] The routing effectiveness testing method of the present invention, step (E) comprises the following sub-steps:

[0045] (E-1) According to the packet transmission quantity and the forwarding ratio, the number of successful forwardings and the number of failed forwardings before success of the unit under test that can completely forward all routing packets are obtained.

[0046] The sending ratio and the number of failed transmissions before success are updated;

[0047] (E-2) obtaining a forwarding attempt number between the number of successful forwardings and the number of failed transmissions before success according to the failed forwarding ratio before success and the number of failed transmissions before success;

[0048] (E-3) setting the packet transmission quantity as the attempted forwarding quantity, generating and transmitting routing packets of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table in the routing packets as the writable quantity, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio, and transmits it to the test device;

[0049] (E-4) determining whether the packet transmission quantity is equal to the writable quantity;

[0050] (E-5) When it is determined that the packet transmission quantity is not equal to the writable quantity, return to step (B);

[0051] (E-6) when it is determined that the packet transmission quantity is equal to the writable quantity, determining whether the forwarding ratio is 100%;

[0052] (E-7) when it is determined that the forwarding ratio is 100%, updating the number of successful forwardings according to the number of attempted forwardings, and returning to step (E-2); and

[0053] (E-8) When it is determined that the forwarding ratio is not 100%, the number of failed forwardings is obtained according to the number of attempted forwardings.

[0054] The routing effectiveness testing method of the present invention, sub-step (E-1) comprises the following sub-steps:

[0055] (E-1-1) obtaining another attempted forwarding number that is smaller than the packet transmission number according to the packet transmission number and the forwardable ratio;

[0056] (E-1-2) setting the packet transmission quantity as the other attempted forwarding quantity, generating and transmitting routing packets of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table in the routing packets as the writable quantity, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio, and transmits it to the test device;

[0057] (E-1-3) determining whether the packet transmission quantity is equal to the writable quantity;

[0058] (E-1-4) When it is determined that the packet transmission quantity is not equal to the writable quantity, return to step (B);

[0059] (E-1-5) When it is determined that the packet transmission quantity is equal to the writable quantity, determining whether the forwarding ratio is 100%;

[0060] (E-1-6) when the forwarding ratio is determined to be 100%, obtaining the number of successful forwardings based on the number of another forwarding attempts, and obtaining the ratio of failed forwardings before success based on the ratio when the forwarding ratio was most recently determined to be not 100% before the forwarding ratio was determined to be 100%, and updating the number of failed forwardings before success to the number of packet transmissions when the forwarding ratio was most recently determined to be not 100% before the forwarding ratio was determined to be 100%; and

[0061] (E-1-7) When it is determined that the forwarding ratio is not 100%, return to step (E-1-1).

[0062] The routing effectiveness testing method of the present invention, step (F) comprises the following sub-steps:

[0063] (F-1) obtaining another target approximation number between the successful forwarding number and the failed forwarding number according to the successful forwarding number and the failed forwarding number;

[0064] (F-2) updating one of the number of successful forwarding and the number of failed forwarding according to the other target approaching number;

[0065] (F-3) determining whether the difference between the number of successful forwarding and the number of failed forwarding is less than or equal to the other accuracy value; and

[0066] (F-4) When it is determined that the difference between the number of successful forwardings and the number of failed forwardings is less than or equal to the other precision value, the final forwarding number is obtained according to the number of successful forwardings.

[0067] The routing performance testing method of the present invention, after sub-step (F-3), further comprises the following steps:

[0068] (F-5) When it is determined that the difference between the number of successful forwarding and the number of failed forwarding is greater than the other precision value, return to step (F-1).

[0069] The routing effectiveness testing method of the present invention, sub-step (F-2) comprises the following sub-steps:

[0070] (F-2-1) setting the packet transmission quantity to the another target approximation quantity, generating and transmitting a routing packet of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table in the routing packets as the writable quantity, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio, and transmits it to the test device;

[0071] (F-2-2) determining whether the packet transmission quantity is equal to the writable quantity;

[0072] (F-2-3) When it is determined that the packet transmission quantity is not equal to the writable quantity, return to step (B);

[0073] (F-2-4) When it is determined that the packet transmission quantity is equal to the writable quantity, determining whether the forwarding ratio is 100%;

[0074] (F-2-5) when it is determined that the forwarding ratio is 100%, updating the number of successful forwardings according to the number of approaching another target; and

[0075] (F-2-6) When it is determined that the forwarding ratio is not 100%, the failed forwarding number is updated according to the other target approaching number.

[0076] The routing performance testing method of the present invention, before step (A), further comprises the following steps:

[0077] (G) Starting one of the N switches.

[0078] The routing performance testing method of the present invention, after step (F), further comprises the following steps:

[0079] (H) determining whether there is at least one unactivated switch among the N switches; and

[0080] (I) When it is determined that there is at least one unactivated switch, one of the at least one unactivated switches is activated, and the internal connection between the activated switches is interrupted, and the predetermined number is set according to the final forwarding number obtained by executing step (F) this time, and then returning to step (A).

[0081] The routing performance testing method of the present invention further comprises the following steps between step (A) and step (B):

[0082] (J) determining whether the packet transmission quantity is equal to the writable quantity;

[0083] (K) when it is determined that the packet transmission quantity is not equal to the writable quantity, proceeding to step (B);

[0084] (L) when it is determined that the packet transmission quantity is equal to the writable quantity, generating and transmitting again a routing packet of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as the writable quantity and transmits it to the test device;

[0085] (M) determining again whether the packet transmission quantity is equal to the writable quantity;

[0086] (N) when it is determined that the packet transmission quantity is not equal to the writable quantity, performing step (B); and

[0087] (O) When it is determined that the packet transmission quantity is equal to the writable quantity, the target transmission quantity is obtained according to the packet transmission quantity.

[0088] The routing performance testing method of the present invention further comprises the following steps between step (D) and step (E):

[0089] (P) determining whether the packet transmission quantity is equal to the writable quantity;

[0090] (Q) when it is determined that the packet transmission quantity is not equal to the writable quantity, returning to step (B);

[0091] (R) When it is determined that the packet transmission quantity is equal to the writable quantity,

[0092] Determining whether the forwardable ratio is 100%;

[0093] (S) when it is determined that the forwarding ratio is 100%, obtaining the final forwarding quantity according to the packet transmission quantity; and

[0094] (T) When it is determined that the forwarding ratio is not 100%, proceed to step (E).

[0095] The beneficial effects of the present invention are as follows: by first obtaining the number of successful transmissions and the number of failed transmissions, the upper and lower limits of the routing table capacity are preliminarily determined, and then the target transmission number is quickly and accurately approximated based on the number of successful transmissions and the number of failed transmissions in combination with the precision value. In addition, by first obtaining the number of successful forwardings and the number of failed forwardings, the upper and lower limits for stably forwarding all traffic are preliminarily determined, and then the final forwarding number is quickly and accurately approximated based on the number of successful forwardings and the number of failed forwardings in combination with the other precision value. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] Other features and effects of the present invention will be clearly presented in the embodiments with reference to the accompanying drawings, in which:

[0097] Figure 1 is a block diagram of a routing test system for implementing an embodiment of the routing effectiveness test method of the present invention;

[0098] Figure 2 is a flow chart illustrating an embodiment of a method for testing routing effectiveness of the present invention;

[0099] Figure 3 is a flow chart illustrating how to obtain a target transmission quantity;

[0100] Figure 4 is a flow chart illustrating how to obtain a successful transmission number and a failed transmission number;

[0101] Figure 5 is a flow chart illustrating how to obtain the number of successful transmissions and the number of failed transmissions before success;

[0102] Figure 6 is a flow chart illustrating how to obtain the number of failed transmissions;

[0103] Figure 7 is a flow chart illustrating how to obtain the target transmission quantity;

[0104] Figure 8 is a flow chart illustrating how to update the number of successful transmissions and the number of failed transmissions;

[0105] Fig. 9 is a flow chart illustrating how to update the number of failed transmissions;

[0106] Fig.10 is a flow chart illustrating how to obtain a final forwarding quantity;

[0107] Fig.11 is a flow chart illustrating how to obtain a successful forwarding number and a failed forwarding number;

[0108] Fig.12 is a flow chart illustrating how to obtain the number of successful forwardings and a ratio of failed forwardings before success, and update the number of failed forwardings before success;

[0109] Fig.13 is a flow chart illustrating how to obtain the final forwarding quantity;

[0110] Fig.14 is a flow chart illustrating how to update the number of successful forwardings and the number of failed forwardings;

[0111] Fig.15 is a schematic diagram illustrating how to gradually obtain the target transmission quantity; and

[0112] Fig.16 is a schematic diagram illustrating how to obtain the final forwarding number step by step. DETAILED DESCRIPTION

[0113] See also Figure 1 The embodiment of the routing performance test method of the present invention is suitable for testing the routing performance of a unit under test 1, N≥1, and is implemented by a routing test system. The routing test system includes the unit under test 1 including N switches 11, N≥1, a companion test unit 2 connected to the unit under test 1 via a communication network, and a test device 4 connected to the unit under test 1 via the communication network.

[0114] The unit under test 1 is, for example, a three-layer switch, and the N switches 11 of the unit under test 1 are connected in a stack topology. During the test process, the N switches 11 will start by testing the routing performance of only one switch 11, then add a second switch 11 to test the routing performance of two switches 11 connected in a stack topology, then add a third switch 11 to test the routing performance of three switches 11 connected in a stack topology, and so on, until the routing performance of the N switches 11 is tested. When only one switch 11 is tested, the only switch 11 is used as the main switch 11 (Master) for external communication processing. When two switches 11 are tested, one of the switches 11 is used as the main switch 11 for external communication processing, and the other switch 11 is used as the backup switch 11 (Backup Master) of the main switch 11. When more than three switches 11 are tested, one of the switches 11 is used as the main switch 11 for external communication processing, and the other switch 11 is used as the backup switch 11 of the main switch 11, and the remaining switches 11 are all used as slave switches 11 (Slave).

[0115] The companion unit 2 (ie, the neighbor of the unit under test 1 ) can also be a layer 3 switch with the same routing protocol as the unit under test 1 , and is used to communicate with the unit under test 1 on the routing protocol and exchange routing packets.

[0116] The testing device 4 includes a traffic generator 41 for generating routing packets, a switch 42 signal-connected to the traffic generator 41 , and a processing unit 43 signal-connected to the switch 42 and the traffic generator 41 .

[0117] See also Figure 1 and Figure 2 The operation of the routing test system will be described below through an embodiment of the routing effectiveness test method of the present invention, and the embodiment includes the following steps.

[0118] In step 30 , the processing unit 43 of the test device 4 generates and transmits an activation command to the unit under test 1 via the communication network to activate one of the N switches 11 .

[0119] In step 31, the processing unit 43 of the test device 4 sets the number of packet transmissions (Rsend) to a predetermined number. It is worth noting that when the test device 4 tests the unit under test 1 for the first time (i.e., only one switch 11 of the unit under test 1 is activated), the predetermined number is set to a default maximum number of routes of the unit under test 1, which is predefined according to the product specifications of the unit under test 1.

[0120] In step 32, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as a writable quantity (Rtable) and transmits it to the test device 4 via the communication network.

[0121] In step 33, when the processing unit 43 of the test device 4 receives the writable number (Rtable) via the communication network, the processing unit 43 of the test device 4 obtains a target transmission number that can be completely written into the routing table of the unit under test 1 based on at least the packet transmission number (Rsend) and the writable number (Rtable).

[0122] It is worth noting that step 33 also includes the following sub-steps (see Figure 3 ).

[0123] In sub-step 331, when the processing unit 43 of the test device 4 receives the writable number (Rtable) via the communication network, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 332; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process proceeds to sub-step 335.

[0124] In sub-step 332, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate again and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable) and transmits it to the test device 4 via the communication network.

[0125] In sub-step 333, when the processing unit 43 of the test device 4 receives the writable number (Rtable) via the communication network, the processing unit 43 of the test device 4 again determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 334; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process proceeds to sub-step 335.

[0126] In sub-step 334, the processing unit 43 of the test device 4 obtains the target transmission number according to the packet transmission number (Rsend). In this embodiment, the target transmission number is set to the packet transmission number (Rsend).

[0127] In sub-step 335, the processing unit 43 of the test device 4 obtains a successful transmission number (Rok) that can be completely written into the routing table of the unit under test 1, and a failed transmission number (Rfail) that cannot be completely written into the routing table of the unit under test 1 according to the packet transmission number (Rsend) and the writable number (Rtable).

[0128] It is worth mentioning that sub-step 335 also includes the following sub-steps (see Figure 4 ).

[0129] In sub-step 335A, the processing unit 43 of the test device 4 obtains a successful transmission number (Rok) that can be completely written into the routing table of the unit under test 1, and a failed transmission number before success (Rsendbok) according to the packet transmission number (Rsend) and the writable number (Rtable).

[0130] It is worth mentioning that sub-step 335A also includes the following sub-steps (see Figure 5 ).

[0131] In sub-step 335A-1, the processing unit 43 of the test device 4 uses the following formula (1) to obtain a transmission attempt number between the packet transmission number (Rsend) and the writable number (Rtable) according to the packet transmission number (Rsend) and the writable number (Rtable).

[0132]

[0133] In sub-step 335A- 2 , the processing unit 43 of the testing device 4 sets the packet sending number (Rsend) to the attempted sending number.

[0134] In sub-step 335A-3, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable) and transmits it to the test device 4.

[0135] In sub-step 335A-4, when the processing unit 43 of the test device 4 receives the writable number (Rtable) via the communication network, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 335A-5; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process returns to sub-step 335A-1.

[0136] In sub-step 335A-5, the processing unit 43 of the test device 4 obtains the number of successful transmissions (Rok) according to the number of attempted transmissions, and obtains the number of failed transmissions before success (Rsendbok) according to the number of packet transmissions (Rsend) when the last determination that the number of packet transmissions (Rsend) is not equal to the number of writable packets (Rtable) before the determination that the number of packet transmissions (Rsend) is equal to the number of writable packets (Rtable) is obtained. In this embodiment, the number of successful transmissions (Rok) is set to the number of attempted transmissions, and the number of failed transmissions before success (Rsendbok) is set to the number of packet transmissions (Rsend) when the last determination that the number of packet transmissions (Rsend) is not equal to the number of writable packets (Rtable) before the determination that the number of packet transmissions (Rsend) is equal to the number of writable packets (Rtable) is obtained.

[0137] In sub-step 335B, the processing unit 43 of the test device 4 obtains another attempted transmission number between the successful transmission number (Rok) and the failed transmission number before success (Rsendbok) using the following formula (2) according to the successful transmission number (Rok) and the failed transmission number before success (Rsendbok).

[0138]

[0139] The value of a is initially 1, and the value of a is increased by one whenever the number of successful transmissions (Rok) is obtained or updated.

[0140] In sub-step 335C, the processing unit 43 of the testing device 4 sets the packet sending number (Rsend) to the other attempted sending number.

[0141] In sub-step 335D, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable) and transmits it to the test device 4.

[0142] In sub-step 335E, when the processing unit 43 of the test device 4 receives the writable number (Rtable) via the communication network, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), step 335F is performed; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), step 335G is performed.

[0143] In sub-step 335F, the processing unit 43 of the test device 4 updates the successful transmission number (Rok) according to the other attempted transmission number, and returns to step 335B. In this embodiment, the successful transmission number (Rok) is updated to the other attempted transmission number.

[0144] In sub-step 335G, the processing unit 43 of the test device 4 obtains the failed transmission number (Rfail) according to the other attempted transmission number. In this embodiment, the failed transmission number (Rfail) is set as the other attempted transmission number.

[0145] It is worth mentioning that sub-step 335G also includes the following sub-steps (see Figure 6 ).

[0146] In sub-step 335G-1, the processing unit 43 of the test device 4 determines whether the writable number (Rtable) is greater than half of the packet transmission number (Rsend). When the processing unit 43 of the test device 4 determines that the writable number (Rtable) is greater than half of the packet transmission number (Rsend), the process proceeds to step 335G-2; when the processing unit 43 of the test device 4 determines that the writable number (Rtable) is not greater than half of the packet transmission number (Rsend), the process returns to step 335A-1.

[0147] In sub-step 335G- 2 , the processing unit 43 of the test device 4 obtains the failed transmission number (Rfail) according to the another attempted transmission number.

[0148] In sub-step 336 , the processing unit 43 of the test device 4 obtains the target transmission number that can be completely written into the routing table of the unit under test 1 according to the successful transmission number (Rok), the failed transmission number (Rfail) and an accuracy value (Raccuracy).

[0149] It is worth mentioning that step 336 includes the following sub-steps (see Figure 7 ).

[0150] In sub-step 336A, the processing unit 43 of the test device 4 obtains a target approximation number between the successful transmission number (Rok) and the failed transmission number (Rfail) using the following formula (3) according to the successful transmission number (Rok), the failed transmission number (Rfail) and the accuracy value (Raccuracy).

[0151]

[0152] In sub-step 336B, the processing unit 43 of the testing device 4 updates one of the successful transmission number (Rok) and the failed transmission number (Rfail) according to the target approaching number.

[0153] It is worth mentioning that sub-step 336B also includes the following sub-steps (see Figure 8 ).

[0154] In sub-step 336B- 1 , the processing unit 43 of the testing device 4 sets the packet transmission quantity (Rsend) to the target approximate quantity.

[0155] In sub-step 336B-2, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable) and transmits it to the test device 4.

[0156] In sub-step 336B-3, when the processing unit 43 of the test device 4 receives the writable number (Rtable) via the communication network, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 336B-4; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process proceeds to sub-step 336B-5.

[0157] In sub-step 336B-4, the processing unit 43 of the test device 4 updates the number of successful transmissions (Rok) according to the target approaching number. In this embodiment, the number of successful transmissions (Rok) is updated to the target approaching number.

[0158] In sub-step 336B-5, the processing unit 43 of the test device 4 updates the failed transmission number (Rfail) according to the target approaching number. The failed transmission number (Rfail) is updated to the target approaching number.

[0159] It is worth mentioning that sub-step 336B-5 also includes the following sub-steps ( Fig. 9 ).

[0160] In sub-step 336B-5-1, the processing unit 43 of the test device 4 determines whether the writable number (Rtable) is greater than half of the packet transmission number (Rsend). When it is determined that the writable number (Rtable) is greater than half of the packet transmission number (Rsend), the process proceeds to sub-step 336B-5-2; when it is determined that the writable number (Rtable) is not greater than half of the packet transmission number (Rsend), the process returns to step 335A-1.

[0161] In sub-step 336B-5-2, the processing unit 43 of the test device 4 updates the failed transmission number (Rfail) according to the target approach number.

[0162] In sub-step 336C, the processing unit 43 of the test device 4 determines whether the difference between the number of successful transmissions (Rok) and the number of failed transmissions (Rfail) is less than or equal to the accuracy value (Raccuracy). When the processing unit 43 of the test device 4 determines that the difference between the number of successful transmissions (Rok) and the number of failed transmissions (Rfail) is less than or equal to the accuracy value (Raccuracy), the process proceeds to sub-step 336D; when it is determined that the difference between the number of successful transmissions (Rok) and the number of failed transmissions (Rfail) is greater than the accuracy value (Raccuracy), the process returns to sub-step 336A. In this embodiment, the accuracy value (Raccuracy) is 100.

[0163] In sub-step 336D, the processing unit 43 of the test device 4 obtains the target transmission number according to the successful transmission number (Rok). In this embodiment, the target transmission number is set to the successful transmission number.

[0164] In step 34 , the processing unit 43 of the testing device 4 sets the packet transmission quantity (Rsend) to the target transmission quantity.

[0165] In step 35, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable), and calculates a ratio of the routing packets that can be successfully forwarded as a forwardable ratio (RXRate) and transmits it to the test device 4.

[0166] In step 36, when the processing unit 43 of the test device 4 receives the writable number (Rtable) and the forwarding ratio (RXRate) via the communication network, the processing unit 43 of the test device 4 obtains a final forwarding number (RTok) at which the unit under test 1 can completely forward all packets based on at least the writable number (Rtable), the packet transmission number (Rsend) and the forwarding ratio (RXRate) to test the routing performance of the unit under test 1.

[0167] It is worth mentioning that step 36 includes the following sub-steps (see Fig.10 ).

[0168] In sub-step 361, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 362; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process proceeds to sub-step 335A-1.

[0169] In sub-step 362, the processing unit 43 of the test device 4 determines whether the forwarding ratio (RXRate) is 100%. When the processing unit 43 of the test device 4 determines that the forwarding ratio (RXRate) is 100%, the process proceeds to sub-step 363; when the processing unit 43 of the test device 4 determines that the forwarding ratio (RXRate) is not 100%, the process proceeds to sub-step 364.

[0170] In sub-step 363, the processing unit 43 of the test device 4 obtains the final forwarding number (Rok) according to the packet transmission number (Rsend). In this embodiment, the final forwarding number is the packet transmission number.

[0171] In sub-step 364, the processing unit 43 of the test device 4 obtains a successful forwarding number (RTok) of the unit under test 1 that can completely forward all routing packets, and a failed forwarding number (RTfail) of the unit under test 1 that cannot completely forward all packets according to the packet transmission number (Rsend) and the forwardable ratio (RXRate).

[0172] It is worth mentioning that sub-step 364 includes the following sub-steps (see Fig.11 ).

[0173] In sub-step 364A, the processing unit 43 of the test device 4 obtains a successful forwarding number (RTok) and a failed forwarding ratio before success (RXRatebok) of the unit under test 1 that can completely forward all routing packets according to the packet transmission number (Rsend) and the forwardable ratio (RXRate), and updates the failed transmission number before success (Rsendbok).

[0174] It is worth mentioning that sub-step 364A includes the following sub-steps (see Fig.12 ).

[0175] In sub-step 364A-1, the processing unit 43 of the test device 4 obtains a trial forwarding number that is smaller than the packet transmission number (Rsend) using the following formula (4) according to the packet transmission number (Rsend) and the forwardable ratio (RXRate).

[0176]

[0177] Wherein, Scurrent is the number of switches 11 currently started by the unit under test 1.

[0178] In sub-step 364A- 2 , the processing unit 43 of the test device 4 sets the packet transmission number (Rsend) to the attempted forwarding number.

[0179] In sub-step 364A-3, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable), and calculates a ratio of the routing packets that can be successfully forwarded as the forwardable ratio (RXRate), and transmits it to the test device 4 via the communication network.

[0180] In sub-step 364A-4, when the processing unit 43 of the test device 4 receives the writable number (Rtable) and the forwardable rate (RXRate) via the communication network, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process returns to step 335A-1; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 364A-5.

[0181] In sub-step 364A-5, the processing unit 43 of the test device 4 determines whether the forwardable ratio (RXRate) is 100%. When it is determined that the forwardable ratio (RXRate) is 100%, the process proceeds to sub-step 364A-6; when it is determined that the forwardable ratio (RXRate) is not 100%, the process returns to sub-step 364A-1.

[0182] In sub-step 364A-6, the processing unit 43 of the test device 4 obtains the successful forwarding number (RTok) according to the attempted forwarding number, and obtains the failed forwarding ratio (RXRatebok) before success according to the ratio when the forwarding ratio (RXRate) is determined to be not 100% the last time before the forwarding ratio (RXRate) is determined to be 100%, and updates the failed transmission number (Rsendbok) before success to the number of packets transmitted (Rsend) when the forwarding ratio (RXRate) is not 100% the last time before the forwarding ratio (RXRate) is determined to be 100%. In this embodiment, the successful forwarding number (RTok) is set to the attempted forwarding number, and the failed forwarding ratio (RXRatebok) before success is set to the ratio when the forwarding ratio (RXRate) is not 100% the last time before the forwarding ratio (RXRate) is determined to be 100%.

[0183] In sub-step 364B, the processing unit 43 of the test device 4 uses the following formula (5) to obtain another attempted forwarding number between the successful forwarding number (RTok) and the failed transmission number before success (Rsendbok) according to the failed forwarding ratio before success (RXRatebok) and the failed transmission number before success (Rsendbok).

[0184]

[0185] The value of c is initially 1. Whenever the number of successful forwarding (RTok) is obtained or updated, the value of c is increased by 1. Scurrent is the number of switches 11 currently started by the unit under test 1.

[0186] In sub-step 364C, the processing unit 43 of the test device 4 sets the packet sending number (Rsend) to the another attempted forwarding number.

[0187] In sub-step 364D, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable), and calculates a ratio of the routing packets that can be successfully forwarded as the forwardable ratio (RXRate), and transmits it to the test device 4 via the communication network.

[0188] In sub-step 364E, when the processing unit 43 of the test device 4 receives the writable number (Rtable) and the forwardable rate (RXRate) via the communication network, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process returns to sub-step 335A-1; when the processing unit 43 of the test device 4 determines that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 364F.

[0189] In sub-step 364F, the processing unit 43 of the test device 4 determines whether the forwardable ratio (RXRate) is 100%. When it is determined that the forwardable ratio (RXRate) is 100%, the process proceeds to sub-step 364G; when it is determined that the forwardable ratio (RXRate) is not 100%, the process proceeds to sub-step 364H.

[0190] In sub-step 364G, the processing unit 43 of the test device 4 updates the successful forwarding number (RTok) according to the other attempted forwarding number, and returns to step 364B. In this embodiment, the successful forwarding number (RTok) is updated to the other attempted forwarding number.

[0191] In sub-step 364H, the processing unit 43 of the test device 4 obtains the number of failed forwardings (RTfail) according to the other number of attempted forwardings. In this embodiment, the number of failed forwardings (RTfail) is set as the other number of attempted forwardings.

[0192] In sub-step 365, the processing unit 43 of the test device 4 obtains a final forwarding number (RTok) at which the unit under test 1 can completely forward all packets according to the successful forwarding number (RTok), the failed forwarding number (RTfail) and another accuracy value to test the routing performance of the unit under test 1.

[0193] It is worth mentioning that sub-step 365 also includes the following sub-steps (see Fig.13 ).

[0194] In sub-step 365A, the processing unit 43 of the test device 4 obtains another target approximation number between the successful forwarding number (RTok) and the failed forwarding number (RTfail) using the following formula (6) based on the successful forwarding number (RTok), the failed forwarding number (RTfail) and the other accuracy value (Raccuracy).

[0195]

[0196] In sub-step 365B, the processing unit 43 of the test device 4 updates one of the successful forwarding number (RTok) and the failed forwarding number (RTfail) according to the other target approaching number.

[0197] It is worth mentioning that sub-step 365B includes the following sub-steps (see Fig.14 ).

[0198] In sub-step 365B- 1 , the processing unit 43 of the testing device 4 sets the packet sending number (Rsend) to the other target approximate number.

[0199] In sub-step 365B-2, the processing unit 43 of the test device 4 controls the traffic generator 41 to generate and transmit the routing packets of the packet transmission quantity (Rsend) to the unit under test 1 via the communication network, so that the unit under test 1 counts a number of routing packets in the routing packets that can be written into its routing table as the writable quantity (Rtable), and calculates a ratio of the routing packets that can be successfully forwarded as the forwardable ratio (RXRate), and transmits it to the test device 4 via the communication network.

[0200] In sub-step 365B-3, when the processing unit 43 of the test device 4 receives the writable number (Rtable) and the forwardable rate (RXRate) via the communication network, the processing unit 43 of the test device 4 determines whether the packet transmission number (Rsend) is equal to the writable number (Rtable). When it is determined that the packet transmission number (Rsend) is not equal to the writable number (Rtable), the process returns to sub-step 335A-1; when it is determined that the packet transmission number (Rsend) is equal to the writable number (Rtable), the process proceeds to sub-step 365B-4.

[0201] In sub-step 365B-4, the processing unit 43 of the test device 4 determines whether the forwardable ratio (RXRate) is 100%. When it is determined that the forwardable ratio (RXRate) is 100%, the process proceeds to sub-step 365B-5; when it is determined that the forwardable ratio (RXRate) is not 100%, the process proceeds to sub-step 365B-6.

[0202] In sub-step 365B-5, the processing unit 43 of the test device 4 updates the number of successful forwarding (RTok) according to the other target approaching number. In this embodiment, the number of successful forwarding (RTok) is updated to the other target approaching number.

[0203] In sub-step 365B-6, the processing unit 43 of the test device 4 updates the number of failed forwarding (RTfail) according to the other target approaching number. In this embodiment, the number of failed forwarding (RTfail) is updated to the other target approaching number.

[0204] In sub-step 365C, the processing unit 43 of the test device 4 determines whether the difference between the number of successful forwarding (RTok) and the number of failed forwarding (RTfail) is less than or equal to the other precision value. When it is determined that the difference between the number of successful forwarding (RTok) and the number of failed forwarding (RTfail) is less than or equal to the other precision value, the process proceeds to sub-step 365D; when it is determined that the difference between the number of successful forwarding (RTok) and the number of failed forwarding (RTfail) is greater than the other precision value, the process returns to sub-step 365A.

[0205] In sub-step 365D, the processing unit 43 of the test device 4 obtains the final forwarding number according to the successful forwarding number (RTok). In this embodiment, the final forwarding number is set to the successful forwarding number (RTok).

[0206] In step 37, the processing unit 43 of the test device 4 determines whether there is at least one unstarted switch 11 among the N switches 11. When the processing unit 43 of the test device 4 determines that there is at least one unstarted switch 11 among the N switches 11, the process proceeds to step 38; when the processing unit 43 of the test device 4 determines that there is no at least one unstarted switch 11 among the N switches 11, the process ends.

[0207] In step 38, the processing unit 43 of the test device 4 generates and transmits a setting command to the unit under test 1 via the communication network to activate one of the at least one unactivated switches 11 and interrupt the internal connection between the activated switches 11. In this way, one of the at least one unactivated switches 11 is automatically added to the stack topology for testing. In this way, the stack architecture composed of different numbers of switches 11 in the unit under test 1 can be automatically tested without the need for the tester to manually adjust the stack architecture and constantly modify the relevant settings.

[0208] In step 39, the processing unit 43 of the test device 4 sets the predetermined number according to the final forwarding number obtained by executing step 36 this time, and returns to step 31. In this embodiment, the predetermined number is set to the final forwarding number obtained by executing step 36 this time. When more routers are added to the stack architecture, the stack topology will become more complex, and the routing traffic that the unit under test 1 can handle will gradually decrease. Therefore, the final forwarding number inherited from the previous stack architecture test is used as the starting value to quickly and efficiently find the maximum number of routes that the unit under test 1 can handle in the current stack architecture.

[0209] See also Fig.15 and Fig.16 The following will illustrate how the testing device 4 tests the final forwarding quantity of the unit under test 1 by way of example. In this example, the number of switches 11 activated by the unit under test 1 is 4.

[0210] First, the predetermined number is set to the final forwarding number obtained by executing step 36 for the third time, such as 15680. Then, step 31 is performed, and the processing unit 43 of the test device 4 sets the packet transmission number (Rsend) to a predetermined number such as 15680. Then, step 32 is performed, and the unit under test 1 counts that there are 11751 routing packets that can be written into its routing table among the 15680 packets, so the writable number (Rtable) is set to 11751 and transmitted to the test device 4. Next, step 33 is performed, wherein sub-step 331 of step 33 is performed first, and the processing unit 43 of the test device 4 determines whether the packet transmission quantity (Rsend=15680) is equal to the writable quantity (Rtable=11751). Since 15680 is not equal to 11751, sub-step 335 is performed, wherein sub-step 335A-1 of sub-step 335A of sub-step 335 is performed first, and the processing unit 43 of the test device 4 obtains the attempted transmission quantity as 13223 according to the packet transmission quantity (Rsend) and the writable quantity (Rtable) using formula (1). Then, sub-steps 335A-2 to 335A-3 are performed, and the unit under test 1 counts that there are 13223 routing packets that can be written into its routing table among the 13223 packets, and therefore sets the writable quantity (Rtable) to 13223 and transmits it to the test device 4. Since 13223 is equal to 13223, sub-step 335A-5 is performed, and the processing unit 43 of the test device 4 obtains the successful transmission number (Rok=13223) according to the attempted transmission number (that is, 13223), and obtains the failed transmission number before success (Rsendbok=15680) according to the packet transmission number (Rsend=15680) when it was most recently determined that the packet transmission number (Rsend=15680) was not equal to the writable number (Rtable=11751) before the packet transmission number (Rsend=13223) was determined to be equal to the writable number (Rtable=13223).

[0211] Next, step 335B is performed, and the processing unit 43 of the test device 4 obtains the number of another attempted transmission as 14776 according to the number of successful transmissions (Rok=13223) and the number of failed transmissions before success (Rsendbok=15680) using formula (2), and then sub-steps 335C to 335D are performed, and the unit under test 1 counts that there are 14776 routing packets that can be written into its routing table among the 14776 packets, so the number that can be written (Rtable) is set to 14776 and transmitted to the test device 4. Since 14776 is equal to 14776, sub-step 335F is performed, and the processing unit 43 of the test device 4 updates the number of successful transmissions (Rok=14776) according to the number of another attempted transmissions (that is, 14776), and returns to step 335B.

[0212] Next, step 335B is performed again. The processing unit 43 of the test device 4 uses formula (2) to obtain the other attempted transmission number of 15521 according to the number of successful transmissions (Rok=14776) and the number of failed transmissions before success (Rsendbok=15680). Then, sub-steps 335C to 335D are performed. The unit 1 under test counts that there are 14780 routing packets that can be written into its routing table among the 15521 packets. Therefore, the writable number (Rtable) is set to 14780 and transmitted to the test device 4. Since 15521 is not equal to 14780, sub-step 335G is performed, wherein sub-step 335G-1 of sub-step 335G is performed first, and since 14780>15521 / 2, sub-step 335G-2 is performed, and the processing unit 43 of the test device 4 obtains the failed transmission number (Rfail=15521) based on the other attempted transmission number (that is, 15521).

[0213] Next, step 336 is performed, wherein sub-step 336A of sub-step 336 is performed first, and the processing unit 43 of the test device 4 obtains the target approximation number of 14976 according to the number of successful transmissions (Rok=14776), the number of failed transmissions (Rfail=15521) and the accuracy value (Raccuracy=100) using formula (3), and then sub-step 336B is performed, wherein sub-steps 336B-1 to 336B-2 of sub-step 336B are performed first, and the unit 1 under test counts that there are 14748 routing packets that can be written into its routing table among the 14976 packets, and therefore the writable number is set to 14748 and transmitted to the test device 4. Since 14976 is not equal to 14748, sub-step 336B-5 is performed, wherein sub-step 336B-5-1 of sub-step 336B-5 is performed first, and since 14748>14976 / 2, sub-step 336B-5-2 is performed, and the processing unit 43 of the test device 4 updates the number of failed transmissions (Rfail=14976) according to the target approximation number (that is, 14976). Then, 14976-14748=228 is not less than or equal to 100, so the process returns to sub-step 336A, and so on, until the result is obtained. Fig.15 In the illustrated case where the difference between the failed transmission number (Rfail=14876) and the successful transmission number (Rok=14776) is less than or equal to 100, sub-step 336D is performed to set the target transmission number to the successful transmission number (Rok=14776).

[0214] Next, step 34 to step 35 are performed, the unit under test 1 counts that there are 14776 routing packets that can be written into its routing table among the 14776 packets, and calculates that the ratio of the routing packets that can be successfully forwarded is 56%, so the writable number (Rtable) is set to 14776, and the forwarding ratio (RXRate) is set to 56% and transmitted to the test device 4, then step 36 is performed, wherein sub-step 361 of sub-step 36 is performed first, since 14776 is equal to 14776, step 362 is performed, since 56% is not 100%, step 364 is performed, wherein sub-step 364A of sub-step 364 is performed first In step 364A-1, the processing unit 43 of the test device 4 obtains the number of attempted forwarding as 13963 according to the number of packet transmissions (Rsend=14776) and the forwardable ratio (RXRate=56%) using formula (4), and then performs sub-steps 364A-2 to 364A-3. The unit 1 under test counts that there are 13963 routing packets that can be written into its routing table among the 13963 packets, and calculates that the ratio of the routing packets that can be successfully forwarded is 100%. Therefore, the writable number (Rtable) is set to 13963 and the forwardable ratio (RXRate) is set to 100% and transmitted to the test device 4. Next, sub-step 364A-4 is performed. Since 13963 is equal to 13963, sub-step 364A-5 is performed. Since 100% is one hundred percent, sub-step 364A-6 is performed. The processing unit 43 of the test device 4 obtains the successful forwarding number (RTok=13963) according to the attempted forwarding number (that is, 13963), and obtains the failed forwarding ratio before success (RXRatebok=56%) according to the ratio when the forwarding ratio (RXRate=100%) was most recently determined to be not one hundred percent before the forwarding ratio (RXRate=56%) was most recently determined to be not one hundred percent, and updates the failed transmission number before success (Rsendbok) to the packet transmission number (Rsend=14776) when the forwarding ratio (RXRate=56%) was most recently determined to be not one hundred percent before the forwarding ratio (RXRate=100%) was most recently determined to be not one hundred percent.

[0215] Then, sub-step 364B is performed, and the processing unit 43 of the test device 4 obtains the other attempted forwarding number (that is, 14369) according to the failed forwarding ratio before success (RXRatebok=56%) and the failed transmission number before success (Rsendbok=14776) by using formula (5). Then, sub-steps 364C to 364D are performed, and the unit under test 1 counts that there are 14369 routing packets that can be written into its routing table among the 14369 packets, and calculates that the ratio of the routing packets that can be successfully forwarded is 60%, so the writable number (Rtable) is set to 14369 and the forwardable ratio (RXRate) is set to 60% and transmitted to the test device 4. Next, perform sub-step 364E. Since 14369 is equal to 14369, perform step 364F. Since 60% is not 100%, perform step 364H. The processing unit 43 of the test device 4 obtains the failed forwarding number (RTfail=14369) according to the other attempted forwarding number (that is, 14369).

[0216] Next, step 365 is performed, wherein sub-step 365A of sub-step 365 is performed first, and the processing unit 43 of the test device 4 obtains the other target approximation number of 14163 according to the number of successful forwardings (RTok=13963), the number of failed forwardings (RTfail=14369) and the other accuracy value (Raccuracy=100) using formula (6), and then sub-step 365B is performed, wherein sub-steps 365B-1 to 365B-2 of sub-step 365B are performed first, and the unit under test 1 counts that there are 14163 routing packets that can be written into its routing table among the 14163 packets, and calculates that the ratio of the routing packets that can be successfully forwarded is 70%, so the writable number (Rtable) is set to 14163, and the forwardable ratio (RXRate) is set to 70% and transmitted to the test device 4. Since 14163 is equal to 14163, sub-step 365B-4 is performed. Since 70% is not 100%, sub-step 365B-6 is performed. The processing unit 43 of the test device 4 updates the number of failed forwarding (RTfail=14163) according to the other target approximation number (that is, 14163). Then, 14163-13963=200 is not less than or equal to 100, so the process returns to sub-step 365A, and so on, until the result is obtained. Fig.16 In the illustrated case where the difference between the failed forwarding number (RTfail=14063) and the successful forwarding number (RTok=13963) is less than or equal to 100, sub-step 365D is performed to set the final forwarding number to the successful forwarding number (RTok=13963).

[0217] In summary, the routing performance testing method of the present invention automatically adds one of the at least one unactivated switches 11 to the stack topology and automatically calculates the final forwarding quantity, so as to achieve automatic testing of the routing performance corresponding to each of the stack architectures composed of different numbers of switches 11 in the unit under test 1, thereby standardizing the test process to be applied to all stack topology environments for testing, thereby greatly reducing the labor cost. In addition, by first obtaining the number of successful transmissions (Rok) and the number of failed transmissions (Rfail), the upper and lower limits of the routing table capacity are preliminarily determined, and then the successful transmission number (Rok) and the number of failed transmissions (Rfail) are combined with the accuracy value to quickly and more accurately approximate the routing table capacity. The target transmission quantity (Rok) is obtained. In addition, by first obtaining the successful forwarding quantity (RTok) and the failed forwarding quantity (RTfail), the upper and lower limit intervals for stably forwarding all traffic are preliminarily determined. Then, the final forwarding quantity (RTok) is quickly and more accurately approximated according to the successful forwarding quantity (RTok) and the failed forwarding quantity (RTfail) in combination with the other precision value. Compared with the traditional binary search method, the truly optimal routing performance result can be obtained. Furthermore, by adopting the final forwarding quantity tested by the previous stack architecture as the starting value, the maximum number of routes that the unit under test 1 can handle in the current stack architecture can be quickly and efficiently found, so the purpose of the present invention can be achieved.

[0218] The above are merely embodiments of the present invention and should not be used to limit the scope of the present invention. That is, any simple equivalent changes and modifications made according to the claims and description of the present invention still fall within the scope of the present invention.

Claims

1. A routing performance testing method, adapted to test the routing performance of a unit under test comprising N switches, where N ≥ 1, and implemented by a testing device connected to the unit under test via a communication network, characterized in that: The routing effectiveness testing method comprises the following steps: (A) using a predetermined number as a packet transmission number, generating and transmitting a routing packet containing the packet transmission number to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table in the routing packet as a writable number and transmits the count to the test device; (B) obtaining, based on the number of packets transmitted and the number of packets that can be written into the routing table of the unit under test, a number of successful transmissions that can be completely written into the routing table of the unit under test, and a number of failed transmissions that cannot be completely written into the routing table of the unit under test; (C) obtaining a target transmission quantity that can be completely written into the routing table of the unit under test according to the successful transmission quantity, the failed transmission quantity, and the accuracy value; (D) setting the packet transmission quantity as the target transmission quantity, generating and transmitting routing packets of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table as the writable quantity, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio, and transmits the calculated ratio to the test device; (E) obtaining, based on the packet transmission quantity and the forwardable ratio, a number of successful forwardings in which the unit under test can completely forward all routing packets, and a number of failed forwardings in which the unit under test cannot completely forward all packets; and (F) Obtaining a final forwarding quantity at which the unit under test can completely forward all packets according to the successful forwarding quantity, the failed forwarding quantity, and another precision value, so as to test the routing performance of the unit under test.

2. The routing performance testing method according to claim 1, wherein: Step (B) comprises the following sub-steps: (B-1) obtaining the number of successful transmissions that can be completely written into the routing table of the unit under test and the number of failed transmissions before success based on the number of packet transmissions and the number of writable packets; BCPI-230168 Page 2 / 8 (B-2) obtaining a number of attempted transmissions between the number of successful transmissions and the number of failed transmissions before success based on the number of successful transmissions and the number of failed transmissions before success; (B-3) setting the packet transmission number to the attempted transmission number, generating and transmitting a routing packet containing the packet transmission number to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table in the routing packet as the writable number and transmits the count to the test device; (B-4) determining whether the packet transmission quantity is equal to the writable quantity; (B-5) When it is determined that the packet transmission quantity is equal to the writable quantity, the successful transmission quantity is updated according to the attempted transmission quantity, and the process returns to step (B-2); and (B-6) When it is determined that the packet transmission number is not equal to the writable number, the failed transmission number is obtained according to the attempted transmission number.

3. The routing performance testing method according to claim 2, wherein: Step (B-1) comprises the following sub-steps: (B-1-1) obtaining another attempted transmission number between the packet transmission number and the writable number according to the packet transmission number and the writable number; (B-1-2) setting the packet transmission number to the other attempted transmission number, generating and transmitting a routing packet containing the packet transmission number to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as the writable number and transmits the count to the test device; (B-1-3) Determining whether the packet transmission quantity is equal to the writable quantity; (B-1-4) when it is determined that the number of transmitted packets is equal to the writable number, obtaining the number of successfully transmitted packets based on the number of another attempted transmissions, and obtaining the number of failed transmissions before success based on the number of transmitted packets when it was most recently determined that the number of transmitted packets was not equal to the writable number before it was determined that the number of transmitted packets was equal to the writable number; and (B-1-5) When it is determined that the number of packets transmitted is not equal to the writable number BCPI-230168 Page 3 / 8 When measuring, return to step (B-1-1).

4. The routing performance testing method according to claim 2, wherein: Step (B-6) comprises the following sub-steps: (B-6-1) When it is determined that the packet transmission quantity is not equal to the writable quantity, determining whether the writable quantity is greater than half of the packet transmission quantity; (B-6-2) when it is determined that the writable number is greater than half of the packet transmission number, obtaining the failed transmission number based on the attempted transmission number; and (B-6-3) When it is determined that the writable quantity is not greater than half of the packet transmission quantity, return to step (B-1).

5. The routing effectiveness testing method according to claim 1, wherein: Step (C) comprises the following sub-steps: (C-1) obtaining a target approach number between the number of successful transmissions and the number of failed transmissions according to the number of successful transmissions and the number of failed transmissions; (C-2) updating one of the number of successful transmissions and the number of failed transmissions according to the target approach number; (C-3) determining whether the difference between the number of successful transmissions and the number of failed transmissions is less than or equal to the accuracy value; and (C-4) When it is determined that the difference between the number of successful transmissions and the number of failed transmissions is equal to or smaller than the accuracy value, the target transmission number is obtained based on the number of successful transmissions.

6. The routing effectiveness testing method according to claim 5, characterized in that: After sub-step (C-3), the following sub-steps are further included: (C-5) When it is determined that the difference between the number of successful transmissions and the number of failed transmissions is greater than the accuracy value, the process returns to step (C-1).

7. The routing effectiveness testing method according to claim 5, wherein: Sub-step (C-2) includes the following sub-steps: (C-2-1) setting the packet transmission quantity to the target approximate quantity, generating and transmitting a routing packet containing the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as the writable quantity and transmits the count to the test device; BCPI-230168 Page 4 / 8 (C-2-2) Determining whether the packet transmission quantity is equal to the writable quantity; (C-2-3) when it is determined that the packet transmission quantity is equal to the writable quantity, updating the successful transmission quantity according to the target approach quantity; and (C-2-4) When it is determined that the packet transmission quantity is not equal to the writable quantity, the failed transmission quantity is updated according to the target approach quantity.

8. The routing effectiveness testing method according to claim 7, wherein: Sub-step (C-2-4) further includes the following sub-steps: (C-2-4-1) When it is determined that the packet transmission quantity is not equal to the writable quantity, determining whether the writable quantity is greater than half of the packet transmission quantity; and (C-2-4-2) When it is determined that the writable number is greater than half of the packet transmission number, updating the failed transmission number according to the target approach number; and (C-2-4-3) When it is determined that the writable quantity is not greater than half of the packet transmission quantity, return to step (B).

9. The routing effectiveness testing method according to claim 1, wherein: Step (E) comprises the following sub-steps: (E-1) obtaining the number of successful forwardings and the ratio of failed forwardings before success of the unit under test that can completely forward all routing packets based on the number of packet transmissions and the forwardable ratio, and updating the number of failed forwardings before success; (E-2) obtaining a forwarding attempt number between the number of successful forwardings and the number of failed forwardings before success according to the failed forwarding ratio before success and the number of failed forwardings before success; (E-3) setting the packet transmission number as the attempted forwarding number, generating and transmitting routing packets corresponding to the packet transmission number to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table as the writable number, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio, and transmits the calculated ratio to the test device; (E-4) determining whether the packet transmission quantity is equal to the writable quantity; (E-5) When it is determined that the packet transmission quantity is not equal to the writable quantity, return to step (B); BCPI-230168 Page 5 / 8 (E-6) When it is determined that the packet transmission quantity is equal to the writable quantity, Determining whether the forwardable ratio is 100%; (E-7) When it is determined that the forwarding ratio is 100%, the number of successful forwardings is updated according to the number of attempted forwardings, and the process returns to step (E-2); and (E-8) When it is determined that the forwarding ratio is not 100%, the number of failed forwardings is obtained according to the number of attempted forwardings.

10. The routing effectiveness testing method according to claim 9, characterized in that: Sub-step (E-1) includes the following sub-steps: (E-1-1) obtaining another attempted forwarding number smaller than the packet transmission number according to the packet transmission number and the forwardable ratio; (E-1-2) setting the packet transmission number as the other attempted forwarding number, generating and transmitting routing packets containing the packet transmission number to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table as the writable number, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio, and transmits the calculated ratio to the test device; (E-1-3) Determining whether the packet transmission quantity is equal to the writable quantity; (E-1-4) When it is determined that the packet transmission quantity is not equal to the writable quantity, return to step (B); (E-1-5) When it is determined that the packet transmission quantity is equal to the writable quantity, determining whether the forwarding ratio is 100%; (E-1-6) When the forwarding ratio is determined to be 100%, obtaining the number of successful forwarding attempts based on the number of attempted forwarding attempts, obtaining a pre-success failure forwarding ratio based on the ratio when the forwarding ratio was most recently determined not to be 100% before the forwarding ratio was determined to be 100%, and updating the pre-success failure forwarding ratio to the number of packet transmissions when the forwarding ratio was most recently determined not to be 100% before the forwarding ratio was determined to be 100%. and (E-1-7) When it is determined that the forwarding ratio is not 100%, return to step (E-1-1).

11. The routing effectiveness testing method according to claim 1, wherein: BCPI-230168 Page 6 / 8 Step (F) comprises the following sub-steps: (F-1) obtaining another target approximation number between the successful forwarding number and the failed forwarding number according to the successful forwarding number and the failed forwarding number; (F-2) updating one of the number of successful forwarding and the number of failed forwarding according to the other target approaching number; (F-3) determining whether the difference between the number of successful forwarding and the number of failed forwarding is less than or equal to the other accuracy value; and (F-4) When it is determined that the difference between the number of successful forwardings and the number of failed forwardings is less than or equal to the other precision value, the final forwarding number is obtained according to the number of successful forwardings.

12. The routing effectiveness testing method according to claim 11, wherein: After sub-step (F-3), the following steps are also included: (F-5) When it is determined that the difference between the number of successful forwarding and the number of failed forwarding is greater than the other accuracy value, return to sub-step (F-1).

13. The routing effectiveness testing method according to claim 11, wherein: Sub-step (F-2) includes the following sub-steps: (F-2-1) setting the packet transmission quantity to the other target approximate quantity, generating and transmitting routing packets corresponding to the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets that can be written into its routing table as the writable quantity, and calculates the ratio of the routing packets that can be successfully forwarded as the forwardable ratio, and transmits the calculated ratio to the test device; (F-2-2) Determining whether the packet transmission quantity is equal to the writable quantity; (F-2-3) When it is determined that the packet transmission quantity is not equal to the writable quantity, the process returns to step (B); (F-2-4) When it is determined that the packet transmission quantity is equal to the writable quantity, determining whether the forwarding ratio is 100%; (F-2-5) When it is determined that the forwarding ratio is 100%, updating the number of successful forwardings according to the number of approaching another target; and (F-2-6) When it is determined that the forwarding ratio is not 100%, according to BCPI-230168 page 7 / 8 The number of failed forwardings is updated based on the number of approaching another target.

14. The routing effectiveness testing method according to claim 1, wherein: Before step (A), the following steps are also included: (G) Activate one of the N switches.

15. The routing effectiveness testing method according to claim 1, wherein: After step (F), the method further comprises the following steps: (H) determining whether there is at least one inactivated switch among the N switches; and (I) When it is determined that there is at least one unactivated switch, one of the at least one unactivated switches is activated, and the internal connection between the activated switches is disconnected. The predetermined number is set according to the final forwarding number obtained by executing step (F) this time, and the process returns to step (A).

16. The routing effectiveness testing method according to claim 1, wherein: Between step (A) and step (B), the following steps are also included: (J) determining whether the packet transmission quantity is equal to the writable quantity; (K) When it is determined that the packet transmission quantity is not equal to the writable quantity, proceeding to step (B); (L) when it is determined that the packet transmission quantity is equal to the writable quantity, generating and transmitting again a routing packet of the packet transmission quantity to the unit under test via the communication network, so that the unit under test counts the number of routing packets in the routing packet that can be written into its routing table as the writable quantity and transmits the counted number to the test device; (M) determining again whether the packet transmission quantity is equal to the writable quantity; (N) when it is determined that the packet transmission quantity is not equal to the writable quantity, proceeding to step (B); and (O) When it is determined that the packet transmission quantity is equal to the writable quantity, The target transmission quantity is obtained according to the packet transmission quantity.

17. The routing effectiveness testing method according to claim 1, wherein: Between step (D) and step (E), the following steps are further included: (P) Determine whether the packet transmission quantity is equal to the writable quantity; BCPI-230168 Page 8 / 8 (Q) When it is determined that the packet transmission quantity is not equal to the writable quantity, returning to step (B); (R) when it is determined that the packet transmission quantity is equal to the writable quantity, determining whether the forwarding ratio is 100%; (S) when it is determined that the forwarding ratio is 100%, obtaining the final forwarding quantity according to the packet transmission quantity; and (T) When it is determined that the forwarding ratio is not 100%, proceed to step (E).