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 1Now 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 allRemember 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/32000Now 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|