Forrest logo
back to the tc tool

tc:tldr:98987

tc: Limit bandwidth, burst rate and max latency.
$ tc qdisc add dev eth0 root tbf rate ${max_bandwidth_mb}mbit burst ${max_burst_rate_kb}kbit latency ${max_latency_before_drop_ms}ms
try on your machine

This command is used to add a Traffic Control (tc) queuing discipline (qdisc) to the network device (eth0) with specific parameters.

  • tc: It is a command line tool used to configure and monitor Traffic Control rules in Linux.
  • qdisc: It stands for queuing discipline, which is a mechanism to control the flow of network packets.
  • add: This option is used to add a new queuing discipline to the specified network device.
  • dev eth0: It specifies the network device to which the queuing discipline will be added (eth0 in this case).
  • root: It indicates that the queuing discipline will be the root qdisc, which means it will be the top-level queuing discipline for the network device.
  • tbf: It stands for Token Bucket Filter, which is a queuing discipline that uses tokens to control the rate of outgoing packets.
  • rate ${max_bandwidth_mb}mbit: It sets the maximum allowed bandwidth for the network device. The ${max_bandwidth_mb} variable should be replaced with the desired maximum bandwidth in megabits per second.
  • burst ${max_burst_rate_kb}kbit: It sets the maximum burst rate for the network device. The ${max_burst_rate_kb} variable should be replaced with the desired maximum burst rate in kilobits.
  • latency ${max_latency_before_drop_ms}ms: It sets the maximum latency threshold before dropping packets. The ${max_latency_before_drop_ms} variable should be replaced with the desired maximum latency in milliseconds.
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