tc

Show/manipulate traffic control settings. More information: <https://manned.org/tc>.

Install

All systems
curl cmd.cat/tc.sh
Debian Debian
apt-get install iproute2
Ubuntu
apt-get install iproute2
Alpine
apk add iproute2
Arch Arch Linux
pacman -S iproute2
image/svg+xml Kali Linux
apt-get install iproute2
CentOS
yum install iproute-tc
Fedora
dnf install iproute-tc
Windows (WSL2)
sudo apt-get update sudo apt-get install iproute2
Raspbian
apt-get install iproute2
Docker
docker run cmd.cat/tc tc powered by Commando

Show/manipulate traffic control settings. More information: <https://manned.org/tc>.

  • Add constant network delay to outbound packages:
    tc qdisc add dev eth0 root netem delay delay_in_millisecondsms
  • Add normal distributed network delay to outbound packages:
    tc qdisc add dev eth0 root netem delay mean_delay_msms delay_std_msms
  • Add package corruption/loss/duplication to a portion of packages:
    tc qdisc add dev eth0 root netem corruption|loss|duplication effect_percentage%
  • Limit bandwidth, burst rate and max latency:
    tc qdisc add dev eth0 root tbf rate max_bandwidth_mbmbit burst max_burst_rate_kbkbit latency max_latency_before_drop_msms
  • Show active traffic control policies:
    tc qdisc show dev eth0
  • Delete all traffic control rules:
    tc qdisc del dev eth0
  • Change traffic control rule:
    tc qdisc change dev eth0 root netem policy policy_parameters

© tl;dr; authors and contributors