A method, system and device for realizing network damage
By designing network impairment logic on a programmable switch and using a network programming language to simulate various network impairments, the high cost of existing network impairment instruments is solved, providing a flexible and high-performance network impairment solution and reducing testing costs.
Patent Information
- Application Number
- CN202310224941.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-03
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-03-03
AI Technical Summary
Existing network impairment instruments are expensive, resulting in high costs for network performance testing. General-purpose chips are flexible but have weak performance, while dedicated integrated chips have strong performance but poor functional customization capabilities.
By employing a programmable switch based on a programmable switching chip, network impairment logic can be designed using a network programming language to simulate network impairments, supporting multiple impairment types and flexible customization, thereby reducing costs.
It achieves high-performance, flexible, and customizable network impairment simulation, meeting the impairment requirements of high-speed networks above 100Gbps and reducing the cost of network testing experiments.
Smart Images

Figure CN116208508B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a method, system, and apparatus for achieving network damage. Background Technology
[0002] Network testing provides technical support for network research, optimization, and operation and maintenance. Therefore, network testing is widely used by academia and industry in areas such as network protocol optimization and verification, network equipment performance analysis, network fault location and troubleshooting, and network system reliability assessment.
[0003] Network impairment simulation is a common method in network testing, generally divided into physical simulation and non-physical simulation. Physical simulation typically uses dedicated equipment to simulate the attributes and characteristics of internet backbone networks, integrated space-air-ground networks, cloud data center networks, or other network scenarios. These attributes and characteristics usually include both network functional characteristics and network performance characteristics, such as network topology, network latency, network packet loss rate, and network out-of-order rate. In existing technologies, network impairment analyzers are commonly used physical devices for simulating network performance characteristics.
[0004] Existing network impairment tests typically employ either general-purpose chips like CPUs or dedicated integrated chips like FPGAs to achieve network impairment. The former offers greater flexibility but weaker performance, while the latter provides stronger performance but less customization capability. Currently, specialized network impairment tests are commonly used, but these tests are expensive, leading to high costs for network performance testing. Summary of the Invention
[0005] To address the shortcomings of the prior art, this invention provides a method, system, and apparatus for implementing network impairment. Based on a programmable switch with a programmable switching chip, the invention uses a network programming language to design corresponding network impairment logic for the programmable switch, thereby achieving the functional and performance requirements for simulating network impairment, improving the definability of network impairment simulation, and effectively reducing the cost of conducting network testing experiments.
[0006] In a first aspect, this disclosure provides a method for achieving network impairment.
[0007] A method for achieving network impairment includes:
[0008] Receive user damage instructions, generate and distribute damage configuration templates;
[0009] Receive network flow data packets sent by the sender, perform network impairment logic judgment on the received data packets according to the impairment configuration template, and identify the network flow to be impaired;
[0010] Perform the corresponding network impairment operation on the network flow to be impaired according to the impairment configuration template;
[0011] Store and forward the compromised network stream packets to the receiver.
[0012] A further technical solution, wherein receiving the user's damage instruction and generating and issuing the damage configuration template includes:
[0013] Receive user damage instructions issued by users based on network testing requirements;
[0014] Based on the received user impairment instructions, determine the network flow to be impaired and the impairment parameter information, and convert and generate an impairment configuration template;
[0015] The generated damage configuration template is then distributed.
[0016] A further technical solution is that the damage configuration template includes matching items and parameter items, wherein the matching items are octets of damage flow, and the parameter items are damage type, damage mode and damage parameters;
[0017] The octet consists of the source MAC address, destination MAC address, network layer protocol type, source IP address, destination IP address, transport layer protocol type, source port number, and destination port number.
[0018] The damage types include packet loss damage, latency damage, jitter damage, and out-of-order damage. Each damage type includes multiple damage modes, and the damage parameter is the damage parameter value corresponding to each damage mode in each damage type.
[0019] A further technical solution, wherein the step of performing network impairment logic judgment on received data packets according to the impairment configuration template and identifying the network flow to be impaired includes:
[0020] Using a hash calculation method, the hash values of the octet of the network flow data packet sent by the sender and the octet of the impaired flow in the impairing configuration template are calculated respectively. The calculation results are matched, and the network flow to be impaired is identified based on the matching results.
[0021] If a match is found, the network flow sent by the sender is considered to be a network flow to be damaged, and the corresponding network damage operation is performed; if a match is not found, the network flow sent by the sender is considered not to be a network flow to be damaged, and the data packet is directly stored and forwarded to the receiver.
[0022] Further technical solutions include verifying the network impairment operations performed, including:
[0023] Obtain the network flow data packet information received by the receiver and the network flow data packet information sent by the sender after the data has been damaged;
[0024] Based on the acquired data packet information, the error between the actual damage and the packet loss damage configuration is verified, thereby enabling the verification of network damage operations.
[0025] Secondly, this disclosure provides a system for implementing network damage.
[0026] A system for implementing network impairment includes a network impairment submodule based on a programmable switch and a network impairment control and configuration submodule;
[0027] The network damage control and configuration submodule is used to receive user damage instructions, generate damage configuration templates, and send them to the network damage submodule.
[0028] The network impairment submodule is used to receive network flow data packets sent by the sender, perform network impairment logic judgment on the received data packets according to the impairment configuration template, identify the network flow to be impaired, and perform corresponding network impairment operations on the network flow to be impaired according to the impairment configuration template.
[0029] A further technical solution is that the network impairment control and configuration submodule includes an impairment configuration template generation unit and an impairment configuration template distribution unit;
[0030] The damage configuration template generation unit is used to determine the network flow to be damaged and damage parameter information according to the received user damage instruction, and to convert and generate a damage configuration template.
[0031] The damage configuration template distribution unit is used to distribute the generated damage configuration template to the network damage submodule.
[0032] In a further technical solution, the network impairment submodule includes a data acquisition unit, an impairment logic judgment unit, and multiple impairment units;
[0033] The data acquisition unit is used to acquire the octet of the network flow data packet sent by the sender, and transmit the acquired octet information to the impairment logic judgment unit; the impairment logic judgment unit is used to calculate the hash value of the octet of the network flow data packet sent by the sender and the octet of the impairment flow in the impairment configuration template using a hash calculation method, match according to the calculation result, identify the network flow to be impaired based on the matching result, and control the corresponding impairment unit to perform network impairment operation on the identified network flow to be impaired according to the impairment configuration template; the multiple impairment units include a packet loss impairment unit, a delay impairment unit, a jitter impairment unit, and an out-of-order impairment unit.
[0034] In a further technical solution, the network damage control and configuration submodule also includes a data packet information acquisition unit and a data packet information verification unit;
[0035] The data packet information acquisition unit is used to acquire network flow data packet information received by the receiver and network flow data packet information sent by the sender after the damage has been performed; the data packet information verification unit is used to verify the error of the actual damage and packet loss damage configuration based on the acquired data packet information, so as to realize the verification of network damage operation.
[0036] Thirdly, this disclosure also provides an apparatus for implementing network impairment, including a programmable switching chip that performs the network impairment method described in the first aspect, a memory for storing executable program code and data, an input interface and an output interface for connecting to the device under test, and a management interface for receiving user impairment instructions.
[0037] The above one or more technical solutions have the following beneficial effects:
[0038] 1. This invention provides a method, system, and apparatus for implementing network impairment. Based on a programmable switch with a programmable switching chip, the programmable switch is programmed with a network programming language to design corresponding network impairment logic, thereby realizing the functional and performance requirements for simulating network impairment, improving the definability of network impairment simulation, and effectively reducing the cost of conducting network testing experiments.
[0039] 2. This invention utilizes a programmable switch to simulate network impairments and supports any customized network impairment testing requirements. It supports various network impairment functions such as packet loss impairment, latency impairment, jitter impairment, out-of-order impairment, and other impairments, and can meet the performance requirements of high-speed networks above 100Gbps. It has the positive effects of flexible and customizable impairment functions and low deployment cost. Attached Figure Description
[0040] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0041] Figure 1 This is a flowchart of the method for implementing network impairment as described in Embodiment 1 of the present invention;
[0042] Figure 2 This is a flowchart of network impairment logic judgment in Embodiment 1 of the present invention;
[0043] Figure 3 This is a schematic diagram of the system for implementing network impairment as described in Embodiment 2 of the present invention;
[0044] Figure 4 This is a schematic diagram of the device for achieving network impairment as described in Embodiment 3 of the present invention. Detailed Implementation
[0045] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0046] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0047] Example 1
[0048] This embodiment provides a method for implementing network impairment, based on a programmable switch or a programmable switching chip, such as... Figure 1 As shown, it includes the following steps:
[0049] Receive user damage instructions, generate and distribute damage configuration templates;
[0050] Receive network flow data packets sent by the sender, perform network impairment logic judgment on the received data packets according to the impairment configuration template, and identify the network flow to be impaired;
[0051] Perform the corresponding network impairment operation on the network flow to be impaired according to the impairment configuration template;
[0052] Store and forward the compromised network stream packets to the receiver.
[0053] In this embodiment, the sender and receiver are the devices under test. The sender sends network flow data packets. At this time, the user issues a user impairment command or impairment intention according to the network testing requirements. The user then performs network impairment operations on the corresponding network flow according to the issued command or intention. The receiver receives the network flow data packets that have undergone impairment operations. Compared with existing network impairment implementation methods, the method described in this embodiment has the characteristics of high performance and flexible customization.
[0054] Specifically, firstly, based on network testing requirements, the user issues a impairment command or impairment intent. Based on the received impairment command or intent, the network flow to be impaired and its impairment parameter information are determined, and an impairment configuration template is generated. For example, if the user issues an impairment command or intent of "dropping data packets with a destination IP of 192.168.0.1 and a source IP of 192.168.0.2 with a 1% probability, adding a fixed delay of 10µs, and dropping TCP data packets at a drop period of 1000 packets," then the conversion automatically generates the impairment configuration template shown in Table 1 below, which includes the network flow to be impaired and its impairment parameter information.
[0055] Table 1 Damage Configuration Template
[0056] Objective MAc Source MAC type Destination IP Source IP Protocol type Destination port number Source port number Packet loss parameter 1 Packet loss parameter value 1 Packet loss parameters... Packet loss parameter values... Packet loss parameter n Packet loss parameter value n NaN NaN NaN 192.168.0.1 192.168.0..2 NaN NaN NaN Probability of packet loss 0.01 ... ... Fixed delay 10 NaN NaN NaN NaN NaN 6 NaN NaN Probability Period 1000 ... ... NaN NaN ... ... ... ... ... ... ... ... ... ... ... ... ... ...
[0057] The aforementioned impairment configuration template includes matching items and parameter items, corresponding to the network flow to be impaired and impairment parameter information. The matching items are octets of the impaired flow, and the parameter items are impairment type, mode, and parameters. The octets are source MAC address, destination MAC address, network layer protocol type, source IP address, destination IP address, transport layer protocol type, source port number, and destination port number. Impairment types include packet loss impairment, latency impairment, jitter impairment, out-of-order impairment, and other impairments. Each impairment type includes multiple impairment modes. For example, for packet loss impairment, the modes include periodic packet loss impairment, fixed probability packet loss impairment, and burst packet loss impairment. The impairment parameters are the impairment parameter values corresponding to each impairment mode in each impairment type.
[0058] Furthermore, upon receiving network flow data packets from the sender, network impairment logic is performed on the received data packets according to the impairment configuration template to identify the network flows to be impaired. Specifically, such as... Figure 2 As shown, for the received network flow data packets, a hash calculation method is used to calculate the hash value of the octet of the network flow data packet sent by the sender and the octet of the impaired flow in the impairing configuration template, respectively. The calculation results (i.e., the calculated hash values) are then matched to identify the network flow to be impaired. If the two match successfully, the network flow sent by the sender is considered to be the network flow to be impaired, and the parameters in the impairing configuration template are executed, i.e., the corresponding network impairing operation is performed. If the match fails, it is not considered to be the network flow to be impaired, and the data packet is directly stored and forwarded to the receiver.
[0059] Furthermore, calculation and matching can also be performed using methods such as Bloom filters.
[0060] Based on the parameters in the impairment configuration template (i.e. impairment type, mode, and parameters), network programming languages such as P4 can be used to perform corresponding network impairment operations on the network flow to be impaired, including packet loss impairment, latency impairment, jitter impairment, out-of-order impairment, and other impairments.
[0061] In this embodiment, different packet loss impairment modes are distinguished, and the implemented packet loss impairment includes, but is not limited to, periodic packet loss impairment, fixed probability packet loss impairment, and sudden packet loss impairment. The specific implementation methods are as follows:
[0062] (1) Periodic packet loss: A specific number of data packets are continuously dropped after a certain period. The input (i.e., the damage parameter value mentioned above) includes the number of periods T and the number of packets lost n. A counter is maintained by using a register, and it is incremented by 1 for each packet. If the counter value is greater than (Tn), packet loss is performed; if the counter value is greater than T, the counter value is reset.
[0063] (2) Fixed-probability packet loss: For each packet forwarding, there is a fixed probability of it being dropped. The input parameter is a fixed probability p. A random integer v is generated from a given range (0 to 2) using P4 or another primitive method in network programming. n The probability of v < λ is λ / 2n, which is between -1 and -1. Therefore, for a given threshold λ, the probability of v < λ is λ / 2n. Thus, the fixed probability can be set to p = λ / 2n, which can achieve packet loss operation with a fixed probability.
[0064] (3) Sudden packet loss: Set a fixed probability value. Once the fixed probability is triggered, a certain number of data packets will be continuously dropped. The input includes the fixed probability, the minimum and maximum value of continuous packet loss. This packet loss mode can be implemented by combining the implementation methods of periodic packet loss and fixed probability packet loss.
[0065] In this embodiment, the implemented delay impairment includes fixed delay impairment and random delay impairment with arbitrary probability distribution, as detailed below:
[0066] (1) Fixed delay: A fixed delay is added for each packet. The input includes the delay time.
[0067] (2) Random delay for arbitrary probability distribution: Each packet is delayed by a random time length corresponding to an arbitrary probability distribution. The input includes probability distribution parameters, such as the delay for a normal distribution, whose input parameters are the delay mean and variance.
[0068] The aforementioned latency impairments can be achieved through two methods: packet recirculation and asynchronous traffic shaping. The former increases the number of packet processing cycles in the switch to achieve a predetermined packet dwell time, while the latter achieves a predetermined packet dwell time through precise queue allocation and queuing.
[0069] In this embodiment, jitter impairment reuses the processing logic of the aforementioned delay impairment, and implements transmission delay jitter impairment for different data packets in the same network flow according to the jitter impairment definition method specified in RFC 3393 and other common jitter impairment definition methods.
[0070] In this embodiment, the out-of-order impairment reuses the processing logic of the aforementioned delay impairment. The input is the out-of-order increment Δn = 3, which is used to maintain the out-of-order counter for the flow to be impaired, and to update the counter m packet by packet. The value is assigned to the sequence number of the forwarding packet. Delay impairment is used to increase the dwell time of out-of-order data packets. When judging the out-of-order data packet output port, the logic is executed. If the sequence number of the out-of-order packet is greater than m - Δn, then it is forwarded; otherwise, delay impairment and data packet recirculation are performed.
[0071] After completing the above network impairment operations, store and forward the network flow data packets that have undergone the impairment operations to the receiver.
[0072] As another implementation method, the above-mentioned network impairment operations are verified, including:
[0073] Obtain the network flow data packet information received by the receiver and the network flow data packet information sent by the sender after the data has been damaged;
[0074] Based on the acquired data packet information, the error between the actual damage and the packet loss damage configuration is verified, thereby enabling the verification of network damage operations.
[0075] Taking packet loss impairment as an example, the first step is to obtain the number of data packets received by the receiver and the number of data packets sent by the sender after packet loss impairment. Based on the obtained data packet count information, the error between the actual impairment and the configured packet loss impairment is verified, thus completing the verification of the packet loss impairment operation. Preferably, the verification result can be visualized on an external display.
[0076] The above-described solution in this embodiment uses a network programming language to design corresponding network impairment logic for the programmable switch. Based on the above design, the functional and performance requirements for simulating network impairment are realized, the definability of network impairment simulation is improved, and the cost of conducting network testing experiments is effectively reduced.
[0077] Example 2
[0078] This embodiment provides a system for implementing network impairment, such as... Figure 3As shown, it includes a network impairment submodule based on a programmable switch and a network impairment control and configuration submodule. The network impairment control and configuration submodule receives user impairment instructions, generates impairment configuration templates, and sends them to the network impairment submodule. The network impairment submodule receives network flow data packets sent by the sender, performs network impairment logic judgment on the received data packets according to the impairment configuration template, identifies the network flow to be impaired, and performs corresponding network impairment operations on the network flow to be impaired according to the impairment configuration template.
[0079] The network impairment control and configuration submodule initializes, periodically or on demand remotely connects to the programmable switch-based network impairment submodule, and achieves bidirectional data interaction. The network impairment control and configuration submodule faces the device under test (sender) and receives user impairment commands issued by the user. These user impairment commands can be user impairment test requirements. Preferably, the user only needs to declare impairment test requirements, which can then be converted into a user impairment configuration template through the network impairment control and configuration submodule.
[0080] In this embodiment, the network impairment control and configuration submodule includes an impairment configuration template generation unit and an impairment configuration template distribution unit. The impairment configuration template generation unit is used to determine the network flow to be impaired and its impairment parameter information according to the received user impairment instruction, convert and generate an impairment configuration template. The impairment configuration template distribution unit is used to distribute the generated impairment configuration template to the network impairment submodule. The matching item of the impairment configuration template is an octet of the impairment flow, and the parameter items are impairment type, mode and parameter. Among them, the octet is source MAC address, destination MAC address, network layer protocol type, source IP address, destination IP address, transport layer protocol type, source port number and destination port number.
[0081] The network impairment control and configuration submodule sends the generated impairment configuration template to the network impairment submodule, which includes a data acquisition unit, an impairment logic judgment unit, and multiple impairment units. Specifically, the network impairment submodule receives data packets sent by the sender, obtains the octet of the network flow data packets through the data acquisition unit, and transmits the obtained octet information to the impairment logic judgment unit. This unit uses hash or Bloom filter calculation methods to calculate the hash values of the octet of the network flow data packets sent by the sender and the octet of the impairment flow in the impairment configuration template, respectively. It then matches the calculated hash values to identify the network flow to be impaired. Specifically, if the two match successfully, the network flow sent by the sender is considered the network flow to be impaired, and the parameters in the impairment configuration template are executed, i.e., the corresponding network impairment operation is performed. If the match fails, the network flow is not considered the network flow to be impaired, and the data packet is directly stored and forwarded to the receiver.
[0082] In this embodiment, a modular design for the impairment function of the programmable switch is implemented using network programming languages such as P4. Multiple impairment units are designed, including packet loss impairment units, latency impairment units, jitter impairment units, out-of-order impairment units, and other impairment units, to implement packet loss impairment, latency impairment, jitter impairment, out-of-order impairment, and other impairments on the flow to be impaired. Each impairment unit performs corresponding network impairment operations based on the judgment result of the impairment logic judgment unit and the received impairment configuration template.
[0083] Furthermore, the network impairment control and configuration submodule also includes a data packet information acquisition unit and a data packet information verification unit. The data packet information acquisition unit is used to initialize, periodically, or on demand acquire network flow data packet information received by the receiver and sent by the sender after impairment. The data packet information verification unit is used to verify the error between the actual impairment and the packet loss impairment configuration based on the acquired data packet information, thereby verifying the network impairment operation. Preferably, the verification result can be visualized on an external display.
[0084] Example 3
[0085] This embodiment provides a device for achieving network impairment, such as... Figure 4 As shown, the device is a network impairment device based on a programmable switch, including a programmable switch chip that implements the network impairment method described in Embodiment 1, a memory for storing executable program code and data, an input interface and an output interface for connecting the device under test, and a management interface (i.e., a configuration interface) for receiving user impairment commands.
[0086] The device described in this embodiment uses multiple ports of a programmable switch, including several management interfaces and several data interfaces. The management interfaces are used to connect the network impairment control and configuration submodule and the external management system to complete configuration tasks such as rack initialization and impairment logic distribution, and report data such as device status, port traffic, and service statistics. The data interfaces are optical ports, electrical ports, or other switching ports used to connect to the network under test.
[0087] The steps and methods involved in Embodiments 2 and 3 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0088] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0089] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0090] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A method for achieving network damage, characterized in that, include: The process of receiving user impairment instructions, generating and distributing impairment configuration templates includes: receiving user impairment instructions issued by the user based on network testing requirements; the programmable switch chip determining the network flow to be impaired and impairment parameter information according to the received user impairment instructions, converting and generating impairment configuration templates, and distributing the generated impairment configuration templates. Receive network flow data packets sent by the sender, perform network impairment logic judgment on the received data packets according to the impairment configuration template, and identify the network flow to be impaired, including: The programmable switching chip uses a hash calculation method to calculate the hash value of the octet of the network flow data packet sent by the sender and the octet of the impaired flow in the impaired configuration template, respectively. It then matches the calculation results and identifies the network flow to be impaired based on the matching results. If a match is found, the network flow sent by the sender is considered to be a network flow to be damaged, and the corresponding network damage operation is performed; if a match is found to be unsuccessful, the network flow sent by the sender is considered not to be a network flow to be damaged, and the data packet is directly stored and forwarded to the receiver. Perform the corresponding network impairment operation on the network flow to be impaired according to the impairment configuration template; Store and forward the compromised network stream packets to the receiver; The damage configuration template includes matching items and parameter items. The matching items are octets of damage flow, and the parameter items are damage type, damage mode, and damage parameters. The octet consists of the source MAC address, destination MAC address, network layer protocol type, source IP address, destination IP address, transport layer protocol type, source port number, and destination port number. The damage types include packet loss damage, delay damage, jitter damage, and out-of-order damage. Each damage type includes multiple damage modes. The damage parameters are the damage parameter values corresponding to each damage mode in each damage type. The latency impairment is achieved through packet recirculation and asynchronous traffic shaping. Packet recirculation increases the number of times packets are processed in the switch to achieve a predetermined packet dwell time. Asynchronous traffic shaping achieves a predetermined packet dwell time through precise queue allocation and queuing.
2. The method for achieving network impairment as described in claim 1, characterized in that, Verification of executed network impairment operations includes: Obtain the network flow data packet information received by the receiver and the network flow data packet information sent by the sender after the data has been damaged; Based on the acquired data packet information, the error between the actual damage and the packet loss damage configuration is verified, thereby enabling the verification of network damage operations.
3. A system for achieving network impairment, employing the method for achieving network impairment as described in any one of claims 1-2, characterized in that, This includes a network impairment submodule based on a programmable switch and a network impairment control and configuration submodule; The network damage control and configuration submodule is used to receive user damage instructions, generate damage configuration templates, and send them to the network damage submodule. The network impairment submodule is used to receive network flow data packets sent by the sender, perform network impairment logic judgment on the received data packets according to the impairment configuration template, identify the network flow to be impaired, and perform corresponding network impairment operations on the network flow to be impaired according to the impairment configuration template.
4. The system for achieving network impairment as described in claim 3, characterized in that, The network impairment control and configuration submodule includes an impairment configuration template generation unit and an impairment configuration template distribution unit; The damage configuration template generation unit is used to determine the network flow to be damaged and damage parameter information according to the received user damage instruction, and to convert and generate a damage configuration template. The damage configuration template distribution unit is used to distribute the generated damage configuration template to the network damage submodule.
5. The system for achieving network impairment as described in claim 3, characterized in that, The network damage submodule includes a data acquisition unit, a damage logic judgment unit, and multiple damage units; The data acquisition unit is used to acquire the octet of the network flow data packet sent by the sender, and transmit the acquired octet information to the damage logic judgment unit. The impairment logic judgment unit is used to calculate the hash value of the octet of the network flow data packet sent by the sender and the octet of the impairment flow in the impairment configuration template using a hash calculation method. It performs matching based on the calculation results, identifies the network flow to be impaired based on the matching results, and controls the corresponding impairment unit to perform network impairment operation on the identified network flow to be impaired according to the impairment configuration template. The multiple impairment units include a packet loss impairment unit, a delay impairment unit, a jitter impairment unit, and an out-of-order impairment unit.
6. The system for achieving network impairment as described in claim 3, characterized in that, The network damage control and configuration submodule also includes a data packet information acquisition unit and a data packet information verification unit; The data packet information acquisition unit is used to acquire network flow data packet information received by the receiver and network flow data packet information sent by the sender after the damage has been performed; the data packet information verification unit is used to verify the error of the actual damage and packet loss damage configuration based on the acquired data packet information, so as to realize the verification of network damage operation.
7. A device for achieving network impairment, characterized in that, It includes a programmable switch chip that performs the network impairment method as described in any one of claims 1-3, a memory for storing executable program code and data, an input interface and an output interface for connecting the device under test, and a management interface for receiving user impairment commands.
Citation Information
Patent Citations
Video signal network damage simulation device, system and method
CN104918042A
Traffic scheduling method and device, electronic equipment and computer readable medium
CN113037657A
Network simulation method, programmable switch and computer readable storage medium
CN113193998A