How to check how well my traffic control rules are working?

126 Views Asked by At

I am a bit new to network traffic control. I have been tinkering with the tc command and iptables in linux and have been testing them by not so convenient methods, like for instance, for congestion, putting multiple heavy files on upload. Is there a way I can figure what is the result on the network's performance from the rules set by me? Pardon me if it seems a bit vague.

1

There are 1 best solutions below

0
Cigarette Smoking Man On

If you have limited bandwidth and latency with e.g

tc qdisc add dev your_eth root handle 1: htb
tc class add dev your_eth parent 1:1 classid 1:12 htb rate 10mbit 
tc qdisc add dev your_eth parent 1:12 netem delay 200ms

Then you can monitor bandwidth with iperf and latency (delay) with ping. With appropriate flags you can have them running indefinitely in another terminal, monitor changes as you add or delete the above rules (delete all with tc qdisc delete dev your_eth root).