![Forrest logo](/images/logo.png)
tc
tc is a command line tool that stands for Traffic Control. It is a popular utility in Linux systems used for controlling and manipulating network traffic. This tool allows users to set various network parameters such as bandwidth limits, delay, packet loss, and packet reordering. tc uses the concept of traffic shaping to manage network traffic flow. It utilizes a hierarchical token bucket filter (HTB) algorithm to divide and allocate bandwidth among different classes or flows of network traffic. With tc, users can prioritize certain types of traffic over others, simulate different network conditions for testing purposes, and optimize network performance. It is a powerful tool for network administrators and developers to fine-tune and control network traffic according to their specific requirements.
List of commands for tc:
-
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}mstry on your machineexplain this command
-
tc:tldr:0abd4 tc: Show active traffic control policies.$ tc qdisc show dev ${eth0}try on your machineexplain this command
-
tc:tldr:98664 tc: Add constant network delay to outbound packages.$ tc qdisc add dev ${eth0} root netem delay ${delay_in_milliseconds}mstry on your machineexplain this command
-
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}mstry on your machineexplain this command
-
tc:tldr:ad703 tc: Delete all traffic control rules.$ tc qdisc del dev ${eth0}try on your machineexplain this command
-
tc:tldr:eb73c tc: Change traffic control rule.$ tc qdisc change dev ${eth0} root netem ${policy} ${policy_parameters}try on your machineexplain this command
-
tc:tldr:fc158 tc: Add package corruption/loss/duplication to a portion of packages.$ tc qdisc add dev ${eth0} root netem ${select} ${effect_percentage}%try on your machineexplain this command