ADSL Bandwidth Management HOWTO by Dan Singletary (inspirational books for students TXT) π
-----
3.5. Attempting to Throttle Inbound Traffic
By using the Intermediate Queuing Device (IMQ), we can run all incoming packets through a queue in the same way that we queue outbound packets. Packet priority is much simpler in this case. Since we can only (attempt to) control inbound TCP traffic, we'll put all non-TCP traffic in the 0x00 class, and all TCP traffic in the 0x01 class. We'll also place "small" TCP packets in the 0x00 class since these are most likely ACK packets for outbound data that has already been sent. We'll set up a standard FIFO queue on the 0x00 class, and we'll set up a Random Early Drop (RED) queue on the 0x01 class. RED is better than a FIFO (tail-drop) queue at controlling TCP because it will drop packets before the queue overflows in an attempt to slow down transfers that look like they're about to get out of control. We'll also rate-limit bot
Read free book Β«ADSL Bandwidth Management HOWTO by Dan Singletary (inspirational books for students TXT) πΒ» - read online or download for free at americanlibrarybooks.com
- Author: Dan Singletary
- Performer: -
Read book online Β«ADSL Bandwidth Management HOWTO by Dan Singletary (inspirational books for students TXT) πΒ». Author - Dan Singletary
iptables -t mangle -A MYSHAPER-IN -p tcp --sport ssh -j MARK --set-mark 20 # secure shell
iptables -t mangle -A MYSHAPER-IN -p tcp --dport telnet -j MARK --set-mark 20 # telnet (ew...)
iptables -t mangle -A MYSHAPER-IN -p tcp --sport telnet -j MARK --set-mark 20 # telnet (ew...)
iptables -t mangle -A MYSHAPER-IN -m mark --mark 0 -j MARK --set-mark 21 # redundant- mark any unmarked packets as 26 (low prio)
finally, instruct these packets to go through the imq0 we set up aboveiptables -t mangle -A MYSHAPER-IN -j IMQ
Done with inbound shaping ##############################################echo "Inbound shaping added to $DEV. Rate: ${RATEDN}Kbit/sec."
Testing the New QueueThe easiest way to test your new setup is to saturate the upstream with
low-priority traffic. This depends how you have your priorities set up. For
the sake of example, let's say you've placed telnet traffic and ping traffic
at a higher priority (lower fwmark) than other high ports (that are used for
FTP transfers, etc). If you initiate an FTP upload to saturate upstream
bandwidth, you should only notice your ping times to the gateway (on the
other side of the DSL line) increasing by a small amount compared to what it
would increase to with no priority queuing. Ping times under 100ms are
typical depending on how you've got things set up. Ping times greater than
one or two seconds probably mean that things aren't working right.
OK It Works!! Now What?Now that you've successfully started to manage your bandwidth, you should
start thinking of ways to use it. After all, you're probably paying for it!
οΏ½οΏ½*οΏ½Use a Gnutella client and SHARE YOUR FILES without adversely affecting
your network performanceοΏ½οΏ½*οΏ½Run a web server without having web page hits slow you down in Quake
Related LinksοΏ½οΏ½*οΏ½Bandwidth Controller for Windows - [http://www.bandwidthcontroller.com]
http://www.bandwidthcontroller.comοΏ½οΏ½*οΏ½[http://www.sonicspike.net/software#dsl-qos-queue] dsl-qos-queue - (beta)
for Linux. No kernel patching, and better performance -
Comments (0)