Forrest logo
back to the tc tool

tc:tldr:07418

tc: Add normal distributed network delay to outbound packages.
$ tc qdisc add dev ${eth0} root netem delay ${mean_delay_ms}ms ${delay_std_ms}ms
try on your machine

This command adds a network emulation (netem) queue discipline (qdisc) to the specified network device (${eth0}). The network emulation queue discipline is used to simulate different network conditions.

The "delay" option is used to introduce a delay in the network traffic. The delay is specified using two variables: ${mean_delay_ms} and ${delay_std_ms}.

  • ${mean_delay_ms} represents the mean delay in milliseconds, which determines the average delay in the network traffic.
  • ${delay_std_ms} represents the standard deviation of the delay in milliseconds, which determines the variation or randomness in the delay.

For example, if ${mean_delay_ms} is 100ms and ${delay_std_ms} is 20ms, it means that the average delay in the network traffic will be 100ms, but there will be random variations of up to 20ms above or below that average delay.

As a result, this command adds a network emulation queue discipline to the specified network device, introducing a delay in the network traffic with a specific average delay and variation.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the tc tool