Add latency and packet loss

Simulate WAN latency and packet loss for tests. Remove it with tc qdisc del

tc qdisc add dev <name> root netem delay 100ms loss 1% && tc -s qdisc show dev <name>

tool
iproute212 commands
tags
iproute2networkperformancetroubleshooting

More iproute2 commands

  • tc qdisc del dev <name> root

    Delete the root qdisc to get normal traffic back after netem tests

  • ip monitor all

    Live stream of route, link, address and neighbor changes. Useful when a link keeps going up and down

  • bridge fdb show br <name>; bridge link show

    Show the L2 forwarding table (MAC->port) and bridge port states

  • ss -tip state established '( dport = :443 )'

    Show rtt, cwnd and retransmits for each connection to remote port 443. Helps find slow or lossy peers

  • ss -K dst <ip> dport = :8080

    Force-close matching sockets (kernel 4.9+). Needs CONFIG_INET_DIAG_DESTROY

all 12 iproute2 commands