Senin, 22 Maret 2010
Cache Video
Syarat :
-install webserver apache/lighttpd (terserah).
-processor: min p4, ram 1Gb
Some Command:
apt-get install python python-urlgrabber
wget hxxp://www.razametal.org/conf/videocache/python-iniparse_0.3.1-1_all.deb
dpkg -i python-iniparse_0.3.1-1_all.deb
wget hxxp://www.razametal.org/conf/videocache/videocache-1.9.2.tar.gz
tar xvf videocache-1.9.2.tar.gz
cd videocache-1.9.2
python setup-deb.py install
vim /etc/videocache.conf
cache_host = 172.17.10.1 < ganti dengan ip squid
proxy =http://172.17.10.1:3128/ <<< ganti dengan ip squid dan port squid anda
base_dir = /var/spool/videocache
save dan exit
cp videocache-httpd.conf /etc/httpd/conf.d/videocache.conf
cd /etc/squid/
wget hxxp://shakau.googlepages.com/videocache-squid.conf
vim squid.conf
tambahkan di baris paling bawah
include /etc/squid/videocache-squid.conf
cd /var/spool/squid
mkdir -p videocache/tmp videocache/youtube videocache/metacafe videocache/dailymotion videocache/google videocache/redtube videocache/xtube videocache/vimeo videocache/wrzuta videocache/youporn videocache/soapbox videocache/tube8 videocache/tvuol videocache/bliptv videocache/break
chown -R proxy:proxy videocache
chmod -R 755 videocache
mkdir -p /var/log/videocache
chmod -R 755 /var/log/videocache/
chown -R squid:squid /var/log/videocache/
restart servis apche/lighttpd nya
restart squid nya
test dengan browser buka youtube
cek di /var/log/videocache/videocache.log
jika video play tidak ada error sampe akhir berarti jalan
Thx to :Siber
Jumat, 26 Februari 2010
Script Auto Simple Queue
/queue simple add name="192.168.0. $e" target-addresses="192.168.0. $e" max-limit=64000/256000
}
Jumat, 30 Oktober 2009
Hotspot, apply different limits and different traffic priorities
From MikroTik Wiki
Introduction
Many users are always asking about how to prioritize the traffic using the Mikrotik RouterOS Hotspot service.
The following method helps to manage the network traffic and customize it the way you want. It also insure to provide the correct service for a specific use in a big network, giving priority for the VIPs, Special users or services in a congested network.
Also, you can use the same method if you want to make sure that heavy users should not keep downloading or uploading files for long period in order to save the rest of available traffic for light users who are looking for good speed for browsing or occasionally access. This can be applied using the burst limit or a combination of minimum and burst limit with priority.
The trick with bandwidth management in Hotspot is to use the Users Profiles, and assign the different type of speeds that is related to a specific group.
The question is, How to do that?
Using the Winbox, in: IP >> Hotspot >> User Profiles >> rate limit:use the following string: x1k/y1k x2k/y2k x3k/y3k x5/y5 P x6k/y6k
where:
x1k/y1k: Rate (txrate/rxrate i.e 128k/1024k)
x2k/y2k: Burst Rate (i.e 256k/2048k)
x3k/y3k: Burst Threshold (i.e 160k/1280k)
x5/y5: Burst Time (in seconds i.e: 60/60)
Priority: P (use integer from 1-8)
Minimum rate: x6k/y6k (i.e 32k/256k)
for example: 24k/128k 32k/256k 24k/196k 30/30 8 16k/64k
The following example show you what you have to do exactly:

means:
Rate:24k/128k
Burst Rate: 32k/256k
Burst Threshold: 24k/196k
Burst Time: 30/30
Priority: 8
Minimum rate: 16k/64k
In Queues table, you can see what happened exactly for the user having the same profile:

Also, you can check the configured priority here:

if you just want to use rate and priority, then use:
Rate, Burst Rate, Burst Priority, Minimum rate.