dividing browsing and downloading

Discussion regarding the installation and configuration of Linux distributions.
Post Reply
AcidEYE
Havaldaar
Posts: 115
Joined: Mon Feb 28, 2005 5:41 pm
Location: Lahore (Pakistan)
Contact:

dividing browsing and downloading

Post by AcidEYE »

As Salam U Alikum,

Dear members,

i want to discuss a senario, i've 2 DSL modems, from 2 differnet ISP, one is 512 KB and other is 1024 KB, i want to bound broswing and messenger conectivity on 512 KB link and downloading TCP, UDP, P2P, each and everything on 1024 KB link. for that i've to make 2 squid servers?
what would be the senario and what would be the configuration?

kindly help me in this.

Thanks & Regards

waiting for reply.
Linux Addicted
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

use mikrotik and do packet shaping as per your requirement as it won't be much difficult.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
khurram48
Lance Naik
Posts: 31
Joined: Wed May 16, 2007 12:59 am

use delay pools for your bandwidth slicing in squid

Post by khurram48 »

Assalam o allaikum brother

use delay pools for band width slicing
seperate surfing and downloading to limits
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

Khurram:

delay polls can divide browsing and downloading how, i want to implement that one of my user will get 4.0 kb speed, 2 user will get 9.0 kb speed, boss will get 50kb speed.

how can i divide on ip bases and mac basis, i am really greatful if you will clear my doubts.

Regards,
Noman Liaquat
AcidEYE
Havaldaar
Posts: 115
Joined: Mon Feb 28, 2005 5:41 pm
Location: Lahore (Pakistan)
Contact:

Post by AcidEYE »

As Salam U Alikum,

mikrotik is free?
Linux Addicted
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

Nop It is not!
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

Usman,

Whats other alternative then.

Regards,
Noman Liaquat
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Two ISP links in 1 proxy

Post by x2oxen »

Ok then lets do this by placing two squid machines and here is the procedure you going to use.

Here i will let you know how to do it by placing two squid server.

Place 2 systems and install squid on both of them and make them cache peer and put 1 dsl in each system. And in your primary proxy server with which your users will connect you define that all the down loadings that users can do like .exe .avi .rm .jpg etc will come from 2nd proxy server which is connected to other dsl and the browsing and yahoo messenger and all other things will be come from internet/dsl directly connected to your primary proxy.

Here are the steps to do so.


cache_peer < 2nd proxy ip > parent < proxy port> 0 no-query

acl downloads "path/to/downloads.txt"
cache_peer_access < 2nd proxy ip > allow downloads
cache_peer_access < 2nd proxy ip > deny all # assuming acl for all src address is listed above

downloads.txt

Code: Select all

\.exe$
\.avi$
\.rm$
\.ram$
\.zip$
\.mp3$
\.mpg$
\.mpeg$
\.wav$
\.wma$
\.wmv$
\.mov$
\.exe\?.*$
\.avi\?.*$
\.rm\?.*$
\.ram\?.*$
\.zip\?.*$
\.mp3\?.*$
\.mpg\?.*$
\.mpeg\?.*$
\.wav\?.*$
\.wma\?.*$
\.wmv\?.*$
\.mov\?.*$

Hope this will help you out noman.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

usman,

my simple question is that squid can be used as bandwidth manager, if yes how?
From squid can we divide bandwidth to users and ips.

One thing I want to run squid with ldap.

Regards,
Noman Liaquat
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

well packet shaping is possible in squid via delay pools but i have terrible experience in that as it sucked my server whole physical memory while i was shaping packets using squid. thought here is the link which will help you to do so

http://pcquest.ciol.com/content/linux/103080904.asp

if you want to limit bandwidth only then use script provided by mudassir just you will be needing to edit it a bit and it will work fine for this purpose.
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Post by nomankhn »

Ahhhhh........

that means no other solution :shock: :(

Regards,
Noman Liaquat
x2oxen
Major General
Posts: 1114
Joined: Wed Aug 22, 2007 3:17 pm
Location: Faisalabad
Contact:

Post by x2oxen »

Why you want to shape your bandwidth in squid while you having other option within same linux box???
Muhammad Usman
+92-321-6640501
Chemonics International
http://usmanpk.com
Post Reply