Linux Shaper

Shaperd CBQ example


mainip=213.91.142.15

internet_iface=ppp0

high_start_speed=1

even_division=0

check_always=1

squid_support=0

lospeed=16

hispeed=900

internet_iface_speed=400

speed_ext=Kbit

debug=0

delay=10

write_delay=0

local_int=eth0;10240;192.168.100.0/16;192.168.1.0/24;1

local_int=eth1;102400;192.168.100.0/16;192.168.2.0/24;2



В директория  /etc/shaper/iplist трябва да се зададе скороста на хоста

Пример:

192.168.1.4=eth0 8000 16000

8000 мин. гарантирана скорост 16000 макс


Полезна команда:

tc -s qdisc- проверява как shaperd записва.

Изважда се нещо от сорта:

 

qdisc tbf d09f: dev eth0 rate 5430bps burst 10Kb lat 1.2s             
 Sent 108930 bytes 73 pkts (dropped 0, overlimits 0)                   
                                                                      
 qdisc tbf d09e: dev eth0 rate 5430bps burst 10Kb lat 1.2s             
 Sent 126618 bytes 89 pkts (dropped 0, overlimits 0)                   
                                                                       
 qdisc tbf d09d: dev eth0 rate 1638bps burst 10Kb lat 3.8s             
 
 Sent 54699 bytes 65 pkts (dropped 0, overlimits 321)                 
 backlog 6110b 5p                                                     
                                                                      
 qdisc tbf d09c: dev eth0 rate 10Mbit burst 10Kb lat 4.8ms             
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)                         
                                                                       
 qdisc tbf d09b: dev eth0 rate 10Mbit burst 10Kb lat 4.8ms             
 Sent 5690 bytes 53 pkts (dropped 0, overlimits 0)