Networking Forums

Networking Forums > Computer Networking > Linux Networking > using squid to limit bandwidth based on domain

Reply
Thread Tools Display Modes

using squid to limit bandwidth based on domain

 
 
cwhite@theatomicmoose.ca
Guest
Posts: n/a

 
      12-14-2006, 03:45 PM
I have been reading about using delay pools with squid, but I am not
sure how this can solve the problem of restricting bandwidth according
to the site.

Delay pools seem to restrict based on your local network address, what
I would like to do is restrict the bandwidth taken up by sites like
video.google.com. How can I accomplish this and where can I find
information on how to do it?

Thanks

 
Reply With Quote
 
 
 
 
Artur Frydel
Guest
Posts: n/a

 
      12-14-2006, 03:58 PM
(E-Mail Removed) wrote:
> I have been reading about using delay pools with squid, but I am not
> sure how this can solve the problem of restricting bandwidth according
> to the site.
>
> Delay pools seem to restrict based on your local network address, what
> I would like to do is restrict the bandwidth taken up by sites like
> video.google.com. How can I accomplish this and where can I find
> information on how to do it?
>


Maybe you should use regex?
Something like this;

acl magic_words url_regex -i video.google.com
delay_pools 1
delay_class 1 1
delay_parameters 1 16000/16000
delay_access 1 allow magic_words

--
Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
In /dev/null no one can hear your scream
 
Reply With Quote
 
cwhite@theatomicmoose.ca
Guest
Posts: n/a

 
      12-14-2006, 05:30 PM

Artur Frydel wrote:
> (E-Mail Removed) wrote:
> > I have been reading about using delay pools with squid, but I am not
> > sure how this can solve the problem of restricting bandwidth according
> > to the site.
> >
> > Delay pools seem to restrict based on your local network address, what
> > I would like to do is restrict the bandwidth taken up by sites like
> > video.google.com. How can I accomplish this and where can I find
> > information on how to do it?
> >

>
> Maybe you should use regex?
> Something like this;
>
> acl magic_words url_regex -i video.google.com
> delay_pools 1
> delay_class 1 1
> delay_parameters 1 16000/16000
> delay_access 1 allow magic_words
>
> --
> Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
> In /dev/null no one can hear your scream


looks good to me, I'll give it a try and let you know what happens

I was looking at trying something similar but I would have totally
missed out the pools and class variables, mine would have looked like
this:

acl slow_it_down url_regex -i video.google.com
delay_parameters 1 16000/16000
delay_access 1 allow slow_it_down

which would probably end up doing nothing, or causing and error when i
tried to apply it and restart squid

please correct me if i'm wrong, but the parameter 16000/16000 should
slow it down to 128kbps, which is probably around the speed I was
looking to use

thanks!!!

 
Reply With Quote
 
cwhite@theatomicmoose.ca
Guest
Posts: n/a

 
      12-14-2006, 06:01 PM

Artur Frydel wrote:
> (E-Mail Removed) wrote:
> > I have been reading about using delay pools with squid, but I am not
> > sure how this can solve the problem of restricting bandwidth according
> > to the site.
> >
> > Delay pools seem to restrict based on your local network address, what
> > I would like to do is restrict the bandwidth taken up by sites like
> > video.google.com. How can I accomplish this and where can I find
> > information on how to do it?
> >

>
> Maybe you should use regex?
> Something like this;
>
> acl magic_words url_regex -i video.google.com
> delay_pools 1
> delay_class 1 1
> delay_parameters 1 16000/16000
> delay_access 1 allow magic_words
>
> --
> Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
> In /dev/null no one can hear your scream


just tested it, and as far as we can tell it works like a charm, on our
wirless network it can take up to 10 seconds for the browser to load
just 1 second of video

thanks again

 
Reply With Quote
 
Artur Frydel
Guest
Posts: n/a

 
      12-21-2006, 05:38 PM
(E-Mail Removed) wrote:

> please correct me if i'm wrong, but the parameter 16000/16000 should
> slow it down to 128kbps, which is probably around the speed I was
> looking to use
>


Yes. The first parameter is bandwidth limit for each file *bigger* than
the second parameter. In other words... if you download file bigger than
1600 bytes, after downloading 1600 bytes speed limit slow down to 128kbit.

More information, and complete squid book is here;
http://man.chinaunix.net/newsoft/squ...book-full.html


--
Artur 'Bzyk' Frydel | artur.frydel[at]gmail-dot-com
"Always look on the bright side of life."
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web based Squid Richard Lam Linux Networking 3 08-08-2006 01:47 PM
Limit net access based on time/day using BT Voyager 205 Peter X Broadband 6 04-19-2005 03:11 PM
Using domain-based and workgroup-based networks on same PC S Ward Home Networking 3 08-09-2004 08:41 PM
Squid forms based authentication. Max Linux Networking 0 07-24-2004 01:49 PM
Squid ACL based on protocol AND host? Ramon F Herrera Linux Networking 1 12-11-2003 01:16 AM



1 2 3 4 5 6 7 8 9 10 11