squid delay_class access

9 отговора 220 прегледа
#1

squid delay_class access

Zdraveite,
imam problem s configuriraneto na squid delay_access classes ili pone taka si mislq.
OS na mashinata sys squid e Slackware linux 9.1
version na squid 2.5-STABLE4
squid e confignat da raboti kato transparent.
address-a na squid-a e 10.0.0.1.
eto i w obsti linii problemnata zona ot cfg file-a:
acl localhost src 127.0.0.1/255.255.255.255
acl mynet src "/etc/squid/mynet.cfg" -> tuk e 10.0.0.0/255.255.255.0
acl friendsnet src "/etc/squid/friendsnet.cfg" -> tuk sa 10.0.1.0/255.255.255.0 i 10.0.2.0/255.255.255.0
acl magic_words1 url_regex -i 10.0.0.1
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav .mov .asf .bin .img .mpq .tgz

#
delay_pools 3

### CLASS 1 unlimited
delay_class 1 2
delay_parameters 1 -1/-1 -1/-1
delay_access 1 allow magic_words1
#### CLASS 2 for all
delay_class 2 2
delay_access 2 allow magic_words2
delay_access 2 allow all
delay_parameters 2 5000/32000 5000/32000 -> speed 5 kbp/s
#### CLASS 3 for friends
delay_class 3 2
delay_access 3 allow friendsnet
delay_parameters 3 50000/50000 50000/50000 -> speed 50 kbp/s

Do tuk vsi4ko e nared, nqmam problem sys startiraneto na squid i ne mi izpiswa nikakwi greshki.
No eto za kakwo stawa duma:
kogato client ot mynet se opitwa da swalq ot friendsnet files, opisani w magic_words2, proxy-to go limitira na skorost 5kbp/s, t.e. qwno polzwa class 2. celta mi e da uveli4a bandwidth za mynet edinstveno i samo do friendsnet, a w ostanalite slu4ai squid da limitira mynet s class 2

Nqkoi moje li da pomogne?
blagodarq predwaritelno na wsi4ki
squid_1

Отговор
в отговор на squid_1 #2

Re: squid delay_class access

propusnal sam da paste-na:
acl all src 0.0.0.0/0.0.0.0

Отговор
в отговор на squid_1 #3

Re: squid delay_class access

moje bi

delay_access 2 allow magic_words2 !friendsnet
delay_access 2 allow all !friendsnet

Отговор
в отговор на khljh #4

Re: squid delay_class access

ne, za sujalenie ne stawa i taka
drugi predlojeniq?

Отговор
в отговор на squid_1 #5

Re: squid delay_class access

a ako slojish delay* prawilata za 50kbps predi prawilata za 5kbps ?

Отговор
в отговор на squid_1 #6

Re: squid delay_class access

s towa "delay_access 2 allow all" puskash wsi4ko prez tozi kanal i nadolu we4e niama zn.
ili napishi delay_access 2 allow all !neshto koeto iskash de se izkliu4i ot towa acl all

ili nabutai nakraia prawiloto za wsi4ko ostanalo nakraia

Отговор
в отговор на brtwbv #7

Re: squid delay_class access

> delay_access 2 allow all !neshto
i taka testwah - bez rezultat
momentnoto systoqnie na configa e: (btw version e we4e latest cvs)

cut -->
#### OWN RULES
acl localnet src 10.0.0.0/255.255.255.0
acl all src 0.0.0.0/0.0.0.0
acl friendsnet src "/etc/squid/friendsnets.cfg"
acl friendsnetdst dst "/etc/squid/friendsnets.cfg"
# rulez delay
acl webs dstdomain .msn.com .msn.net
acl websall dst 0.0.0.0/0.0.0.0
acl max_conn_ip maxconn 25

http_access deny webs
http_access allow localnet websall !max_conn_ip
http_access deny all

acl no_words url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav

delay_pools 2
delay_class 1 2
delay_access 1 allow no_words !friendsnet
delay_parameters 1 -1/-1 1000/10000 -> 1kb/s
delay_class 2 2
delay_access 2 allow friendsnet friendsnetdst
delay_access 2 deny all
delay_parameters 2 -1/-1 100000/50000 -> 100 kb/s
#### OWN RULES END
http_access deny websall
miss_access deny all !localnet
--
# Transparent
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_host virtual
httpd_accel_uses_host_header on
--> end cut
towa e configa w momenta i pak systoto
eto i izwadka to cache.log:
2004/04/14 02:58:49| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:58:49| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:58:53| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:58:53| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:58:56| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:58:57| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:59:01| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:59:01| The reply for GET [линк] is ALLOWED, because it matched 'all'
2004/04/14 02:59:06| The reply for GET [линк] is ALLOWED, because it matched 'all'
--> cut end

-> downloada ot friendsnet otnowo se filtrira do 1kb/s ili kakto wijdate ot cache.log se matchwa s all i squid reje bandwidth.

Отговор
в отговор на squid_1 #8

Re: squid delay_class access

a towa 4ete li go squid-a ? >> "/etc/squid/friendsnets.cfg"
i sintaksisa kak e wytre
iawno neshto ne celi i IPtata popadad w all

zashto ne probwash wmesto file-a da opishesh samo edno IP ot wyprosnata mreja w ACL friendsnet
i dai zaiawka kym nego

Отговор
в отговор на egewqw #9

Re: squid delay_class access

da 4ete go
sintaksi sa e po 1 mreja na red ili:
10.0.1.0/255.255.255.0
10.0.2.0/255.255.255.0
... i tn.(probwal sym dori s 1 adress)
kato pusna debuga w loga pishe 4e gi adwa kato acl. predi da sloja mrejite wyw file bqha opisani 1 po 1, no rezultatyt beshe systiq...
Sega si mislq za drugo reshenie:
ako se zabranqt files sys standartni razshireniq(.mp3,.avi i tn) kym all, s izkliu4enie na destination -> friendsnet, i posle da sloja shaper na ostanaliq traffic, mislq 4e ste stane. w obsti linii problema e input-a na squida do opredelenite mreji...otnovo 4akam predlojeniq i idei, a prez towa wreme se zahwashtam s google i howtos :)

squid_1

Отговор
в отговор на squid_1 #10

Re: squid delay_class access

problem solved!
ne razbrah i az to4no kak go naprawih no uspqh da go naprawq :)
ako nqkoi se interesuwa moje da mi drasne 1 pismo na squid@xplovdiv.com
peace

Отговор