Bandwidth management in squid ?

Taking care of your Linux box.
Post Reply
gardenair
Havaldaar
Posts: 106
Joined: Tue Dec 28, 2004 10:07 pm

Bandwidth management in squid ?

Post by gardenair »

I am using SQUID 2.6 on cent os. Squid as a proxy server is working fine. I want to manage my bandwidth according to my office usage. Like for top management users may allocate 1 MB and rest of the users as 256 kb.Kindly guide me that how can I do it ?
There is an option of delay pools in squid .Kindly guide me that should I compile squid 1st to do it ?

thanks in advance
garden
khizer
Lance Naik
Posts: 20
Joined: Fri Feb 25, 2011 2:40 am
Location: Sharjah

Re: Bandwidth management in squid ?

Post by khizer »

gardenair wrote:Kindly guide me that should I compile squid 1st to do it ?
Well that depends on whether you compiled squid or installed it using yum/rpm. If you compiled it, then most probably you might not have compiled it with delaypools, in that case you'll have to recompile it. If you installed it using rpm/yum (as most people do) then most probably you already have delaypools feature in squid. Just follow the links provided by
aquiline and setup the delaypools.


btw: if you're new to linux/squid and configuring/maintaining squid/delaypools seems difficult, you can consider the option of using SmoothWall which is a nice distro packed with squid etc and provides a very nice web interface for managing all these things and you can manage your proxy server more easily with lots of options

Good Luck :)

-Khizer
gardenair
Havaldaar
Posts: 106
Joined: Tue Dec 28, 2004 10:07 pm

Post by gardenair »

thanks for your replies. well We have a link of 1MB in our office and I want allow 500Kb/s internet access to my network 10.1.76.1/24 and 10.1.77.1/24 and 500kb/s to my 10.1.78.1/24 10.1.79.1/24 network. All these IP ping each others successfully. I am a bit confuse how to write the script for it.
Bhai i am confuse how to wtrie a code in delay pools .

#INSERT YOUR OWN RULES(S) HERE TO ALLOW ACCESS FROM CLIENTS

acl our_networks src 10.1.76.1/24 10.1.77.1/24 10.1.78.1/24 10.1.79.1/24
http_access allow our_networks

#DELAY POOL PARAMETERS
# -----------------------------------------

acl ipgroup src 10.1.76.1/24-10.1.77.1/24
delay_pools 1
delay_class 1 1
# 512 Kbit/s fill rate, 512 Kbit/s reserve
delay_parameters 1 512/512
delay_access 1 allow ipgroup
delay_access 1 deny all

acl ipgroup_two src 10.1.78.1/24 10.1.79.1/24
delay_pools 1
delay_class 1 1
# 512 Kbit/s fill rate.
delay_parameters 1 512/512
delay_access 1 allow ipgroup_two
delay_access 1 deny all

is all correct ?
Kindly bhai guide me.
thanks in advance
gardenair
khizer
Lance Naik
Posts: 20
Joined: Fri Feb 25, 2011 2:40 am
Location: Sharjah

Post by khizer »

gardenair wrote:delay_parameters 1 512/512
I am not sure about the rest but at least the above values are incorrect

If want a limit of 512 kbps then you should use

Code: Select all

delay_parameter 1 64000/64000
Its been a long time since i used delay pools :) So may be there are other mistakes that i missed

-Khizer
-Khizer Naeem Mughal

Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
gardenair
Havaldaar
Posts: 106
Joined: Tue Dec 28, 2004 10:07 pm

Post by gardenair »

thanks "khizer" for the reply. Well there is a silence in the forum and no Linux guru is coming to guide me ! .Actually I want to implement it in my office and just waiting for the correction and guidance for the code.

waiting for reply.
garden.
khizer
Lance Naik
Posts: 20
Joined: Fri Feb 25, 2011 2:40 am
Location: Sharjah

Post by khizer »

http://linuxmall.blogspot.com/2009/05/h ... ls-or.html

Try the above link. I hope that helps

-Khizer
-Khizer Naeem Mughal

Knowledge is often mistaken for intelligence. This is like mistaking a cup of milk for a cow.
gardenair
Havaldaar
Posts: 106
Joined: Tue Dec 28, 2004 10:07 pm

Post by gardenair »

wonderful dear :D . Well as the writer said
Well I have write my acl and my code is
#INSERT YOUR OWN RULES(S) HERE TO ALLOW ACCESS FROM CLIENTS

acl our_bandwidth src 10.1.76.1/24 10.1.77.1/24
acl our_networks src 10.1.76.1/24 10.1.77.1/24 10.1.78.1/24 10.1.79.1/24
http_access allow our_networks

****************Delay Pools**************
delay_pools 1
delay_class 1 2
delay_access 1 allow only our_bandwidth
delay_access 1 deny all
delay_parameters -1/-1 64000/64000
*********************************************

When in check squid sattus it say

[root@localhost root] # Service squid status
Squid is stop
2011/03/12 15:25:27 aclParseIPData : WARNING Netmask mask away part of the specified IP in 192.168.1.0/24
FATAL:Bungled squid.conf line 2760:delay_access our_128kbs
Squid cache (version 2.5 STABLE1): Terminated abnormally.
CPU usage:0.020 seconds=0.010 urer + 0.010 sys
Maximum Resident size:0 KB
Page fault with physical i/o :356
/etc/init.d/squid:Line162:2245 Aborted $SQUID –k check

and when I want to start squid it say

[root@localhost root] # service squid start
usage: /etc/init.d/squid {start|stop|status|reload|restart|condrestart}

Kindly guide me that why this issue is coming? Is there is need to complete my squid then guide me how can I do it ?

In another system I have downed squid 2.6tar and compile it successfully (Just to tell me that I know the compilation process) but squid which is already installed in the system how can I compile it (the source code file ?)

anxiously waiting for reply
garden
Post Reply