Sunday, April 18, 2010

MIKROTIK QoS [bandwidth management]

MIKROTIK QoS

Simple Queue

untuk menggunakan simple Queue
- aktifkan max-limit
- upload = 256k
- download = 256k

Simple Queue with Burst
1.aktifkan max-limit
- target address = host address
= max-limit
>> upload = 64k
>> download = 256k

= burst-limit
>> upload = 128k
>> download = 256k

= bust-treshold
>> upload = 32k
>> download = 64k

= time burst
>> 20 sec

Queue With Dual Limitation
1. Parent Queue
> aktifkan parent-Queue

- name = main_queue
- max-limit = 256k / 256k

> advance tab = optional

kombinasikan simple Queue with burst dengan menambahkan dual-limitation tau parent-queue [main-queue]

Simple Queue With Time
1. jalankan Simple Queue with Burst
2. aktifkan time range for limit
- office_hours
- after_office_hours
- holiday

Graphing Traffic
1. cara kerja mirip seperti mrtg

Queue Disciplines [Schaduler dan Shapes]
1. Scheduler
> Limit the number of waiting packet
2. Traffic Shapes
> control data flow speed also can
do schaduling task

1. contoh Scheduler Queue :
- BFIFO – PFIFO | Byte or Packet
- RED – SFQ

2. contoh Shaper Queue :
- PCQ – HTB

what is :
1. RED ?
2. SFQ ?
3. PCQ ?

Per Connection Queue [PCQ]
1. Memory comsumtive
2. not limit the number sub flow

PCQ-Algorithm
1. jika Limit-at and Max-limit set = 0 maka sub-queue bisa mendapatkan semua bandwidth
yang tersedia di paren. artinya mereka bisa menggunakan
semua bandwidth secara rata.

Contoh PCQ

MARKING
1. marking-connection
- chain = forward
- src-address = 192.168.10.0
- out-interface = WAN
- action = mark-connection
- new-connection-mark = pcq-con
- passtrought = yes

2. marking-packet
- chain = forward
- connection-mark = pcq-con
- action = mark-packet
- new-packet-mark = pcq-packet
- passtrought = no

Create New Pcq-type
1. >> Queue >> Queue-Type >> add
- name = pcq-download
- kind = pcq

- rate = 32k
- limit = 50
- total limit = 2000
- dst-address = yes

Make Queue for Download Traffic
1. >> Queue >> Queue Tree >> add

- name = client-download
- parent = local

- parent-mark = pcq-packet
- queue-type = pcq-download
- priority = 8

## cara sama untuk buat traffic UPLOAD

>> untuk buat pcq with no limit
>> PCQ with no rate
rate = 0
max-limit = 256k

HTB State
*********
1. GREEN
>> sama atau kurang dari Limit-at

2. YELLOW
>> lebih besar dari Limit-at

3. RED
>> melewati Limit-at

>>> attibute HTB
- limit-at
- max-limit
- priority

example for advanced bandwidth management :

misal kita beli bandwidth 128kbps

atur untuk setiap host untuk dapat bandwidth berapa?

1. buat queue simple parent = total bandwidht yang didapat
Name = TOTAL-BANDWIDTH
max-limit = upload=128k | download=128k

Advance
interface = lan
limit-at = 32k / 32k

2. buat queue untuk host
name = host_A
target address = 192.168.10.5 [ip host]
max-limit = 32k / 32k

Advance

interface = lan
limit at = 8k / 8k
queue-type = BAGI-RATA / BAGI-RATA
parent = TOTAL-BANDWIDTH

3. buat pcq connection
name = BAGI-RATA
kind = pcq

rate = 16k >> kalo traffic lagi full semua dapet 16k rata
limit= 20

Saturday, April 10, 2010

Setting Squid Sebagai Transparent Proxy Di Windows

Persiapan Tempur:

  1. Squid For Windows.
  2. Softperfect Bandwith Manager.

Seperti sudah kita ketahui squid untuk windows untuk saat ini tidak bisa disetting sebagai transparent proxy berbeda jika anda memasangnya di linux. Akhirnya saya mencari alternatif solusi tentang masalah ini dan ketemu salah satu solusinya. Langkah pertama yaitu install squid, PASTIKAN didalam squid konfigurasi ada line ini “http_port 3128 transparent“. Langkah kedua adalah menginstall program softperfect bandwith manager, setelah itu konfigurasi dimulai…

klik Tools -> Port Mapping -> New -> Beri nama terserah -> Pilih “redirect to local port” -> Tulis “3128“

Klik Rules -> Add Rules

Tab General

Rule Name “isi terserah”, Direction “Both” , Transfer Rate Limit “Unlimited“, Protocol “TCP and UDP“, Apply Rule on interface “Pilih NIC yang menuju private network“

Tab Source

Source address bebas sesuaikan dengan kebutuhan… dalam contoh saya memberikan akses untuk IP range mulai 192.168.1.1 sampai dengan 192.168.1.255, Source port “Any“

Tab Destination

Destination Address “Any IP Address“, Destination Port ADD port 80 dan 443.

Tab Advanced

Additional Processing klik “Process through the following mapping” Lalu pilih nama port mappping yang tadi sudah kita buat.

Selesai deh… :D sekarang squid di windows sudah menjadi transparent proxy, cara mengeceknya bisa langsung coba browsing di klient (tanpa konfigurasi) atau cek di beberapa website yang bisa menganalisa berbagai macam proxy. Semoga berguna dan menjadi tambah goblog hahahaha……. :D

PERHATIAN :

- Kebanyakan kesalahan pertama ada di Apply Rule on interface , solusi HARUS memilih NIC yang menuju private network.

- Kebanyakan kesalahan kedua adalah rata-rata orang mencoba di klient, teknik ini hanya berjalan dengan syarat harus di install di komputer GATEWAY.

Wednesday, March 31, 2010

mengembalikan grub ubuntu 9.10 setelah install windows 7

Bermula dari pengalaman yg saya alami. Linux / Ubuntu memiliki boot loader yang disebut dengan Grub ( GRand Unified Bootloader ). Kurang lebih grub adalah menu di awal booting laptop/PC kita. Isinya untuk memilih OS mana yang akan kita gunakan untuk booting. ( Dengan catatan kita memiliki lebih dari 1 OS ). Masalahnya, Grub milik windows, tidak bisa memunculkan menu untuk booting ubuntu saya, sedangkan Grub milik Ubuntu lengkap, bisa memunculkan semua OS yang terinstall di PC/Laptop saya. ( Pengalaman saya menggunakan 3 OS, semua bisa muncul di menu Grub ubuntu)
Sekarang, saya ingin menjelaskan cara mengembalikan Grub milik ubuntu yang hilang karena tertimpa oleh Grub windows.

caranya :
Nyalakan PC/laptop dan booting dari LiveCD Ubuntu atau flashdisk (yang sudah terisi OS Ubuntu). Cara mengubah urutan booting (boot priority) pada BIOS bisa dicari sendiri lewat google.
Masukkan LiveCD Ubuntu ke dalam CD-ROM (atau flashdisk, tergantung mana yang ingin digunakan).
Pilih Try Ubuntu without any changes to your computer. Tunggu sampai Ubuntu tampil dengan sempurna.
Setelah berhasil masuk ke Ubuntu, buka terminal (klik Applications > Accessories > Terminal, atau tekan kombinasi tombol Ctrl+Alt+F2).
kemudian, muncul menu di terminal.

### lihat partisi kita dengan perintah sudo fdisk -l :

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x996e996e

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 6559 32202292+ f W95 Ext'd (LBA)
/dev/sda5 2551 5100 20482843+ b W95 FAT32
/dev/sda6 5101 6316 9767488+ 83 Linux
/dev/sda7 6317 6559 1951866 82 Linux swap / Solaris

# Sekarang ketik sudo mount -t ext4 /dev/sda6 /mnt/. CATATAN: sda6 adalah nama partisi Linux di laptop saya. Anda bisa menggantinya sesuai dengan nama partisi Linux di komputer Anda.

# Ketik sudo mount -t proc proc /mnt/proc/
# Ketik sudo mount -t sysfs sys /mnt/sys/
# Ketik sudo mount -o bind /dev/ /mnt/dev/
# Ketik sudo chroot /mnt/ /bin/bash
# Ketik grub-install /dev/sda. Hasilnya muncul tulisan seperti di bawah ini:
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install’.
(hd0) /dev/sda
# Ketik grub-install /dev/sda6. Hasilnya muncul pesan seperti ini:
grub-setup: warn: Attempting to install GRUB to a partition instead of the MBR. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install’.
(hd0) /dev/sda
# ketik update-grub. Hasilnya seperti di bawah ini:
Generating grub.cfg …
Found linux image: /boot/vmlinuz-2.6.31-14-generic
Found initrd image: /boot/initrd.img-2.6.31-14-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows 7 on /dev/sda2
done


Catatan :
Cara ini digunakan untuk ubuntu 9.10 yang menggunakan grub2. sedangkan seri ubuntu 9.04 ke bawah menggunakan grub versi sebelum grub2. Caranya lebih mudah.sama seperti cara di atas sampai tahap masuk terminal, kemudian :

# ketik sudo grub
- root@ubuntu:/boot# grub

# setelah masuk ke grub editor, untuk melihat urutan partisi kita, ketik geometry (hd0);
- grub> geometry (hd0);
geometry (hd0)
drive 0x80: C/H/S = 9729/255/63, The number of sectors = 156301488, /dev/sda
Partition num: 0, Filesystem type unknown, partition type 0xaf
Partition num: 1, Filesystem type is fat, partition type 0xc
Partition num: 3, Filesystem type is fat, partition type 0xb
Partition num: 5, Filesystem type is ext2fs, partition type 0x83
Partition num: 6, Filesystem type unknown, partition type 0x82
Partisi ubuntu saya di num 5 linux, lalu saya ketik:
- grub> root (hd0,5);
lalu untuk menjadikan GRUB Loader-nya berada di MBR, saya ketik;
- grub> setup (hd0)

Jika berhasil akan muncul menu kata2 sukses..

SELAMAT MENCOBA

Tuesday, March 30, 2010

Mereset Router Board RB-750G

Mungkin beberapa dari anda pernah binung bagai mana cara mereset RB-750G....seperti saya juga gitu...Padahal tombol reset udah saya pencet2 puluhan kali, udah saya reboot...ech ternyata sama saja.....Alhasil setelah sekitar 1/2 jam akhirnya ketemu juga caranya.

Ternyata perlakuan untuk si imut ini beda ama teman2nya.....di sogok dengan keras maupun lembutpun tetap g bisa....

Mungkin anda masih penasaran bagai mana caranya.......? ehehehehehhe

Caranya mudah oq.....
  1. Lepas kabel power dari RB
  2. Pencet tombol reset (pake apa az asal bisa)
  3. Tahan tombol reset trus colokan kabel power ke RB
  4. tunggu beberapa saat
  5. Tralalallalalalalalala, RB anda telah ter-reset dengan selamat sentosa :-D

Wednesday, March 10, 2010

Install Broadcom BCM4310 USB controller driver di Ubuntu

My lenovo C466 (so as on Dell Vostro 1500)laptop has an embedded wireless network card “BCM4310 USB controller“.

To install the driver of this card, we need to use “ndiswrapper” which makes the drivers for windows work in Ubuntu & it’s GUI “ndisgtk” to facilitate the installation.

Here are the steps to install the driver for BCM4310 USB Controller Wireless Network Card in Ubuntu (have been tested in both 7.10 & 8.04)

1. Install “ndiswrapper” & “ndisgtk”
You can install the packages from command line with below command:
sudo apt-get install ndiswrapper-common ndiswrapper-utils ndisgtk
or you can install them from “Synaptic Package Manager”

2. Download the driver
Download the driver from Dell’s site: http://ftp.us.dell.com/network/R174291.exe

3. Unzip the file
Unzip the file to your desktop, there should be a “DRIVER_US” folder which contains the “bcmwl5.inf” file, we need this file later

4. Run “ndisgtk”
command:
sudo ndisgtk
or you can launch it from “System -> Administration -> Windows Wireless Drivers”

5. Install the driver
Click “Install New Driver”, and select the “bcmw5.inf” mentioned above, and then click “Install”

How to install Broadcom BCM4310 USB controller Wireless Network  Card in Ubuntu

After the above 5 steps, the wireless card indicating lamp should be on now, if you still cannot connect to the network, you should make some configuration.

1. Open the Networking Admin tool (System | Administration | Networking), select the Wireless connection and click Properties, ensure the Enable roaming mode checkbox is ticked.
2. Click the Network Manager icon (computers icon in the top right corner of system tray), your network ESSID should be shown in the drop-down list. Select your network by clicking on it.
3. If the Network requires any further configuration (e.g. WEP key), a dialog should appear, select the correct settings and paste in your key.