This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
unix:traffic-shaping [2009/07/12 16:16] robm created |
unix:traffic-shaping [2013/10/13 12:42] robm +Intro, correct up/down terms |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Traffic Shaping ====== | ====== Traffic Shaping ====== | ||
- | Installed | + | * Limit a single app with the '' |
- | < | + | ===== Force shaping onto someone else's network ===== |
- | wget https:// | + | |
- | tar zxvf fragroute_1.2-7.1build1.tar.gz | + | Here's a quick-and-dirty guide to how I hijacked my home network when I lived with some other students to force traffic shaping onto the entire network, since two of my housemates had gone away for the weekend and left their torrent clients running. |
- | cd fragroute-1.2/ | + | |
- | sudo apt-get install | + | < |
- | dpkg-buildpackage | + | # Install fragrouter |
- | cd .. | + | wget https:// |
- | sudo dpkg -i fragroute_1.2-7.1build1_amd64.deb | + | wget https:// |
+ | tar zxvf fragrouter_1.6.orig.tar.gz | ||
+ | cd fragrouter-1.6/ | ||
+ | zcat ../ | ||
+ | </code> | ||
+ | |||
+ | <code bash> | ||
+ | sudo apt-get install | ||
+ | echo 1 | sudo tee / | ||
+ | route -n # Find gateway IP | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | sudo arpsoof 192.168.1.254 # Poison network to think we're the gateway | ||
+ | # Open a new terminal | ||
+ | sudo apt-get install wondershaper | ||
+ | sudo wondershaper eth0 $((8273*8*1024)) $((1209*8*1024)) # Configure eth0 with 8MBit downlink and 1MBit uplink (converting kB to kbit, and using numbers from my ADSL router web-interface) | ||
+ | wondershaper eth0 | ||
+ | qdisc cbq 1: root rate 10000Kbit (bounded, | ||
+ | Sent 789925764 bytes 2324442 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | borrowed 0 overactions 0 avgidle 781 undertime 0 | ||
+ | qdisc sfq 10: parent 1:10 limit 127p quantum 1514b perturb 10sec | ||
+ | Sent 72932324 bytes 1002607 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | qdisc sfq 20: parent 1:20 limit 127p quantum 1514b perturb 10sec | ||
+ | Sent 716598100 bytes 1312423 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | qdisc sfq 30: parent 1:30 limit 127p quantum 1514b perturb 10sec | ||
+ | Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | qdisc ingress ffff: parent ffff:fff1 ---------------- | ||
+ | Sent 742688346 bytes 2210761 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | class cbq 1: root rate 10000Kbit (bounded, | ||
+ | Sent 395340 bytes 9412 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | borrowed 0 overactions 0 avgidle 781 undertime 0 | ||
+ | class cbq 1:1 parent 1: rate 9904Mbit (bounded, | ||
+ | Sent 789530142 bytes 2315028 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | borrowed 0 overactions 0 avgidle 781 undertime 0 | ||
+ | class cbq 1:10 parent 1:1 leaf 10: rate 9904Mbit prio 1 | ||
+ | Sent 72932270 bytes 1002606 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | borrowed 0 overactions 0 avgidle 781 undertime 0 | ||
+ | class cbq 1:20 parent 1:1 leaf 20: rate 8914Mbit prio 2 | ||
+ | Sent 716597872 bytes 1312422 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | borrowed 0 overactions 0 avgidle 781 undertime 0 | ||
+ | class cbq 1:30 parent 1:1 leaf 30: rate 7923Mbit prio 2 | ||
+ | Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) | ||
+ | rate 0bit 0pps backlog 0b 0p requeues 0 | ||
+ | borrowed 0 overactions 0 avgidle 781 undertime 0 | ||
</ | </ | ||