Delay pool with squid

 

                     //Delay Pools

Goal: To provide a way to limit the bandwidth of certain requests based on any list of criteria.

example:-

  delay_pools 3

this is use to declere how many pools we will create.

  delay_class 1 1

here first ” 1 ” is define a pool number and second ” 1 ” is define to which class belong it

there are 5 classes.

class 1:-Everything is limited by a single aggregate bucket.

class 2:-Everything is limited by a single aggregate bucket as well as an “individual” bucket chosen from bits 25 through        32 of the IP address.

class 3:-Everything is limited by a single aggregate bucket as well as a “network” bucket chosen from bits 17 through 24 of          the IP address and a “individual” bucket chosen from bits 17 through 32 of the IP address.

class 4:-Everything in a class 3 delay pool, with an additional limit on a per user basis. This only takes effect if the          username is established in advance – by forcing authentication in your http_access rules.

class 5:-Requests are grouped according their tag (see external_acl tag= reply).

  delay_parameters

example:-

delay_parameters 4 32000/32000 8000/8000 600/64000 16000/16000

here 32000/32000, which is defined in as 32000(bytes)/32000(bytes)

note:- most of ISP provides internet speed in bit per seccond. see 512kbps means 512 kilo-bit-per-second. so first convert into bytes then apply.

for 512kbps = 512*1024/8 = 65536 bytes

For a class 1 delay pool, the syntax is:

      delay_pools pool 1

      delay_parameters pool aggregate

  For a class 2 delay pool:

      delay_pools pool 2

      delay_parameters pool aggregate individual

  For a class 3 delay pool:

      delay_pools pool 3

      delay_parameters pool aggregate network individual

  For a class 4 delay pool:

      delay_pools pool 4

      delay_parameters pool aggregate network individual user

  For a class 5 delay pool:

      delay_pools pool 5

      delay_parameters pool tagrate

pool        a pool number – ie, a number between 1 and the

              number specified in delay_pools as used in

              delay_class lines.

aggregate    the speed limit parameters for the aggregate bucket

              (class 1, 2, 3).

individual    the speed limit parameters for the individual

              buckets (class 2, 3).

network        the speed limit parameters for the network buckets

              (class 3).

user        the speed limit parameters for the user buckets

              (class 4).

tagrate        the speed limit parameters for the tag buckets

              (class 5).

      delay_access

example :-

delay_access 1 allow acl-name

to give access for any pool with selected acl-name

Advertisements

About bpn4it

Feel Free in Linux. Bipin Patel bpn4it@gmail.com Ahmadabad, Gujarat, India
This entry was posted in Bipin hands-on. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s