This document describes how to configure your proxy server to limit download bandwidth or incoming traffic.
Next steps in the configuration management bandwidth squid:
delay_pools
This option is for specifying the exact amount of pool that is used to limit the amount of bandwidth from the ACL. This will be in the cluster with the option delay_class and delay_parameters which will be discussed below.
delay_class
This option specify the group from each pool that have been defined on the delay-pools option. There are three classes of Squid is supported, among others:
delay_parameters
This formula specify the bandwidth that will be obtained by the ACL enter akan delay_pool. For example there is the following entry in the delay_parameters:
delay_parameters 1 -1/-1 2100/4000
Number 1 means that the formula is valid for pool 1. Figures -1/-1 means that the maximum bandwidth provided Squid is not limited to this pool.
2100/4000 figures mean bandwidth obtained by the ACL entry to this pool. This number is located in the multiplier 8 b, so to get the actual value of the bandwidth must be multiplied by eight. 2100 figures is that the bandwidth available on the ACL times normal. If multiplied by 8, then the bandwidth will be a normal ACL about 18 Kbps. 4000 figures is the maximum bandwidth available on the ACL-time path are empty. If multiplied by 8, the bandwidth obtained about 32 Kbps.
delay_access
This defines who ACL that will be entered into a pool for the "slowing" bandwidth. General form is like this:
delay_access 1 allow labprog
The above option means that we enter into the ACL labprog pool 1.
3. If you already understand the components delay pool, we start delay pool configuration. Umpamakan we have in the bandwidth from the ISP is 512KB, and we make a rule like the following:
- Limit overall connection speed is 256 Kbps. per-network is 64 kbps. Meanwhile, 2 Kbps per-user/host limited when used for file downloads bertipe exe, mp3, vqf, tar.gz, gz, rpm, zip, rar, avi, mpeg, MPE, mpg, qt, ram, rm, iso, raw , and wav. If not, then the connection perhost ONLY the rules per-Network only.
Settlement:
Edit the file / etc / squid / squid.conf
# vi / etc / squid / squid.confLalu add this configuration example:
# Before we make a restriction, we need to define the ACL network # # we need first. ACL defined on the host bridge
# As below: src 192.168.1.0/24 acl local # Then we limit the maximum download the tag below:
# Limit overall connection speed is 256 Kbps. per-network is
# 64 kbps. Meanwhile, 2 Kbps per-user/host limited when used for
# Bertipe exe file download, mp3, vqf, tar.gz, gz, rpm, zip, rar, avi,
# Mpeg, MPE, mpg, qt, ram, rm, iso, raw, and wav. If not, then
# Connection perhost ONLY the rules per-Network only.
acl filegede url_regex-i \. exe
acl filegede url_regex-i \. mp3
acl filegede url_regex-i \. vqf
acl filegede url_regex-i \. gz
acl filegede url_regex-i \. rpm
acl filegede url_regex-i \. zip
acl filegede url_regex-i \. rar
acl filegede url_regex-i \. avi
acl filegede url_regex-i \. mpeg
acl filegede url_regex-i \. MPE
acl filegede url_regex-i \. mpg
acl filegede url_regex-i \. qt
acl filegede url_regex-i \. ram
acl filegede url_regex-i \. rm
acl filegede url_regex-i \. iso
acl filegede url_regex-i \. raw
acl filegede url_regex-i \. wav
# We first create ACL to define the files by using the above # regularexpression. Then we define the 2 delay pool for
# Accommodate bandwidth.
# One entry pool in class 2 for defining the overall policy
# Per 256-Kbps and 64 Kbps network. One other pool incoming class category 3
# To define additional rules, if a user downloads files
# defined in the ACL url_regex with a maximum bandwidth of 2 Kbps.
delay_pools 2
delay_class 1 3
delay_parameters 1 32000/32000 8000/8000 250/250
delay_access 1 allow local filegede
delay_access 1 deny all
delay_class 2 2
delay_parameters 2 32000/32000 8000/8000
allow local delay_access 2
delay_access 2 deny all
If you are finished, save the configuration and restart squid
# / etc / init.d / squid restart
Source: http://miji.wordpress.com/2007/02/06/57/ # comment-21
Full information can be viewed at: http://ezine.daemonnews.org/200209/squid.html
Next steps in the configuration management bandwidth squid:
- First check if squid is already running on the server and have dikonfiguraisi as a proxy server machine.
- Before starting the management of bandwidth in the squid, we first describe the components in the squid Management bandwidth:
delay_pools
This option is for specifying the exact amount of pool that is used to limit the amount of bandwidth from the ACL. This will be in the cluster with the option delay_class and delay_parameters which will be discussed below.
delay_class
This option specify the group from each pool that have been defined on the delay-pools option. There are three classes of Squid is supported, among others:
- Class 1: All access is limited to the single bucket, this means only can define the overall bandwidth for an ACL course, can not define the bandwidth with more play.
- Class 2: All Access is limited to the single agregate with two bandwidth parameters. The first parameter defines the maximum bandwidth is obtained by ACL, the second parameter defines the overall bandwidth for a specific ACL that is on the network is.
- Class 3: Groups that definition to its most bandwidth-play. The first parameter defines the maximum bandwidth is obtained by ACL, the second parameter defines the bandwidth of normal ACL obtained in general, and the third parameter defines the bandwidth is obtained if the ACL to access ACL-ACL certain specific, such as mp3 files.
delay_parameters
This formula specify the bandwidth that will be obtained by the ACL enter akan delay_pool. For example there is the following entry in the delay_parameters:
delay_parameters 1 -1/-1 2100/4000
Number 1 means that the formula is valid for pool 1. Figures -1/-1 means that the maximum bandwidth provided Squid is not limited to this pool.
2100/4000 figures mean bandwidth obtained by the ACL entry to this pool. This number is located in the multiplier 8 b, so to get the actual value of the bandwidth must be multiplied by eight. 2100 figures is that the bandwidth available on the ACL times normal. If multiplied by 8, then the bandwidth will be a normal ACL about 18 Kbps. 4000 figures is the maximum bandwidth available on the ACL-time path are empty. If multiplied by 8, the bandwidth obtained about 32 Kbps.
delay_access
This defines who ACL that will be entered into a pool for the "slowing" bandwidth. General form is like this:
delay_access 1 allow labprog
The above option means that we enter into the ACL labprog pool 1.
3. If you already understand the components delay pool, we start delay pool configuration. Umpamakan we have in the bandwidth from the ISP is 512KB, and we make a rule like the following:
- Limit overall connection speed is 256 Kbps. per-network is 64 kbps. Meanwhile, 2 Kbps per-user/host limited when used for file downloads bertipe exe, mp3, vqf, tar.gz, gz, rpm, zip, rar, avi, mpeg, MPE, mpg, qt, ram, rm, iso, raw , and wav. If not, then the connection perhost ONLY the rules per-Network only.
Settlement:
Edit the file / etc / squid / squid.conf
# vi / etc / squid / squid.confLalu add this configuration example:
# Before we make a restriction, we need to define the ACL network # # we need first. ACL defined on the host bridge
# As below: src 192.168.1.0/24 acl local # Then we limit the maximum download the tag below:
# Limit overall connection speed is 256 Kbps. per-network is
# 64 kbps. Meanwhile, 2 Kbps per-user/host limited when used for
# Bertipe exe file download, mp3, vqf, tar.gz, gz, rpm, zip, rar, avi,
# Mpeg, MPE, mpg, qt, ram, rm, iso, raw, and wav. If not, then
# Connection perhost ONLY the rules per-Network only.
acl filegede url_regex-i \. exe
acl filegede url_regex-i \. mp3
acl filegede url_regex-i \. vqf
acl filegede url_regex-i \. gz
acl filegede url_regex-i \. rpm
acl filegede url_regex-i \. zip
acl filegede url_regex-i \. rar
acl filegede url_regex-i \. avi
acl filegede url_regex-i \. mpeg
acl filegede url_regex-i \. MPE
acl filegede url_regex-i \. mpg
acl filegede url_regex-i \. qt
acl filegede url_regex-i \. ram
acl filegede url_regex-i \. rm
acl filegede url_regex-i \. iso
acl filegede url_regex-i \. raw
acl filegede url_regex-i \. wav
# We first create ACL to define the files by using the above # regularexpression. Then we define the 2 delay pool for
# Accommodate bandwidth.
# One entry pool in class 2 for defining the overall policy
# Per 256-Kbps and 64 Kbps network. One other pool incoming class category 3
# To define additional rules, if a user downloads files
# defined in the ACL url_regex with a maximum bandwidth of 2 Kbps.
delay_pools 2
delay_class 1 3
delay_parameters 1 32000/32000 8000/8000 250/250
delay_access 1 allow local filegede
delay_access 1 deny all
delay_class 2 2
delay_parameters 2 32000/32000 8000/8000
allow local delay_access 2
delay_access 2 deny all
If you are finished, save the configuration and restart squid
# / etc / init.d / squid restart
Source: http://miji.wordpress.com/2007/02/06/57/ # comment-21
Full information can be viewed at: http://ezine.daemonnews.org/200209/squid.html
3 comments:
sipppp..... keereeennn.... makasih ya boz...
makasih atas info nya boz....
keren dod
Posting Komentar