CN113438125A - Test method and system - Google Patents

Test method and system Download PDF

Info

Publication number
CN113438125A
CN113438125A CN202110637528.XA CN202110637528A CN113438125A CN 113438125 A CN113438125 A CN 113438125A CN 202110637528 A CN202110637528 A CN 202110637528A CN 113438125 A CN113438125 A CN 113438125A
Authority
CN
China
Prior art keywords
flow
tested
nat
test
correct
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110637528.XA
Other languages
Chinese (zh)
Other versions
CN113438125B (en
Inventor
张志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202110637528.XA priority Critical patent/CN113438125B/en
Publication of CN113438125A publication Critical patent/CN113438125A/en
Application granted granted Critical
Publication of CN113438125B publication Critical patent/CN113438125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses

Abstract

The invention discloses a test method and a test system, which relate to the field of data communication. The invention has the advantages of simplifying test difficulty, improving test efficiency, reducing workload of testers, shortening test period and ensuring accuracy and rigor of test results.

Description

Test method and system
Technical Field
The present invention relates to the field of data communications, and in particular, to a test method and system.
Background
The NAT (Network Address translation) technology can not only solve the problem of insufficient IP addresses, but also effectively avoid attacks from outside the Network, and hide and protect computers inside the Network. NAT technology is widely used, and NAT function becomes one of the basic functions that router devices and security devices need to have.
In practical applications, a large number of NAT entries are generated by NAT translation, and whether the NAT entry translation is accurate or not needs sufficient test verification by a tester during test activities. How to ensure the accuracy and the rigor of the NAT test result and improve the test efficiency of the whole test process is very important for the development of test activities.
Disclosure of Invention
The invention provides a test method and a test system, which solve the problems of low test efficiency and inaccurate test result when a large number of NAT table entries are generated by equipment to be tested, and can also greatly save the investment of related test resources.
In a first aspect, the present invention provides a method of testing, the method comprising:
the method comprises the steps that a tester sends test flow to equipment to be tested, wherein the test flow comprises the flow to be tested and background flow; the device to be tested performs NAT conversion on the flow to be tested according to a preset conversion rule, and sends the background flow and the flow to be tested after NAT conversion to a flow analysis device; and the flow analysis equipment counts the flow with correct NAT conversion so as to provide analysis results for testers.
Before the tester sends the test traffic to the device under test, the method further includes: establishing a specified number of flows to be tested on the tester, wherein the flows to be tested respectively comprise different IP addresses and port numbers, and the protocol types of all messages in the flows to be tested are the same; creating background flow on the tester, wherein at least one tuple in the quintuple of the background flow and the quintuple of the flow to be tested is different; and the flow to be detected and the background flow are distinguished through the identifier in the message reserved field.
The traffic analysis equipment carries out statistics on the traffic with the correct NAT conversion, and the statistics comprises the following steps: the flow analysis equipment judges that if the identification of a reserved field in a message of received flow is the same as the identification of the reserved field in the flow to be detected, the IP address range in the message belongs to the range of a conversion address pool, and the protocol type of the message is the same as the protocol type of the flow to be detected, the message belongs to the flow with correct NAT conversion, and correct statistics are accumulated according to the different flow types to which the message belongs.
Further, the method further comprises: the equipment to be tested counts the number of the generated NAT table entries so as to judge whether the number of the NAT table entries is equal to the number of the generated NAT table entries according to the number of the NAT table entries, the correct statistical value and the specified number when the flow to be tested is created, and if the number of the NAT table entries is equal to the specified number, the testing result meets the testing requirement; otherwise, the test result is not in accordance with the test requirement.
Preferably, after the traffic analysis device performs statistics on traffic with correct NAT translation, the method further includes: the flow analysis equipment judges that if the correct statistic value does not change any more within a specified time, the flow analysis equipment sends the correct statistic value to a controller; and after receiving the correct statistical value, the controller obtains a test result according to the acquired specified quantity of the flow to be tested and the quantity of the NAT table entries.
In a second aspect, the present invention provides a test system, which specifically includes:
the system comprises a tester and a controller, wherein the tester is used for sending test flow to equipment to be tested, and the test flow comprises the flow to be tested and background flow;
the device to be tested is used for carrying out NAT conversion on the flow to be tested according to a preset conversion rule and sending the background flow and the flow to be tested after the NAT conversion to the flow analysis device; and the quantity used for counting and generating NAT table entries;
and the flow analysis equipment is used for counting the flow with correct NAT conversion so as to provide analysis results for testers.
The tester is specifically used for creating a specified number of flows to be tested before sending test flows to the equipment to be tested, wherein the flows to be tested respectively comprise different IP addresses and port numbers, and the protocol types of all messages in the flows to be tested are the same; the flow meter is also used for creating background flow, and at least one tuple in the quintuple of the background flow and the quintuple of the flow to be measured is different; and the flow to be detected and the background flow are distinguished through the identifier in the message reserved field.
The flow analysis device is specifically configured to: judging whether the message belongs to the flow with the correct NAT translation if the identification of the reserved field in the message of the received flow is the same as the identification of the reserved field in the flow to be detected, the IP address range in the message belongs to the translation address pool range and the protocol type of the message is the same as the protocol type of the flow to be detected, and accumulating the correct statistical value according to the different flow types of the message.
Preferably, the system further comprises: a controller; the flow analysis equipment is specifically further configured to determine that the correct statistical value is not changed any more within a specified time period, and send the correct statistical value to the controller; the controller is specifically configured to obtain a test result according to the acquired specified number of the to-be-tested traffic and the number of the NAT entries after receiving the correct statistical value sent by the traffic analysis device.
Further, the controller is specifically configured to: judging whether the quantity of the NAT table entries, the correct statistical value and the specified quantity when the flow to be tested is created are equal, and if so, obtaining that a test result meets the test requirement; otherwise, the obtained test result does not meet the test requirement.
The invention has the beneficial effects that: the background flow and the flow to be tested which are created by the tester are distinguished by the mark in the message reserved field, so that the flow analysis equipment can accurately classify and count the flow passing through the equipment to be tested, and the statistical value can clearly reflect whether the NAT function of the equipment to be tested is normal or not. The invention has the advantages of simplifying test difficulty, improving test efficiency, reducing workload of testers, shortening test period and ensuring accuracy and rigor of test results.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart illustrating a testing method provided by an embodiment of the invention;
FIG. 2 is a schematic diagram of a test system provided by an embodiment of the invention;
fig. 3 is a schematic diagram of another testing system provided in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
The following are detailed descriptions of the respective embodiments.
Example one
The embodiment of the invention provides a test method, a processing flow chart of which is shown in figure 1, and the test method comprises the following steps:
step S101, the tester sends test flow to the equipment to be tested, and the test flow comprises the flow to be tested and background flow.
The tester can be selected from common testers such as TC (Testcenter), Smartbits, IXIA, Xin and Tai (XINNERTEL) or streaming software.
It should be noted that before the tester sends the test traffic to the device to be tested, a specified number of traffic to be tested needs to be created on the tester, where the traffic to be tested includes different IP addresses and port numbers, the protocol types of the traffic to be tested are not limited, and the protocol types of all messages in the traffic to be tested are the same. The flow to be detected can adopt UDP messages, TCP messages or other protocol type messages. Meanwhile, background flow is established on the tester, and at least one tuple in the quintuple of the background flow and the quintuple of the flow to be tested is different; the flow to be detected and the background flow are distinguished by the identifier in the message reserved field.
For example, traffic to be tested including N different IP addresses and M different port numbers is created, which is NXM types of traffic to be tested, and the message type of the traffic to be tested may be UDP message, TCP message, or other protocol types. And meanwhile, background flow is created, the number of the messages contained in the background flow is not limited, and at least one tuple of any message in the background flow is different from at least one tuple of each message in the flow to be detected. The flow to be detected and the background flow can be distinguished by the identifier in the message reserved field. For example, the message reserved field is set with special characters, character strings or Bit bits for distinguishing.
For example, in the embodiment of the present invention, an IP Reserved field in a message is set as an example to distinguish traffic to be detected from background traffic, where the IP Reserved field is a first Bit located in an IP header Flag field, and a default value of the IP Reserved field is 0. For example, the traffic to be measured may be indicated when the IP Reserved field is set to 1, and the background traffic may be indicated when the IP Reserved field is set to 0.
And S102, the device to be tested performs NAT (network Address translation) conversion on the flow to be tested according to a preset conversion rule, and sends the background flow and the flow to be tested which is subjected to the NAT conversion to the flow analysis device.
In this embodiment, the device under test may be a router, a firewall, or other devices supporting NAT function. The preset conversion rule can be matched according to the quintuple of the flow to be detected. Under normal conditions, the device to be tested only performs NAT conversion on the traffic to be tested, sends the traffic to be tested after NAT conversion to the traffic analysis device, and simultaneously directly forwards the background traffic to the traffic analysis device. This step is a standard function and a using method of the NAT technology, and is not described herein again.
It should be noted that the device to be tested may send the test traffic to the traffic analysis device in a routing manner, a mirror traffic manner, or the like.
Step S103, the flow analysis equipment counts the flow with the correct NAT conversion so as to be used for a tester to analyze the result.
In this embodiment, the traffic analysis device may be a server, a PC, a traffic analyzer, or the like, in which a message analysis program is installed. In this step, the traffic analysis device stores the received messages in a local storage space, and then analyzes the stored messages one by one, and extracts key fields such as an IP Reserved field, a source IP address, a destination IP address, a protocol type, a source port number, a destination port number, and the like in the messages. One implementation is that the traffic analysis device performs statistics on the traffic correctly translated by the NAT by comparing key fields in the message.
In this embodiment, the traffic analysis device determines that, if the identifier of the reserved field in the message of the received traffic is the same as the identifier of the reserved field in the traffic to be detected, the IP address range in the message belongs to the translation address pool range, and the protocol type of the message is the same as the protocol type of the traffic to be detected, the message belongs to the traffic with correct NAT translation, and may generate the unique identifier of the traffic type corresponding to the message, where the unique identifier of the traffic type may be obtained by a five-tuple or seven-tuple calculation MD5 value of the message, or may be obtained in a user-defined manner. In another embodiment of the present invention, the unique identifier of the traffic type is illustrated by using an MD5 value as an example, and the MD5 value may be obtained by calculating the identifier of a Reserved field in the five-tuple and IP Reserved fields of the packet. If the unique identifier of the traffic type corresponding to the message is different from the unique identifiers of the traffic types corresponding to the other received messages, the traffic type to which the message belongs is a brand new traffic type on the traffic analysis equipment, and the traffic analysis equipment stores the unique identifier of the traffic type corresponding to the message and accumulates a correct statistical value. If the unique identifier of the traffic type corresponding to the message is the same as the unique identifier of the traffic type corresponding to the received message, it is indicated that the traffic type to which the message belongs has already been counted on the traffic analysis device, and at this time, the correct counting value remains unchanged. Wherein the initial value of the correct statistic is 0.
In the embodiment of the invention, after waiting for the preset time, the tester stops streaming. The device to be tested counts the number of the generated NAT table entries, so that a tester can judge whether the number of the NAT table entries is equal to that of the NAT table entries according to the number of the NAT table entries, a correct statistical value and a specified number when the flow to be tested is created, and if the number of the NAT table entries is equal to that of the NAT table entries, a test result meets a test requirement; otherwise, the test result is not in accordance with the test requirement.
For example, in step S101, NXM types of traffic to be tested are included in the traffic to be tested created on the tester. The number of the generated NAT table entries can be checked in real time by adopting a command on the device to be tested, and the number of the NAT table entries is assumed to be Count. The correct statistic can be checked on the flow analysis equipment in a real-time display mode, and the correct statistic is assumed to be TestNum. After waiting for a preset time, the tester stops streaming, if Count is NXM, it indicates that the number of the NAT table entries generated by the device to be tested is the same as the number of the flows to be tested created on the tester, and the generated NAT table entries have no repeated entries, and at the same time, the device to be tested performs correct conversion on all the flows to be tested according to the NAT table entries, which indicates that the test result meets the preset test requirement, and the NAT function of the device to be tested is normal; otherwise, the NAT function of the device to be tested is abnormal.
For example, if the Count is not equal to NXM, it indicates that the device under test does not generate the corresponding number of NAT entries, and the reason for this phenomenon may be caused by insufficient NAT conversion performance of the device under test or due to an abnormal NAT function of the device under test. If TestNum is not equal to NXM, it indicates that the device under test has not performed correct NAT translation for all traffic under test. One of the reasons for this phenomenon may be that the device under test does not perform NAT conversion on part of the traffic to be tested due to insufficient NAT conversion performance of the device under test, and at this time, Count is not equal to NXM and TestNum is not equal to NXM. Another reason for this phenomenon may be caused by an abnormal NAT function of the device to be tested, for example, the NAT function of the device to be tested incorrectly converts different multiple traffic messages to be tested into the same message, where Count is equal to NXM and TestNum is not equal to NXM.
Another possible implementation manner is that the traffic analysis device performs statistics on traffic with correct NAT translation and also performs statistics on traffic with incorrect NAT translation. The traffic analysis device performs statistics on the traffic of the NAT conversion error, and the statistics includes: and judging that the message belongs to the flow of NAT conversion errors and accumulating error statistics if the identification of the reserved field in the message of the received flow is the same as the identification of the reserved field in the background flow and the IP address range in the message belongs to the range of the conversion address pool. And if the error statistic value is not equal to the initial value, the testing result does not meet the preset testing requirement, and the NAT function of the equipment to be tested is abnormal. At the moment, the tester can stop the flow of the tester in time, so that the testing time is saved. Wherein the initial value of the error statistic is 0.
For example, if the traffic analysis device performs statistics on the traffic with the NAT translation error, the error statistics value can be viewed on the traffic analysis device in a real-time display manner. If the error statistic value is BgNum, if the BgNum is not equal to the initial value, the background traffic is converted when the NAT function of the equipment to be tested is wrong, and the NAT function of the equipment to be tested is abnormal. At the moment, the tester can stop the flow of the tester in time so as to save the testing time.
Preferably, after the traffic analysis device counts the traffic correctly converted by the NAT, the traffic analysis device determines that if the correct statistical value does not change any more within a specified time period, the traffic analysis device sends the correct statistical value to the controller; and after receiving the correct statistical value, the controller obtains a test result according to the acquired specified quantity of the flow to be tested and the quantity of the NAT table entries. The determination method is the same as above, and is not described herein again.
Another possible implementation manner is that after the traffic analysis device performs statistics on the traffic of the NAT conversion error, if the error statistic value is not equal to the initial value, the traffic analysis device sends the error statistic value to the controller, and the controller obtains that the test result does not meet the preset test requirement and notifies the tester to stop streaming, so as to save the test time.
The internal calculation time of the embodiment of the invention is very short, and the test result can be displayed in real time or automatically. The method can ensure the accuracy and the rigor of the test result, can greatly improve the test efficiency of testers, and saves the investment of a large number of test resources. Especially, the value of the invention can be fully embodied when the number of the generated NAT table entries is more.
Example two
An embodiment of the present invention provides a test system 20, as shown in fig. 2, specifically including: the device comprises a tester 201, a device under test 202 and a flow analysis device 203. The tester 201 is connected to the device under test 202, and the device under test 202 is connected to the flow analysis device 203.
The tester 201 is configured to send a test flow to the device 202 to be tested, where the test flow includes a flow to be tested and a background flow;
the device to be tested 202 is used for performing NAT (network Address translation) conversion on the flow to be tested according to a preset conversion rule and sending the background flow and the flow to be tested after the NAT conversion to the flow analysis device 203; and the quantity used for counting and generating NAT table entries;
and the flow analysis device 203 is used for counting the flow with correct NAT conversion so as to provide analysis results for a tester.
As an embodiment of the present invention, the tester 201 is further specifically configured to: before sending the test traffic to the device to be tested 202, creating a specified number of traffic to be tested, wherein the traffic to be tested respectively comprises different IP addresses and port numbers, the protocol type of the traffic to be tested is not limited, and the protocol types of all messages in the traffic to be tested are the same; the flow meter is also used for creating background flow, and at least one tuple in the quintuple of the background flow and the quintuple of the flow to be measured is different; the flow to be detected and the background flow are distinguished by the identifier in the message reserved field.
The flow analysis device 203 is specifically configured to: and judging whether the message belongs to the flow with correct NAT conversion if the identification of the reserved field in the message of the received flow is the same as the identification of the reserved field in the flow to be detected, the IP address range in the message belongs to the range of the conversion address pool, and the protocol type of the message is the same as the protocol type of the flow to be detected, and accumulating a correct statistical value according to the different flow types of the message. Wherein the initial value of the correct statistic is 0.
In this embodiment, a tester judges whether the NAT entries are equal to each other according to the number of the NAT entries, the correct statistical value, and the specified number when creating the traffic to be tested, and if the NAT entries are equal to each other, it indicates that the test result meets the test requirement; otherwise, the test result is not in accordance with the test requirement.
Another possible implementation manner is that the flow analysis device 203 is specifically further configured to: and judging whether the message belongs to the flow of NAT conversion errors or not and accumulating error statistic values if the identification of the reserved field in the message of the received flow is the same as the identification of the reserved field in the background flow and the IP address range in the message belongs to the range of the conversion address pool. If the error statistic is not equal to the initial value, it indicates that the test result does not meet the preset test requirement, and the NAT function of the device under test 202 is abnormal. At this moment, the tester 201 can stop the flow in time, so that the testing time is saved. Wherein the initial value of the error statistic is 0.
The internal calculation time of the embodiment of the invention is very short, and the test result can be displayed in real time. The method can ensure the accuracy and the rigor of the test result, can greatly improve the test efficiency of testers, and saves the investment of a large number of test resources. Especially, the value of the invention can be fully embodied when the number of the generated NAT table entries is more.
EXAMPLE III
An embodiment of the present invention provides another test system 30, a schematic diagram of which is shown in fig. 3, a controller 301 is added on the basis of the second embodiment, and as shown in fig. 3, the tester 201, the device to be tested 202, and the flow analysis device 203 are respectively connected to the controller 301. The purpose of the tester 201, the device to be tested 202, and the flow rate analyzing device 203 is consistent with that of each corresponding device in the second testing system 20 in the embodiment, and the tester can interact with the controller 301, so that the controller 301 obtains relevant testing data and obtains a testing result, thereby realizing testing automation. Wherein the content of the first and second substances,
the controller 301 is specifically configured to receive a correct statistical value sent by the traffic analysis device 203, and obtain a test result according to the acquired specified number of flows to be tested and the number of NAT entries; the flow analysis device 203 is further configured to determine that the correct statistics are not changed within a specified time period, and send the correct statistics to the controller 301.
For example, in the present embodiment, the controller 301 actively issues a request to the tester 201 and the device under test 202 to obtain test data is taken as an example for explanation. The controller 301 is specifically configured to receive a correct statistical value sent by the traffic analysis device 203, and issue requests to the tester 201 and the device to be tested 202 respectively to obtain the specified number and the number of NAT entries when creating the traffic to be tested, so as to obtain a test result. The tester 201 is further specifically configured to receive a request for acquiring the specified quantity when creating the traffic to be tested, which is issued by the controller 301, and send the specified quantity when creating the traffic to be tested to the controller 301. The device to be tested 202 is specifically configured to receive a request for acquiring the number of generated NAT entries issued by the controller 301, and send the number of NAT entries to the controller 301. The flow analysis device 203 is further configured to determine that the correct statistics are not changed within a specified time period, and send the correct statistics to the controller 301.
Further, after the controller 301 obtains the relevant test data, the controller 301 is specifically configured to: judging that if the quantity of the NAT table entries, the correct statistical value and the specified quantity when the flow to be tested is created are equal, the testing result meets the testing requirement; otherwise, the obtained test result does not meet the test requirement.
Another possible implementation manner is that the controller 301 is specifically configured to receive an error statistic value sent by the traffic analysis device 203, notify the tester 201 to stop streaming, and obtain that a test result does not meet a test requirement; the traffic analysis device 203 is further configured to determine that the error statistic is not equal to the initial value, and send the error statistic to the controller 301.
The internal calculation time of the embodiment of the invention is very short, and the test result can be automatically displayed. The method can ensure the accuracy and the rigor of the test result, can greatly improve the test efficiency of testers, and saves the investment of a large number of test resources. Especially, the value of the invention can be fully embodied when the number of the generated NAT table entries is more.
All parts of the specification are described in a progressive mode, the same and similar parts of all embodiments can be referred to each other, and each embodiment is mainly introduced to be different from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, and reference may be made to the description of the method embodiments for relevant points.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method of testing, the method comprising:
the method comprises the steps that a tester sends test flow to equipment to be tested, wherein the test flow comprises the flow to be tested and background flow; the device to be tested performs NAT conversion on the flow to be tested according to a preset conversion rule, and sends the background flow and the flow to be tested after NAT conversion to a flow analysis device; and the flow analysis equipment counts the flow with correct NAT conversion so as to provide analysis results for testers.
2. The method of claim 1, wherein before the tester sends test traffic to the device under test, the method further comprises:
establishing a specified number of flows to be tested on the tester, wherein the flows to be tested respectively comprise different IP addresses and port numbers, and the protocol types of all messages in the flows to be tested are the same;
creating background flow on the tester, wherein at least one tuple in the quintuple of the background flow and the quintuple of the flow to be tested is different;
and the flow to be detected and the background flow are distinguished through the identifier in the message reserved field.
3. The method of claim 2, wherein the traffic analysis device making statistics of traffic for which NAT translation is correct comprises: the flow analysis equipment judges that if the identification of a reserved field in a message of received flow is the same as the identification of the reserved field in the flow to be detected, the IP address range in the message belongs to the range of a conversion address pool, and the protocol type of the message is the same as the protocol type of the flow to be detected, the message belongs to the flow with correct NAT conversion, and correct statistics are accumulated according to the different flow types to which the message belongs.
4. The method of claim 3, wherein the method further comprises:
the equipment to be tested counts the number of the generated NAT table entries so as to judge whether the number of the NAT table entries is equal to the number of the generated NAT table entries according to the number of the NAT table entries, the correct statistical value and the specified number when the flow to be tested is created, and if the number of the NAT table entries is equal to the specified number, the testing result meets the testing requirement; otherwise, the test result is not in accordance with the test requirement.
5. The method of claim 4, wherein after the traffic analysis device counts traffic for which NAT translation is correct, the method further comprises:
the flow analysis equipment judges that if the correct statistic value does not change any more within a specified time, the flow analysis equipment sends the correct statistic value to a controller; and after receiving the correct statistical value, the controller obtains a test result according to the acquired specified quantity of the flow to be tested and the quantity of the NAT table entries.
6. A test system, the system comprising:
the system comprises a tester and a controller, wherein the tester is used for sending test flow to equipment to be tested, and the test flow comprises the flow to be tested and background flow;
the device to be tested is used for carrying out NAT conversion on the flow to be tested according to a preset conversion rule and sending the background flow and the flow to be tested after the NAT conversion to the flow analysis device; and the quantity used for counting and generating NAT table entries;
and the flow analysis equipment is used for counting the flow with correct NAT conversion so as to provide analysis results for testers.
7. The system of claim 6, wherein the tester is further configured to create a specified number of flows to be tested before sending test flows to a device to be tested, where the flows to be tested include different IP addresses and port numbers, respectively, and the protocol types of all messages in the flows to be tested are the same; the flow meter is also used for creating background flow, and at least one tuple in the quintuple of the background flow and the quintuple of the flow to be measured is different; and the flow to be detected and the background flow are distinguished through the identifier in the message reserved field.
8. The system of claim 7, wherein the flow analysis device is specifically configured to:
judging whether the message belongs to the flow with the correct NAT translation if the identification of the reserved field in the message of the received flow is the same as the identification of the reserved field in the flow to be detected, the IP address range in the message belongs to the translation address pool range and the protocol type of the message is the same as the protocol type of the flow to be detected, and accumulating the correct statistical value according to the different flow types of the message.
9. The system of claim 8, wherein the system further comprises: a controller;
the flow analysis equipment is specifically further configured to determine that the correct statistical value is not changed any more within a specified time period, and send the correct statistical value to the controller;
the controller is specifically configured to obtain a test result according to the acquired specified number of the to-be-tested traffic and the number of the NAT entries after receiving the correct statistical value sent by the traffic analysis device.
10. The system of claim 9, wherein the controller is specifically configured to:
judging whether the quantity of the NAT table entries, the correct statistical value and the specified quantity when the flow to be tested is created are equal, and if so, obtaining that a test result meets the test requirement; otherwise, the obtained test result does not meet the test requirement.
CN202110637528.XA 2021-06-08 2021-06-08 Test method and system Active CN113438125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110637528.XA CN113438125B (en) 2021-06-08 2021-06-08 Test method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110637528.XA CN113438125B (en) 2021-06-08 2021-06-08 Test method and system

Publications (2)

Publication Number Publication Date
CN113438125A true CN113438125A (en) 2021-09-24
CN113438125B CN113438125B (en) 2023-02-28

Family

ID=77803896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110637528.XA Active CN113438125B (en) 2021-06-08 2021-06-08 Test method and system

Country Status (1)

Country Link
CN (1) CN113438125B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056218A (en) * 2006-04-14 2007-10-17 华为技术有限公司 A network performance measurement method and system
CN103209103A (en) * 2013-03-25 2013-07-17 华为技术有限公司 Testing method and testing apparatus of network device
US20160020968A1 (en) * 2014-07-17 2016-01-21 Cellos Software Ltd Method For Calculating Statistic Data of Traffic Flows in Data Network And Probe Thereof
US20180062875A1 (en) * 2016-08-29 2018-03-01 Vmware, Inc. Method and system for selecting tunnels to send network traffic through
CN108366001A (en) * 2018-03-05 2018-08-03 东软集团股份有限公司 A kind of transmitted test method and device
CN108494623A (en) * 2018-03-14 2018-09-04 东软集团股份有限公司 A kind of performance test methods and equipment of network forwarding equipment
CN109818824A (en) * 2018-12-29 2019-05-28 东软集团股份有限公司 A kind of message transmitted test method, equipment and storage equipment, program product
CN111565200A (en) * 2020-07-14 2020-08-21 成都数维通信技术有限公司 NAT (network Address translation) association detection method based on multi-path message detection analysis
CN112202646A (en) * 2020-12-03 2021-01-08 观脉科技(北京)有限公司 Flow analysis method and system
CN112787959A (en) * 2020-12-03 2021-05-11 观脉科技(北京)有限公司 Traffic scheduling method and system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101056218A (en) * 2006-04-14 2007-10-17 华为技术有限公司 A network performance measurement method and system
CN103209103A (en) * 2013-03-25 2013-07-17 华为技术有限公司 Testing method and testing apparatus of network device
US20160020968A1 (en) * 2014-07-17 2016-01-21 Cellos Software Ltd Method For Calculating Statistic Data of Traffic Flows in Data Network And Probe Thereof
US20180062875A1 (en) * 2016-08-29 2018-03-01 Vmware, Inc. Method and system for selecting tunnels to send network traffic through
CN108366001A (en) * 2018-03-05 2018-08-03 东软集团股份有限公司 A kind of transmitted test method and device
CN108494623A (en) * 2018-03-14 2018-09-04 东软集团股份有限公司 A kind of performance test methods and equipment of network forwarding equipment
CN109818824A (en) * 2018-12-29 2019-05-28 东软集团股份有限公司 A kind of message transmitted test method, equipment and storage equipment, program product
CN111565200A (en) * 2020-07-14 2020-08-21 成都数维通信技术有限公司 NAT (network Address translation) association detection method based on multi-path message detection analysis
CN112202646A (en) * 2020-12-03 2021-01-08 观脉科技(北京)有限公司 Flow analysis method and system
CN112787959A (en) * 2020-12-03 2021-05-11 观脉科技(北京)有限公司 Traffic scheduling method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
范淑艳等: "一种ATM/MPLS网络的负荷分担方案", 《无线电通信技术》 *

Also Published As

Publication number Publication date
CN113438125B (en) 2023-02-28

Similar Documents

Publication Publication Date Title
CN108737333B (en) Data detection method and device
KR101239401B1 (en) Log analysys system of the security system and method thereof
CN108092854B (en) Test method and device for train-level Ethernet equipment based on IEC61375 protocol
Vermeulen et al. Multilevel MDA-lite Paris traceroute
CN113794605B (en) Method, system and device for detecting kernel packet loss based on eBPF
CN108429653B (en) Test method, device and system
CN110912927B (en) Method and device for detecting control message in industrial control system
CN109194551B (en) Method, device and system for testing performance of real-time Ethernet equipment
CN109656574B (en) Transaction time delay measurement method and device, computer equipment and storage medium
CN106487605B (en) Packet loss rate detection method and device
WO2014040633A1 (en) Identifying fault category patterns in a communication network
CN108683569B (en) Service monitoring method and system for cloud service infrastructure
CN106776346B (en) Test method and device of CCMTS (China center testing System) equipment
WO2020135429A1 (en) Traffic analysis method and apparatus, and traffic detection method and apparatus
CN117176802B (en) Full-link monitoring method and device for service request, electronic equipment and medium
CN113438125B (en) Test method and system
CN114553678B (en) Cloud network soft SLB flow problem diagnosis method
WO2021128936A1 (en) Message processing method and apparatus
CN113904787A (en) Flow auditing method, device, equipment and computer readable storage medium
CN111193639A (en) Network quality detection processing method and system
WO2023093573A1 (en) Charging message processing method and apparatus, system, electronic device, and storage medium
CN112583672B (en) TCP server stability test method based on time stamp
CN112445712B (en) Method and device for generating test source code
CN114338549B (en) Data stream identification processing method, device, server and storage medium
CN115426301B (en) Device detection method, device, equipment and storage medium based on self-generated message

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 610041 nine Xing Xing Road 16, hi tech Zone, Sichuan, Chengdu

Applicant after: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 610041 15-24 floor, 1 1 Tianfu street, Chengdu high tech Zone, Sichuan

Applicant before: MAIPU COMMUNICATION TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant