I am assuming that you have eth1 with 1Gigabit speed and your client series is 
172.22.6.0/24 172.22.7.0/24 172.22.8.0/24 172.22.9.0/24 172.22.10.0/24

Run this script

#!/bin/bash
tc qdisc del root dev eth1
tc qdisc add dev eth1 root handle 10: htb
tc class add dev eth1 parent 10:0 classid 10:1 htb rate 1Gbit


tc class add dev eth1 parent 10:1 classid 10:2 htb rate 1Mbit
tc qdisc add dev eth1 parent 10:2 sfq quantum 1514b perturb 15
tc filter add dev eth1 protocol ip parent 10:0 prio 5 u32 match ip dst 
172.22.6.0/24 flowid 10:2


tc class add dev eth1 parent 10:1 classid 10:3 htb rate 1Mbit
tc qdisc add dev eth1 parent 10:3 sfq quantum 1514b perturb 15
tc filter add dev eth1 protocol ip parent 10:0 prio 5 u32 match ip dst 
172.22.7.0/24 flowid 10:3

tc class add dev eth1 parent 10:1 classid 10:4 htb rate 1Mbit
tc qdisc add dev eth1 parent 10:4 sfq quantum 1514b perturb 15
tc filter add dev eth1 protocol ip parent 10:0 prio 5 u32 match ip dst 
172.22.8.0/24 flowid 10:4

tc class add dev eth1 parent 10:1 classid 10:5 htb rate 1Mbit
tc qdisc add dev eth1 parent 10:5 sfq quantum 1514b perturb 15
tc filter add dev eth1 protocol ip parent 10:0 prio 5 u32 match ip dst 
172.22.9.0/24 flowid 10:5

tc class add dev eth1 parent 10:1 classid 10:6 htb rate 1Mbit
tc qdisc add dev eth1 parent 10:6 sfq quantum 1514b perturb 15
tc filter add dev eth1 protocol ip parent 10:0 prio 5 u32 match ip dst 
172.22.10.0/24 flowid 10:6


This will come up with more perfect results.

test and check it out.. if anything goes wrong.. 
run this
tc qdisc del root dev eth1

You have to enter them everytime you reboot your system. or enter it in 
rc.local file

Arpit Tolani

--- In [email protected], sadhiq b <b.sad...@...> wrote:
>
> The following might help you...
> 
> Bandwidth Throtling with squid
> 
> Delay Pool Script in Squid
> In this scenario we are going to creat 3 pools
> 
> 128kbp
> 256kbps
> Unlimited for Admin
> 
> 
> Acl 128kbps 192.168.0.200/32
> Acl 256kbps 192.168.0.201/32
> Acl admin 192.168.0.205/32
> 
> You just creat the ACL Named net, net2, net3
> 
> delay_pools 3
> 
> delay_class 1 2
> delay_access 1 deny admin
> delay_access 1 deny 256kbps
> delay_access 1 allow 128kbps
> delay_parameters 1 -1/-1 16000/16000
> 
> delay_class 2 2
> delay_access 2 deny admin
> delay_access 2 allow 256kbps
> delay_parameters 2 -1/-1 32000/32000
> 
> delay_class 3 2
> delay_access 3 allow admin
> delay_parameters 3 -1/-1 -1/-1
> 
> Ref -:
> http://it.toolbox.com/wiki/index.php/Install_Squid_with_delay_pools
> http://quark.humbug.org.au/publications/squid/aclsquid.html
> http://www.visolve.com/squid/squid24s1/delaypool.php
> 
> Tools
> Bandwidth Management
> http://linux.softpedia.com/get/System/Networking/Bandwidth-Management-Tools-345.shtml
> 
>  iptables
> http://www.linux.com/archive/articles/50649
> 
> Iptables + tc
> http://www.docum.org/docum.org/faq/cache/49.html
> 
> Traffic control
> http://linux-ip.net/articles/Traffic-Control-HOWTO/
> http://blog.edseek.com/~jasonb/articles/traffic_shaping/scenarios.html
> 
> B.Sadhiq
> 
> --- On Wed, 13/1/10, pal_tej <pal_...@...> wrote:
> 
> 
> 
> From: pal_tej <pal_...@...>
> Subject: [LinuxVadaPav] Need little Guidance on Squid
> To: [email protected]
> Date: Wednesday, 13 January, 2010, 9:18 PM
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
>   
> 
> 
>     
>       
>       
>       Hi,
> 
> 
> 
> Can we split the bandwidth of a 5 mbps internet link into 5x1 mbps using 
> different IP subnets on Squid?
> 
> 
> 
> Is there any Open Source bandwidth management tools on Fedora or CentOS or 
> Ubuntu platform?
> 
> 
> 
> Thanks.
> 
> 
> 
> Tej Pal
> 
> 
> 
> 
> 
>     
>      
> 
>     
>     
> 
> 
>  
> 
> 
> 
>   
> 
> 
> 
> 
> 
> 
>       The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
> http://in.yahoo.com/
> 
> [Non-text portions of this message have been removed]
>


Reply via email to