Mikrotik | Forum Mikrotik Indonesia   Mikrotik Manual Mikrotik iSPY Mikrotik RSS Feed
This Logo is a Courtesy from RumahDowty

Go Back   Mikrotik | Forum Mikrotik Indonesia > Diskusi Mikrotik RouterOS > Beginner Basics
iSpy My iTrade Register FAQ Members List Calendar Mark Forums Read

Diskusi Parameter Delay Pools Di Dalam Squid-cache pada Beginner Basics | Mikrotik | Forum Mikrotik Indonesia : Ada beberapa tag konfigurasi untuk delay pools di file squid.conf di squid box. 1. ...


Official Board Announcements
NEW
Kunjungi Forum Diskusi PROXY Linux di FMI
donasi



 
Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 01-08-2007, 14:53
okto_2005's Avatar
okto_2005 okto_2005 is offline
Member Super Senior
 
Join Date: Jul 2007
Posts: 642
iTrader: (0)
Thanks: 10
Thanked 468 Times in 129 Posts
okto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond repute
Send a message via Yahoo to okto_2005 Send a message via Skype™ to okto_2005
Parameter Delay Pools Di Dalam Squid-cache




Ada beberapa tag konfigurasi untuk delay pools di file squid.conf di squid box.
1. delay_pools (jumlah)
menyatakan berapa banyak bagian/pool yang akan dibuat
misal delay_pools 2

2. delay_class (bagian tipe/class)
menentukan klas/tipe pembagian bandwith dari setiap pool. 1 pool hanya boleh memiliki 1 clas, tidak lebih atau kurang.
bagian merupakan nomer urut dari jumlah pool didelay pool, jadi ada 1 s/d n bagian dimana n merupakan angka jumlah pada delay_pools
tipe merupakan tipe class delay yang dipakai.
Secara umum tipe menyatakan bagaimana cara membagi bandwidth, ada 3 tipe:

TIPE 1: semua bandwidth yang ada akan dibagi sama rata untuk semua user squid
TIPE 2: membatasi pemakaian bandwith dari total bandwidth yang ada, dan bandwith yang diperuntukan squid akan dibagi semua user dengan sama rata.
TIPE 3: membatasi pemakaian bandwidth dari total bandwidth yang ada, setiap network class C akan mendapat bandwidth sama besar, setiap user pernetwork akan mendapat bandwidth yang sama besar dari total bandwidth per network

CONTOH TIPE DIATAS:
TIPE 1: ex ada bandwidth 128 dan semua bandwith dipakai untuk browsing
TIPE 2: ex ada bandwidth 128 dimana 28 kbit dipakai untuk email dan sisanya (128-28) 100 kbit dipakai untuk browsing
TIPE 3:
ex: bandwidth tersedia 512 kb, untuk browsing disediakan bandwidth 384 kb, sisanya untuk aktifitas lain.
Di jaringan tersebut ada 3 departement dengan network yang berbeda misal lab (192.168.1.0/24), manajer(192.168.2.0/24), sales(192.168.3.0/24).
nah misah oleh admin di set bahwa pernetwork mendapat jatah 128 kb/s.
maka user2 di sales akan mendapat pembagian bandwidth sama besar dari total 128 kb/s.
maka user2 di lab akan mendapat pembagian bandwidth sama besar dari total 128 kb/s.
maka user2 di manajer akan mendapat pembagian bandwidth sama besar dari total 128 kb/s.

3.delay_access (bagian acl)
Memberi batasan siapa saja yang boleh mempergunakan delay pools ini.
Penting untuk diingat sebaiknya setelah menetukan batasan jangan lupa di akhiri dengan deny all.
misal:

delay_access 1 allow manajer
delay_access 1 deny all
delay_access 2 allow sales
delay_access 2 deny all

4. delay_parameters (restore/max)
Ini adalah bagian terpenting dari delay pools memberikan aturan main setiap delay pools yang dibentuk.
delay parameter mempunyai format yang disesuaikan dengan tipe/class yang dipakai.
Tapi disetiap tipe yang dipakai ada 1 format baku yaitu restore/max.

restore menunjukkan maksimum kecepatan data yang dapat dilewatkan bila harga max sudah terlampaui, dalam satuan bytes/second

max menunjukkan besar-nya file atau bucket yang dapat dilewatkan tanpa melalui proses delay. dalam satuan bytes.
Yang perlu diperhatikan dari satuan diatas adalah harga restore dimana kita sering menerima/menyewa/membeli bandwidth dari provider dalam satuan bits/second bukan bytes/second. Sedangkan satuan kecepatan yang ditunjukkan oleh Microsoft pada saat mendonlot file adalah bytes/sec.
Sedangkan satuan dari harga max sudah sesuai dengan kebiasaan sehari-hari, dimana kita memberi besaran bytes pada file-file.
1 byte = 8 bit.

SpesialCase: -1/-1 berarti unlimited atau tidak dibatasi pada nilai restore/max

ex: 1000/64000 harga restore sama dengan 8000 bits/sec atau 8 kbits/sec.
Yang artinya user akan mendapat donlot brustable selama file yang akan dibuka lebih kecil dari 64 kbytes, jadi kecepatan bisa diatas 8 kbit/sec.
Bila ternyata file yang dibuka melebihi 64 bytes, maka proses limitasi akan segera dimulai dengan membatasi kecepatan maksimal 8 kbits/s.

class 1
...delay_parameters (#pool individual)
...ex: delay_parameters 1 1000/64000
...Berarti semua network akan mendapat bandwidth yang sama di pool no 1.
...Sebesar 1 kbytes/sec (8 kbits/sec), dengan burstable file 64 kb.

class 2
...delay_parameters (#pool agregate individual)
...ex: delay_parameters 1 32000/32000 1000/64000
...Berarti squid akan memakai bandwidth maksimum (32000*8) 256kbits dari semua bandwidth.
...Bila terdapat lebih dari 1 network class C, maka total yang dihabiskan tetap 256 kbit/sec
...dan tiap user akan mendapat bandwidth maksimum 1 kbytes/sec (8 kbits/sec), dengan burstable file 64 kb.

class 3
...delay_parameters (#pool agregate network individual)
...ex: delay_parameters 1 32000/32000 8000/8000 1000/64000
...Berarti squid akan memakai bandwidth maksimum (32000*8) 256kbits dari semua bandwidth.
...Bila terdapat lebih dari 1 network class C, maka setiap network akan dipaksa maksimum sebesar (8000*8) 64 kbits/sec
...dan tiap user pada satu network akan mendapat bandwidth maksimum 1 kbytes/sec (8 kbits/sec), dengan burstable file 64 kb.

Sumber:
http://wiki.squid-cache.org/SquidFaq...9d0b9aee33e376
http://www.geocities.com/adilinux/squid-delaypools.html


Last edited by okto_2005 : 01-08-2007 at 15:03.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 4 Users Say Thank You to okto_2005 For This Useful Post:
  #2 (permalink)  
Old 01-08-2007, 14:54
okto_2005's Avatar
okto_2005 okto_2005 is offline
Member Super Senior
 
Join Date: Jul 2007
Posts: 642
iTrader: (0)
Thanks: 10
Thanked 468 Times in 129 Posts
okto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond repute
Send a message via Yahoo to okto_2005 Send a message via Skype™ to okto_2005
Contoh Kasus 1

dalam 1 network dengan penggunaan bandwidth total tidak dibatasi terdapat beberapa komputer dengan klasifikasi sebagai berikut

* admin, server dengan bandwidth unlimited
* staff dengan bandwidth 1,5 kbytes/sec, bila file yang diakses melebihi 64Kbte
* umum dengan bandwidth 1 kbytes/sec, bila file yang diakses melebihi 32 Kbyte
Code:
acl all src 0.0.0.0/0.0.0.0
acl admin src 192.168.1.250/255.255.255.255
acl server src 192.168.1.251/255.255.255.255
acl umum src 192.168.1.0/255.255.255.0
acl staff src 192.168.1.1 192.168.1.111 192.168.1.2 192.168.1.4 192.168.1.71

delay_pools 3

delay_class 1 1
delay_parameters 1 -1/-1
delay_access 1 allow admin
delay_access 1 allow server
delay_access 1 deny all

delay_class  2 1
delay_parameters 2 1500/64000
delay_access 2 allow staf
delay_access 2 deny all

delay_class  3 1
delay_parameters 3 1000/32000
delay_access 3 allow umum
delay_access 3 deny all
Cara mencobanya paling mudah adalah dengan menggunakan donlot manajer semacam DAP, GetRight maka akan terlihat bandwidth sudah dibatasi.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-08-2007, 14:56
okto_2005's Avatar
okto_2005 okto_2005 is offline
Member Super Senior
 
Join Date: Jul 2007
Posts: 642
iTrader: (0)
Thanks: 10
Thanked 468 Times in 129 Posts
okto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond repute
Send a message via Yahoo to okto_2005 Send a message via Skype™ to okto_2005
Contoh Kasus 2

Delay pools juga dapat digunakan untuk membatasi donlot file untuk extensi tertentu.
Gunakan ACL url_regex untuk mengatasi hal ini.
Contoh dibawah digunakan untuk membatasi donlot file multimedia hingga 1 kByte/sec.
Code:
acl multimedia url_regex -i \.mp3$ \.rm$ \.mpg$ \.mpeg$ \.avi$ \.dat$
delay_pools 1
delay_class 1 1
delay_parameters 1 1000/16000
delay_access 1 allow multimedia
delay_access 1 deny ALL

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to okto_2005 For This Useful Post:
  #4 (permalink)  
Old 01-08-2007, 14:59
okto_2005's Avatar
okto_2005 okto_2005 is offline
Member Super Senior
 
Join Date: Jul 2007
Posts: 642
iTrader: (0)
Thanks: 10
Thanked 468 Times in 129 Posts
okto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond repute
Send a message via Yahoo to okto_2005 Send a message via Skype™ to okto_2005
Contoh Kasus 3

Kasus Petama

bagaimana caranya membuat delay pools untuk membatasi download di siang hari untuk 15 klient sedangkan malam harinya lost asumsi jamnya ( 10:00 - 21:00)
Code:
acl LTIME time SMTWHFA 10:00-21:00

acl download url_regex -i ftp \.exe$ \.mp3$ \.mp4$ \.tar.gz$ \.gz$ \.tar.bz2$ \.rpm$ \.zip$ \.rar$
acl download url_regex -i \.avi$ \.mpg$ \.mpeg$ \.rm$ \.iso$ \.wav$ \.mov$ \.dat$ \.mpe$ \.mid$
acl download url_regex -i \.midi$ \.rmi$ \.wma$ \.wmv$ \.ogg$ \.ogm$ \.m1v$ \.mp2$ \.mpa$ \.wax$ 
acl download url_regex -i \.m3u$ \.asx$ \.wpl$ \.wmx$ \.dvr-ms$ \.snd$ \.au$ \.aif$ \.asf$ \.m2v$ 
acl download url_regex -i \.m2p$ \.ts$ \.tp$ \.trp$ \.div$ \.divx$ \.mod$ \.vob$ \.aob$ \.dts$ 
acl download url_regex -i \.ac3$ \.cda$ \.vro$ \.deb$

delay_pools 1

delay_class 1 1
delay_parameters 1 3000/3000
delay_access 1 allow download TIME
delay_access 1 deny all
Kasus kedua
Bagaimana caranya membuat delay pools untuk membatasi download di siang hari dengan speed ... dan malam hari dengan speed ..., abis si bozz malem-nya mau pakai buat dolot.
Jadi pengennya pas malam bw buat user makin kecil, bukan malah di loss
Code:
acl JAM_KANTOR time SMTWHFA 07:00-18:00 

delay_pools 2 delay_class 1 2 
delay_parameters 1 24000/32000 -1/-1 
delay_access 1 allow riset JAM_KANTOR 
delay_access 1 deny all 

delay_class 1 2 
delay_parameters 2 8000/8000 -1/-1 
delay_access 2 allow riset !JAM_KANTOR 
delay_access 2 deny all

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to okto_2005 For This Useful Post:
  #5 (permalink)  
Old 01-08-2007, 15:00
okto_2005's Avatar
okto_2005 okto_2005 is offline
Member Super Senior
 
Join Date: Jul 2007
Posts: 642
iTrader: (0)
Thanks: 10
Thanked 468 Times in 129 Posts
okto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond reputeokto_2005 has a reputation beyond repute
Send a message via Yahoo to okto_2005 Send a message via Skype™ to okto_2005
Contoh Kasus 4

Saya ada bandwidth besar, 1mbps.
Ingin membatasi yang donlot file besar di atas 5mbyte, di beri speed 32kbps.
Misal bila ada 3 user yang donlot, tiap-tiap user akan mendapat bw maximal 32kbps.
Code:
acl user src 192.168.1.0/24

delay_pools 1
delay_class 1 2
delay_parameters 1 40000/10000000 4000/5000000
delay_access 1 allow user download
delay_access 1 deny ALL

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to okto_2005 For This Useful Post:
  #6 (permalink)  
Old 01-08-2007, 19:50
c0nf's Avatar
c0nf c0nf is online now
Forum Guru
 
Join Date: Jul 2007
Location: Bdg, Id.
Posts: 1,073
iTrader: (0)
Thanks: 87
Thanked 107 Times in 87 Posts
c0nf is a jewel in the roughc0nf is a jewel in the roughc0nf is a jewel in the roughc0nf is a jewel in the roughc0nf is a jewel in the roughc0nf is a jewel in the rough
Send a message via Yahoo to c0nf Send a message via Skype™ to c0nf
ditambahin dikit yaks

acl day time 08:00-23:59

delay_pools 2
delay_class 1 2
delay_class 2 2
delay_parameters 1 10000/24000 -1/-1
delay_parameters 2 -1/-1 -1/-1
delay_access 1 allow donlot day
delay_access 1 deny all
delay_access 2 allow donlot !day
delay_access 2 deny all


dengan tambahan acl di atas, user yg mendownload antara jam 8 pagi sampai jam 12 malem hanya akan mendapat bandwidth 10kBps. tetapi antara jam 12 malam sampai jam 8 pagi, mereka akan mendapat seluruh bandwidth yang kita punya.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-08-2007, 01:16
[a]'s Avatar
[a] [a] is offline
Forum Advisor
 
Join Date: Jun 2007
Location: Jakarta
Posts: 1,690
iTrader: (1)
Thanks: 311
Thanked 962 Times in 243 Posts
[a] has disabled reputation
Send a message via Yahoo to [a]
terima kasih buat share-nya bro okto_2005 dan bro conf


__________________
Follow me on twitter @alternatifer
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


This Forum is Powered by Orion Net.

All times are GMT +8. The time now is 05:47.