Impairments Distributions#
As stated above, Chimera supports a very flexible distribution scheme with a variety of distributions which can be applied depending on the impairment type.
Overall, Chimera supports two different ways of implementing the distribution:
Inter-packet: The distribution determines the distance between the impaired packets in terms of packets. For example, the number of packets between two dropped packet could be 10. This kind of distribution applies to the following impairments:
Drop
Corruption
Duplication
Misordering
Latency: The distribution determines the time the packet is delayed in Chimera. If it is not a constant latency, this type of distribution specifies a combination of fixed latency and jitter. E.g., the jitter distribution for the packets in flow could follow a Gaussian distribution.
This kind of distribution applies to the following impairments:
Latency / jitter
The policers and shapers do not support assignment of a distribution function.
Furthermore, some distribution functions are implemented as logic functions, while others are implemented using table look up to approximate mathematical functions. When implementing an inter-packet distribution, the table will contain 512 entries, while the table will contain 1024 entries for latency distributions.
The distributions supported in Chimera for each impairment are illustrated in Fig. 150.
![../../_images/impair_dists.png](../../_images/impair_dists.png)
Fig. 150 Impairment distributions supported in Chimera#
The following sub-sections will describe each distribution in detail and provide script examples of how to configure.
Logic-Based Distributions#
This sub-section contains a description of the logical distributions.
Off Distribution#
This distribution is default at power-up and contains no configuration of any impairment parameters. If assigned to an impairment it will turn off the impairment and clear all impairment configuration.
Manual Injection#
It is often convenient during testing to manually introduce a limited number of impairments. To do this, the user can configure the fixed burst described in section 11.1.3.
Fixed Burst#
Fixed Burst, when triggered, will impair a number of consecutive packets specified by the Burst Size. An example of how to configure fixed burst for drop is illustrated Fig. 151.
![../../_images/impair_dist_0.png](../../_images/impair_dist_0.png)
Fig. 151 Configuring Fixed Burst distribution in the UI.#
Distribution parameters:
Burst Size: Specifies the number of consecutive packets to impair
(For valid parameter ranges, please refer to the script command description.)
This configuration will cause 2 consecutive packets to be dropped when pressing Start.
Note
The example below illustrates how to configure the configuration above using script commands.
PED_SCHEDULE [fid,0] 1 0
PED_FIXEDBURST [fid,0] 2
For fixed burst configured for one shot, there is a special command to determine whether there is a burst pending or not.
PED_ONESHOTSTATUS[fid,2] ?
This command will return the value of the register which is used to trigger a fixed burst. In case a 1 is returned, there is a burst pending. The next packet on the flow will trigger the burst.
Random Burst#
Random Burst implements bursts of random size. The burst is triggered randomly based on a configurable per packet probability and subsequently impair a random number of consecutive packets chosen between minimum burst size (Burst Min) and maximum burst size (Burst Max).
An example of how to configure fixed burst for corruption is illustrated Fig. 152.
![../../_images/impair_dist_1.png](../../_images/impair_dist_1.png)
Fig. 152 Configuring Random Burst distribution in the UI.#
Distribution parameters:
Burst Size Min: Specifies the minimum burst size.
Burst Size Max: Specifies the maximum burst size.
Burst Probability: Specifies the probability that a burst will start at any given packet.
(For valid parameter ranges, please refer to the script command description.)
In the example above, every packet has a 0.05 % probability of starting a burst. The burst size will be randomly chosen between 15 and 20 packets. The impairment will be restarted every 2.0 sec and turned off after 1.0 sec.
Note
The example below illustrates how to configure the same using script commands.
PED_SCHEDULE [fid,4] 100 200
PED_RANDOMBURST[fid,4] 15 20 500
Fixed rate#
Fixed Rate will impair a configurable fraction of the packets in a predictable way, with nearly equal distance between impairments . An example of how to configure fixed rate for duplication is illustrated Fig. 153.
![../../_images/impair_dist_2.png](../../_images/impair_dist_2.png)
Fig. 153 Configuring Fixed Rate distribution in the UI.#
Distribution parameters:
Impair rate: Fraction of packets to impair.
(For valid parameter ranges, please refer to the script command description.)
In the example above, 12.23% of the packets will be duplicated. Duplication is done with (nearly) equal distance between duplicated packets in a predictable manner to match the configured impair rate.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_SCHEDULE[fid,3] 1 0
PED_FIXED [fid,3] 122300
Bit Error Rate (BER)#
Bit Error Rate will impair the packets of a flow equivalent to a configured BER. E.g., if configured for a BER of 5*10-8, an impairment will be applied for every 0.2*108 bits on the flow. The impairments are applied in a predictable way, with nearly equal distance between impairments.
An example of how to configure bit error rate for drop is illustrated Fig. 154.
![../../_images/impair_dist_3.png](../../_images/impair_dist_3.png)
Fig. 154 Configuring Bit Error Rate distribution.#
Distribution parameters:
Coefficient: The mantissa of the configured BER.
Exponent: The exponent of the configured BER.
BER=Coefficient* 10^Exponent
(For valid parameter ranges, please refer to the script command description.)
In the example above, one packet will be dropped for every 0.2*108 bits on the flow, equivalent to a BER of 5*10-8. The impairment will be restarted every 3.1 sec. and turned off after a duration of 2.5 sec.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_SCHEDULE[fid,0] 250 310
PED_BER [fid,0] 5 -8
Random Rate#
Random Rate will impair a configurable fraction of the packets based on a per packet drop probability, i.e. unlike fixed rate, the impairment pattern is stochastic with an average equal to the configured Impair Probability.
An example of how to configure random rate for duplication is illustrated Fig. 155.
![../../_images/impair_dist_4.png](../../_images/impair_dist_4.png)
Fig. 155 Configuring Random Rate distribution in the UI.#
Distribution parameters:
Impair rate: Fraction of packets to impair.
(For valid parameter ranges, please refer to the script command description.)
In the example above, 12.45% of the packets will be duplicated. Duplication is done based on per packet probability.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_SCHEDULE[fid,3] 1 0
PED_RANDOM [fid,3] 124500
Gilbert-Elliot#
The Gilbert-Elliot distribution defines two states, each with a separate packet impairment probability:
Good state
Bad state
In any of the two states, there is a certain probability that the system will transition to the other state. The Gilbert-Elliot algorithm is illustrated Fig. 156.
![../../_images/impair_dist_5.png](../../_images/impair_dist_5.png)
Fig. 156 Gilbert-Elliot two states.#
When the system is in the Good State (State 1) ,there is a configurable impairment probability (Drop 1) and there is a configurable probability (Transfer prob 1) to transition to the Bad State (State 2). Likewise, when in the Bad State, there is a configurable impairment probability (Drop 2) and a configurable probability to transition to the Good State (Transfer prob 2).
An example of how to configure Gilbert-Elliot for TCP corruption is illustrated Fig. 157.
![../../_images/impair_dist_6.png](../../_images/impair_dist_6.png)
Fig. 157 Configuring Gilbert-Elliot distribution in the UI.#
Distribution parameters:
Impair Probability 1: The per packet impairment probability in state 1.
Transfer Probability 1: The per packet probability of moving to state 2 from state 1.
Impair Probability 2: The per packet impairment probability in state 2.
Transfer Probability 2: The per packet probability of moving to state 1 from state 2.
(For valid parameter ranges, please refer to the script command description.)
In the example above, the probability of TCP corruption when in state 1 is 0.01 %, while the probability of transferring to state 2 is 0.34 %. When in state 2, the probability of TCP corruption when is 0.01 %, while the probability of transferring to state 1 is 0.34 %
Note
The example below illustrates how to configure the same configuration using script commands.
PE_CORRUPT [fid] TCP
PED_GE [fid,4] 100 3400 22300 49800
PED_SCHEDULE[fid,4] 1 0
Accumulate & Burst#
Chimera allows simulating temporary congestion in a network using the accumulate and burst distribution. For a configurable period (Burst Delay), packets are collected in a buffer, rather than forwarded to the output port. After this period of time, all the buffered packets are forwarded to the output as fast as possible, thus creating a burst. Once buffered packets have been transmitted from the buffer, packets will be forwarded with minimum latency.
The packet accumulation is triggered by the first packet received on the flow after the distribution was enabled. An example of how to configure Accumulate & Burst for latency / jitter corruption is illustrated Fig. 158 55.
![../../_images/impair_dist_7.png](../../_images/impair_dist_7.png)
Fig. 158 Configuring “Accumulate and Burst” in the UI.#
Distribution parameters:
Burst Delay: Specifies the duration of the packet accumulation after receiving the first packet.
(For valid parameter ranges, please refer to the script command description.)
In the example above, packets are accumulated for 200 µs, and subsequently they are sent then to the output as fast as possible. The accumulation is re-triggered every 3.0 sec.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_SCHEDULE[fid,2] 1 300
PED_ACCBURST[fid,2] 200000
For accumulate & burst configured for repeat, there is a special command to determine whether an accumulate & burst event is pending, or whether it has been triggered.
PED_ONESHOTSTATUS[fid,2] ?
This command will return the value of the register which is used to trigger an accumulate & burst event. In case a 1 is returned, there is an event pending. The next packet on the flow will trigger the accumulate & burst.
Constant Delay#
Constant Latency will apply a constant latency to all packets in the flow.
Configuring constant latency in the UI is illustrated Fig. 159.
![../../_images/impair_dist_8.png](../../_images/impair_dist_8.png)
Fig. 159 Configuring Constant Latency in the UI.#
Distribution parameters:
Latency: Specifies the constant latency to be applied to all packets.
(For valid parameter ranges, please refer to the script command description.)
In the example above, all packets are delayed for 90.5 µs.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_CONST[fid,2] 90500
Table-Based Distributions#
This sub-section describes the distributions which are implemented using a table lookup to approximate a mathematical function. Each table-based distribution exists in 2 flavors:
Inter-packet distribution: The distribution describes the distance in packets between impairments. This is implemented with 512 table values.
Latency distribution: This distribution describes the delay applied to the packets. This is implemented with 1024 table values.
This implies that when a table-based distribution is applied to the latency / jitter impairment, the table will contain 1024 values, while for all other impairments, it will contain 512 values.
The maximum data values that can be programmed into the table based distributions are listed in Fig. 160.
![../../_images/impair_dist_9.png](../../_images/impair_dist_9.png)
Fig. 160 Custom distribution maximum data values.#
Note
Note: When applying a table-based distribution to latency / jitter, Chimera can only adjust the jitter within the existing IPG of the incoming packets. This implies that packet misordering cannot happen due to jitter. If sending packets with a smaller IPG than the latency specified in a distribution, the distribution function will not be applied as intended.
Uniform#
The Uniform Distribution will randomly select the distance between impairments from a configured interval defined by a minimum (min) and a maximum value (max).
Fig. 161 illustrates how to configure a uniform distribution for drop.
![../../_images/impair_dist_10.png](../../_images/impair_dist_10.png)
Fig. 161 Configuring Uniform distribution.#
Distribution parameters:
Min: Specifies the minimum number of packets/latency for the uniform distribution.
Max: Specifies the maximum number of packets/latency for the uniform distribution.
(For valid parameter ranges, please refer to the script command description.)
In the example above, the distance between drops will be chosen randomly in the interval between 15 packets and 201 packets.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_SCHEDULE[fid,0] 1 0
PED_UNI [fid,0] 15 201
Gaussian#
The Gaussian (Normal) distribution implements an approximation of the mathematical function, which is defined by a mean value mean
and a standard deviation sd
. The Gaussian distribution is illustrated Fig. 162. When a flow is configured for Gaussian Jitter, the mean latency of packets is equal to the configured mean latency, and the deviations of single packets from the mean will be according to the Gaussian distribution.
![../../_images/impair_dist_11.png](../../_images/impair_dist_11.png)
Fig. 162 Gaussian distribution.#
Chimera limits the Gaussian function to the following latency interval:
mean - 3 x sd <= simulated values <= mean + 3 x sd
Figure 59 illustrates how to configure Gaussian distribution for latency / jitter.
![../../_images/impair_dist_12.png](../../_images/impair_dist_12.png)
Fig. 163 Configuring Gaussian jitter#
Distribution parameters:
Mean: Specifies the mean value for the Gaussian distribution.
Standard Deviation: Specifies the standard deviation for the Gaussian distribution.
(For valid parameter ranges, please refer to the script command description.)
In the example above, a jitter with a Gaussian distribution with Mean = 20.5 µs and Standard Deviation = 2.3 µs is applied continuously to the flow.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_GAUSS[fid,2] 20500 2300
Gamma#
The Gamma distribution approximates the mathematical function which is defined by a Shape parameter (\(\kappa\)) and the Scale parameter (\(\theta\)). The Gamma distribution is illustrated Fig. 164 for different values of the Shape and Scale parameters. When a flow is configured for Gamma Latency / Jitter, the mean latency of packets is equal to the configured mean latency (see below), and the deviations of single packets from the mean will be according to the Gamma distribution.
![../../_images/impair_dist_13.png](../../_images/impair_dist_13.png)
Fig. 164 Gamma distribution.#
Chimera limits the Gamma function to the following latency interval:
![../../_images/impair_dist_14.png](../../_images/impair_dist_14.png)
Fig. 165 illustrates how to configure Gamma distribution for Latency / Jitter.
![../../_images/impair_dist_15.png](../../_images/impair_dist_15.png)
Fig. 165 Configuring Gamma distribution in the UI.#
Distribution parameters:
Shape (\(\kappa\)): Gamma distribution Shape parameter.
Scale (\(\theta\)): Gamma distribution Scale parameter
(For valid parameter ranges, please refer to the script command description.)
In the example above, Latency / Jitter is configured with a Shape parameter of 7.5 and a Scale parameter of 10.0 µs. For Latency / Jitter, it is not possible to configure a scheduler function.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_GAMMA [fid,2] 750 10000
Poisson#
The Poisson distribution approximates the mathematical function which is defined by a mean value (\(\lambda\)). The Poisson distribution is illustrated Fig. 166. When a flow is configured for poisson jitter, the mean latency of packets is equal to the configured mean latency, and the deviations of single packets from the mean will be according to the Poisson distribution.
![../../_images/impair_dist_16.png](../../_images/impair_dist_16.png)
Fig. 166 Poisson distribution.#
Chimera limits the Poisson function to the following latency interval:
![../../_images/impair_dist_17.png](../../_images/impair_dist_17.png)
Fig. 167 illustrates how to configure Poisson distribution for duplication.
![../../_images/impair_dist_18.png](../../_images/impair_dist_18.png)
Fig. 167 Configuring Poisson distribution in the UI.#
Distribution parameters:
Lambda (\(\lambda\)): Specifies the mean value for the Poisson distribution.
(For valid parameter ranges, please refer to the script command description.)
In the example above, duplication with a packet spacing defined by a Poisson distribution with Mean = 10 is applied to the flow for 2.0 sec and then stopped. This will be repeated every 4.0 sec.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_SCHEDULE[fid,3] 2000 4000
PED_POISSON [fid,3] 10
Step#
The Step Distribution will apply an impairment to a flow, randomly altering between two configurable values. The step distribution is only applicable to latency / jitter.
Fig. 168 illustrates how to configure step distribution for Latency / Jitter.
![../../_images/impair_dist_19.png](../../_images/impair_dist_19.png)
Fig. 168 Configuring Step Distribution for latency / jitter in the UI.#
Distribution parameters:
Min Delay: Specifies the minimum delay.
Max Delay: Specifies the maximum delay.
(For valid parameter ranges, please refer to the script command description.)
In the example above, packets will randomly be delayed by either 7.5 µs or 20.9 µs.
Note
The example below illustrates how to configure the same configuration using script commands.
PED_STEP[fid,2] 7500 20900
Custom Distribution#
In addition to the pre-defined distributions described above, Chimera supports the definition of Custom Distributions. Custom distributions are table-based distributions which are defined per port. They are identified by a Custom ID (cust_id), which identifies each custom distribution on that port. Chimera supports up to 40 custom distributions per port (cust_id: 1-40). Once the custom distribution is defined, it can be applied to any of the impairments in the impairment pipeline.
A custom distribution is a table-based distribution, where the user can supply the values in the table. Furthermore, the user can configure whether the values in the table should be applied in a predictable order, reading out table index 0, 1, 2, … 511/1023 to 0, 1, 2, …, or whether the values are applied in a random order.
Finally, the user can supply a Custom Name for every custom distribution to make it easier to navigate within the distributions defined.
The custom distributions will support 512 table entries for inter-packet distributions and 1024 values for latency / jitter distributions. As a result, only custom distributions with 1024 entries may be assigned to latency / jitter, while custom distributions with 512 entries can be assigned to all other impairments except for misordering, which does not support custom distributions.
Custom distributions are defined using the script command: PEC_VAL
.
The PEC_VAL
has the following parameters:
Linear: Determines whether table values are chosen randomly or in predictable order 0 -> highest row -> 0 etc.
Symmetric: Reserved for future use - must be set to OFF (0).
Num_entries: This indicates whether the distribution is an inter-packet distribution (=512 entries) or a latency / jitter distribution (=1024 entries).
512 or 1024 data values according to
num_entries
.
The UI supports managing the custom distributions using the Custom Distributions Library found on the port impairment tab. The custom distributions library provides an overview of the custom distributions defined for each port and can be used to create, delete and export custom distributions to a file for later use.
The custom distributions library is illustrated Fig. 169.
![../../_images/impair_dist_20.png](../../_images/impair_dist_20.png)
Fig. 169 Custom Distributions Library.#
The custom distribution library lists which custom distributions are on the selected port and hence which distributions will appear in the custom distribution list, when assigning a custom distribution to an impairment.
The Type column indicates whether the distribution can be assigned to latency/jitter or one of the other impairments (inter-packet).
Files used to define custom distributions have the *.xpc
extension and must contain the following commands:
PEC_VAL[cust_id]
PEC_COMMENT[cust_id]
It is optional whether the *.xpc
file contains the [MODULE]/[PORT]
in front of the commands. If these values are present, the custom distribution will be defined for the port, indicated by the [PORT]
parameter. If [MODULE] / [PORT]
is not defined, the custom distribution will be defined for the port currently selected in the UI.
Custom distribution configuration example (inter-packet):
The example below illustrates how to configure a custom distribution for inter-packet with a cust_id = 5
and with linear property = ON. Furthermore, it will assign a name to the distribution: Sample inter-packet distribution.
PEC_VAL[5] ON OFF 512 <DATA_0> <DATA_1> ... <DATA_511>
PEC_COMMENT[5] "Sample inter-packet distribution"
Once the inter-packet Custom Distribution has been defined, it is possible to assign it to an impairment. Fig. 170 illustrates how to use the distribution created above with drop.
![../../_images/impair_dist_21.png](../../_images/impair_dist_21.png)
Fig. 170 Assigning Custom Distribution to drop.#
To configure custom distribution for drop:
Select Custom Distribution from the distribution dropdown menu.
Select the required custom distribution from the custom distribution list (e.g. #5).
Configure the scheduler (e.g. Continuous)
Press Start to activate the Custom Distribution.
The example below illustrates how to configure the same configuration using script commands.
PED_SCHEDULE[fid,0] 1 0
PED_CUST [fid,0] 5
Custom distribution configuration example (latency / jitter):
The example below illustrates how to configure a custom distribution for latency / jitter with a cust_id = 13 and with linear property = OFF. Furthermore, it will assign a name to the distribution: Sample latency distribution.
PEC_VAL[13] OFF OFF 1024 <DATA_0> <DATA_1> ... <DATA_1023>
PEC_COMMENT[13] "Sample latency distribution"
Once the latency / jitter custom distribution has been defined, it is possible to assign it to an impairment. Fig. 171 illustrates how to use the distribution created above with latency / jitter.
![../../_images/impair_dist_22.png](../../_images/impair_dist_22.png)
Fig. 171 Assigning Custom Distribution to latency / jitter in the UI.#
To configure custom distribution for latency / jitter:
Select Custom Distribution from the distribution dropdown menu.
Select the required custom distribution from the custom distribution list (e.g. #13).
Press Start to activate the custom distribution.
(Latency / jitter does not support a scheduler for custom distributions).
The example below illustrates how to configure the same configuration using script commands.
PED_CUST[fid,2] 13