Skip to content

Commit a9e6bde

Browse files
authored
Create tc.md
1 parent c23a2d7 commit a9e6bde

File tree

1 file changed

+22
-0
lines changed
  • Cheat Sheets/Network

1 file changed

+22
-0
lines changed

Cheat Sheets/Network/tc.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
tc is to set network traffic control settings
2+
3+
A good guide can be found at https://linuxvox.com/blog/linux-tc-qdisc/
4+
5+
## qdisc
6+
7+
Add a PFIFO to drop after queue reaches 1000 packets
8+
9+
tc qdisc add dev eth0 root pfifo limit 1000
10+
11+
Remove qdisc
12+
13+
tc qdisc del dev eth0 root
14+
15+
Show current queue statistics
16+
17+
tc -s qdisc ls dev eth0
18+
19+
Limit interface to max bandwith (from https://unix.stackexchange.com/questions/39218/throttle-the-download-speed-of-wget-or-curl-while-downloading#39219)
20+
21+
tc qdisc add dev eth0 root handle 1:0 netem delay 100ms
22+
tc qdisc add dev eth0 parent 1:1 handle 10: tbf rate 256kbit buffer 1600 limit 3000

0 commit comments

Comments
 (0)