wireless.gumph.org
Main
  Home
  Wi-Fi Pages and links
  Glossary
 
Popular
  Homemade Antenna
  Antenna Connectors
  Laptop Mini Wireless Antenna
  Long Range How-To
 
Articles
  Customize your Wireless Router
  Howto - Windows XP VPN
  Public Wifi Safety
  The State of WiMAX
  Pre-N Wireless Roundup
  Securing Your Wireless Network
  Hardware for Point-to-point links
  MIMO Wireless Guide
  Highspeed Wireless Bridge
  Linux Based AP
  Access Point Comparison
  Limiting Shared Bandwidth
  Antenna Cabling
 
Reviews
  Netgear DG834G
  USR MAXg Router
  Linksys WAG354G
  3Com 3CRWDR100A-72
 
Hardware insides
  Inside a 3Com 3CRWDR100A-72
  Inside a Buffalo WBRG54
  Inside a Linksys Wag54g
  Inside a Belkin F5D7130
  Inside a Buffalo Airstation
  Inside a Linksys Wap11
 
Books
  Wireless Hacks
  Building Wireless Community Networks
  802.11 Security
  Wireless Network Starter Kit
  Hardware Hacking for Geeks
 
Appendix
  Older News
  Changelog
  Privacy policy
  About









Controlling Bandwidth
 

Now that squid is installed and running, we can change its settings to limit the bandwidth you neighbours can use.

Open the squid.conf file (c:\squid\etc\squid.conf) in notepad, and scroll down to the "DELAY_POOLS" section. We are initially going to set it up to limit the bandwidth of all your neighbours to half your broadband connection. Once you are more familiar with squid, you can fine tune the settings more. There is plenty of help online, and in the configuration file.

Squid uses "delay_pools" to control bandwidth, so firstly we need to add one pool and tell squid that all access uses this single bucket.

#
#Default:
# delay_pools 0
delay_pools 1
delay_class 1 1
Now add an entry allowing the neighbours machines to use the delay pool
# delay_access 2 allow lotsa_little_clients
# delay_access 2 deny all
#
#Default:
# none
delay_access 1 allow our_networks
delay_access 1 deny all
Remember the "our_networks" acl was defined back on page 1 for when we initially configured squid. Now we need to define how much bandwidth to allow for this bucket. The bandwidth is defined in bytes per second, so if you have 512k bit dsl connection, thats 64k bytes per second. So allowing half the bandwidth for your neighbours will be 32000.
#
#delay_parameters 2 32000/32000 8000/8000 600/8000
#
#	There must be one delay_parameters line for each delay pool.
#
#Default:
# none
delay_parameters 1 32000/32000
Now restart squid, and try downloading a large file from one of the networked computers, such as a service pack from microsoft. You should see the download rate is very close to the rate you specified in your delay_pool parameters. There are still more settings you can change for delay pools, such as allowing different users different bandwidths, and at different times of day, or requiring passwords to access your proxy server, but I'll leave them for a later article.

For now, well done - you've sucessfully taken control over your shared bandwidth.

Setup Sharing << Controlling Bandwidth

 
© 2002-2010 wireless.gumph.org

Valid HTML 4.01! Valid CSS!