Enviado em 08/11/2013 - 09:41h
Pessoal...gostaria de fazer um Cache full, porem uso o controle delay_poolsacl controle2 url_regex -i "/etc/squid/listadown"
acl controle3 urlpath_regex get_video\? videoplayback\? videodownload\? watch\?
acl sites_1k url_regex -i "/etc/squid/speed_down"
delay_pools 4 # Pools (acls)
delay_class 1 2 # Primeira definicao de classe
delay_parameters 1 -1/-1 -1/-1 # Primeiro (acl 1)
delay_class 2 2 # Segunda definicao de classe
delay_parameters 2 -1/-1 51200/51200 # Segundo (acl 2) limitado a 50k
delay_class 3 2 # Terceira definicao de classe
delay_parameters 3 -1/-1 102400/102400 # Terceiro (acl 3) limitado a 100k
delay_class 4 2
delay_parameters 4 -1/-1 76800/76800 153600/153600
delay_access 1 allow controle1
delay_access 2 allow controle2
delay_access 3 allow controle3
delay_access 4 allow sites_1k
DEV='eth2'
#tc filter add dev $DEV parent 1:0 protocol ip u32 match ip dst 10.10.0.0/16 match ip sport 3128 0xffff flowid 1:40
#tc filter add dev $DEV parent 1:20 protocol ip prio 2 u32 match ip src 10.1.1.0/24 match ip dst 10.10.2.0/24 match ip sport 80 0xffff flowid 1:60
tc qdisc del dev $DEV root > /dev/null 2>&1
tc qdisc add dev $DEV handle 1: root htb
tc class add dev $DEV classid 1:1 parent 1: htb rate 6000kbps ceil 6000kbps
tc class add dev $DEV classid 1:10 parent 1:1 htb rate 1500kbps ceil 5000kbps
tc class add dev $DEV classid 1:20 parent 1:1 htb rate 1000kbps ceil 3500kbps
#servidores
tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst 10.10.0.250/32 match ip dport 3128 0xffff flowid 1:10
tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst 10.10.0.249/32 match ip dport 3128 0xffff flowid 1:10