Senin, 28 Maret 2016

OpenVPN Server

Panduan Ringkas

sumber : https://translate.google.com/translate?hl=id&sl=en&u=https://openvpn.net/index.php/access-server/docs/quick-start-guide.html&prev=search 
OpenVPN Access Server Panduan Ringkas
Klik DI SINI untuk OpenVPN Access Server 2.0.24 Catatan Rilis

Panduan ini akan membantu Anda memahami dasar-dasar untuk menyiapkan dan menyebarkan Server OpenVPN Access
OpenVPN Access Server terdiri dari tiga komponen utama:

• Server OpenVPN
• Admin Web Interface / UI Admin
• Connect Client
OpenVPN Server:
Server VPN merupakan komponen yang mendasari di OpenVPN Access Server yang melakukan semua pekerjaan latar belakang; routing, tunneling, enkripsi, manajemen pengguna, otentikasi dll OpenVPN Access Server hadir dengan GUI Web yang membantu untuk mengelola komponen yang mendasari server VPN.
Admin Web Interface:
Admin Web Interface membuat antarmuka manajemen lebih mudah dalam OpenVPN Access Server. Dalam Admin Web Interface administrator dapat mengelola pilihan seperti layer 2 atau layer 3 routing, akses user, pengaturan server jaringan, otentikasi dan sertifikat web server. Secara default administrator dapat mengakses Interface Admin Web dengan mengunjungi alamat ini di browser web: https: // openvpnasserverip: 943 / admin (Harap mengganti "openvpnasip" dengan IP atau hostname Anda dialokasikan untuk Anda openvpn-sebagai contoh)
Hubungkan Klien:
The Connect Klien Antarmuka adalah komponen dari OpenVPN Access Server yang memungkinkan pengguna untuk terhubung ke VPN langsung melalui web browser mereka. The Connect Klien juga memberikan pilihan pengguna untuk men-download file-file konfigurasi mereka yang dapat userd pada klien lain OpenVPN.

- OpenVPN Connect Client
- Client OpenVPN Connect untuk Mac
- OpenVPN Komunitas Client (Untuk Linux / Windows)

 
Konfigurasi awal:
Dalam rangka untuk menginstal OpenVPN Access Server ada beberapa hal yang perlu memandang;
- Distribusi Linux
- Arsitektur CPU


Catatan: Jika Anda memutuskan untuk menggunakan salah satu dari alat-alat virtual kami silahkan merujuk ke salah satu panduan ini sebagai gantinya:
- VMware Virtual Appliance
- Hyper-V Virtual Appliance



Linux Distribusi:
Anda akan perlu untuk memastikan Anda men-download paket yang sesuai dengan saat ini OS Distro, saat ini kami mendukung ini Distro Linux:
- Ubuntu
- RHEL
- Fedora
- CentOS
- openSUSE
- Debian
Klik di sini untuk men-download OpenVPN Access paket Server

CPU Arsitektur:

Anda akan perlu memastikan Anda menginstal paket yang benar tergantung pada Arsitektur CPU Anda (32bit atau 64bit)

Instalasi Paket OpenVPN-AS:

Untuk Instal paket OpenVPN-AS di Ubuntu atau Debian Anda akan perlu menjalankan perintah ini:
dpkg -i openvpnasdebpack.deb
Untuk menginstal paket OpenVPN-AS di CentOS, RHEL, atau Fedora Anda akan perlu menjalankan perintah ini:
rpm -i openvpnasrpmpack.rpm
Akun Admin untuk OpenVPN-AS perlu setup melalui terminal dengan melakukan hal berikut:

Ubah password:

openvpn passwd

Anda kemudian akan diminta untuk menetapkan password untuk pengguna openvpn, setelah pengaturan password Anda dapat login ke UI Admin dengan pengguna openvpn dan password Anda mengatur.
Catatan: Dalam beberapa keadaan untuk konfigurasi tertentu Anda mungkin perlu untuk menjalankan lengkap skrip ovpn-init terminal: / usr / local / openvpn_as / bin / ovpn-init
Konfigurasi Interface Web Admin:
Setelah Anda menyelesaikan Alat Konfigurasi Awal Anda kemudian harus dapat mengakses Admin Web Interface melalui web browser pilihan Anda. Anda harus telah melihat sebuah link ke Admin Web Interface setelah Anda menyelesaikan Alat Konfigurasi Awal, jika Anda melewatkannya Anda dapat mengakses Interface Admin Web dengan mengetik perintah berikut di address bar browser Anda: https: // openvpnasip: 943 / admin ( silahkan ganti "openvpnasip" dengan IP Anda dialokasikan untuk Anda openvpn-sebagai contoh)

Anda sekarang dapat melanjutkan dan login dengan mandat admin openvpn Anda. Setelah login Anda akan melihat layar berikut:

admin-ui-logon

Konfigurasi Pengaturan Server Jaringan:
Jika Anda ingin OpenVPN Access Server untuk dapat dicapai dari internet Anda akan perlu mengatur Hostname atau IP address ke hostname atau IP yang menghadap internet publik. Silakan lihat gambar di bawah:
admin-ui-networkserver


Pengaturan VPN:
Halaman Pengaturan VPN memungkinkan Anda untuk mengkonfigurasi opsi seperti Dynamic IP Address Jaringan yang sistem DHCP internal yang OpenVPN Access Server. Secara default subnet diatur ke "172.27.224.0/20" ini dapat diubah ke subnet yang mungkin bekerja lebih baik untuk jaringan Anda saat ini.
Bagian routing yang memberikan pilihan untuk mendorong rute tertentu untuk jaringan OpenVPN Access Server duduk ke klien jarak jauh.
Ada juga pilihan yang memungkinkan klien lalu lintas internet kemampuan untuk diteruskan melalui OpenVPN Access Server.
Izin pengguna:
Halaman Izin Pengguna memungkinkan pengaturan per klien harus diubah. Profil auto-masuk dapat diaktifkan jika diinginkan. Ketika Anda klik "show" di samping nama pengguna yang Anda akan melihat lebih banyak pilihan yang dapat dikonfigurasi, ini adalah area di mana Anda akan menentukan pengaturan untuk klien gerbang:

admin-ui-user-izin
  Hubungkan Klien:
The Connect Client dapat diakses melalui web browser pilihan dengan memasukkan alamat berikut ke address bar:
https: // openvpnasip: 943 (Harap mengganti "openvpnasip" dengan IP Anda dialokasikan untuk Anda openvpn-sebagai contoh)
 

Pengguna memiliki pilihan untuk Connect ke VPN atau Login ke Connect Client. Saat menghubungkan pengguna akan terhubung ke VPN langsung melalui web browser mereka. Ketika pengguna memutuskan untuk login ke Connect Klien mereka dapat downoad file konfigurasi pengguna mereka (client.ovpn) dan menggunakannya untuk terhubung ke VPN dengan Klien lainnya OpenVPN.

client-ui

Routing Management

Route Explorer

IP Route Management, manajemen kinerja jaringan, analisis kinerja jaringan IP berubah terus-menerus, secara otomatis kembali routing lalu lintas berdasarkan kondisi beban jaringan dan bila terjadi masalah. Sementara alat konvensional polling infrastruktur untuk status kesehatan dan pemanfaatan metrik, mereka tidak dapat memberikan wawasan dinamika routing. Tanpa kemampuan untuk memvisualisasikan, memantau, menganalisis dan perubahan model pada Layer 3 pengoperasian jaringan, menunjukkan dengan tepat dan mengoreksi masalah pelayanan, membangun di ketahanan jaringan, dan mengoptimalkan kinerja ad hoc, manual-intensif dan rawan kesalahan.
Route Explorer ™, industri terkemuka IP analisis rute perangkat lunak manajemen, dirancang untuk insinyur jaringan, arsitek, perencana dan operator bertanggung jawab untuk hari ini kompleks, perusahaan dan penyedia layanan jaringan mission-critical. Ini menyediakan visibilitas manajemen dalam perilaku routing semua protokol IGP dan BGP, multicast, MPLS VPN dan terowongan rekayasa lalu lintas dengan real-time monitoring, pelaporan historis dan kemampuan modeling.
IP Route Management, manajemen kinerja jaringan, analisis rute Secara pasif memonitor protokol routing yang mengarahkan arus lalu lintas di seluruh jaringan, Route Explorer membangun pandangan router 'dari jaringan, komputasi dan menampilkan perubahan topologi dan rute secara real time. Ini menyediakan visibilitas ke dalam operasi routing dinamis di seluruh jaringan, memungkinkan identifikasi cepat dan penyelesaian masalah yang sulit mendiagnosa, perawatan yang efektif dan bebas masalah, dan kemampuan untuk dengan mudah dan akurat merencanakan perubahan jaringan dan optimasi.
kemampuan
  • Pemantauan Real-Time & Analysis

  • Aplikasi & Service Jalur Pemantauan

  • 'Jaringan DVR'

  • Komprehensif Laporan & Alat Diagnostik

  • Jaringan Perubahan Modeling

  • Real-Time Routing Alerts

manfaat:
  • Mengurangi MTTR dan meningkatkan produktivitas staf dengan mempercepat identifikasi masalah yang kompleks
  • Mencegah kesalahan perawatan mahal dengan mensimulasikan perubahan jaringan sebelum pelaksanaan
  • Pastikan layanan pengiriman optimal dengan secara proaktif audit jaringan-lebar metrik routing yang
  • Menghindari pemadaman layanan mahal dengan peringatan tentang perubahan redundansi jaringan kritis
  • Mengoptimalkan sumber daya jaringan dan melakukan investasi infrastruktur yang lebih
  • Memberikan cepat waktu-ke-nilai dengan overhead manajemen rendah melalui jejak penyebaran kecil, beban kinerja minimal dan terus menerus auto-discovery                                 sumber : https://translate.google.com/translate?hl=id&sl=en&u=http://www.packetdesign.com/products/route-explorer&prev=search

Dynamic Routing RIP

routing dinamis dengan RIP

Meskipun RIP routing dapat mengambil siklus CPU yang berharga, mungkin dalam beberapa hal menjadi satu-satunya pilihan Anda. RIP merupakan protokol sederhana untuk mengkonfigurasi, dan Todd Lammle di sini untuk menjelaskan rincian berdarah.

Routing Information Protocol (RIP) adalah pertama dinamis routing protokol yang akan digunakan dalam sebuah internetwork, sehingga diciptakan dan digunakan terutama dengan UNIX host untuk tujuan berbagi informasi routing.

Dalam Harian terakhir saya Drill Down, "Konfigurasi statis dan routing default," aku menutupi kedua default dan routing statis, jadi sekarang kita akan melompat ke RIP routing dinamis menggunakan router Cisco.

Rumor
Seperti kebanyakan inception awal, RIP tentu saja memiliki keterbatasan! Sebuah masalah besar adalah bahwa itu adalah routing protokol distance vector, yang berarti bahwa ia akan mengirimkan tabel routing yang lengkap semua interface yang aktif secara default pada interval waktu periodik. Hal ini dikenal sebagai routing yang oleh rumor karena router yang menerima siaran mereka hanya percaya informasi, meskipun tidak memiliki cara untuk memverifikasi informasi itu sebagai benar (bahwa rute benar-benar ada).

Mengapa menggunakan RIP?
Jadi, mengapa kita menggunakan RIP sama sekali? Yah, kita mungkin tidak seharusnya. Tapi sayangnya, ada beberapa router yang tidak menjalankan apa-apa tapi RIP (atau OSPF), jadi kita tidak selalu pergi dengan pilihan. Mungkin bersembunyi di suatu tempat di jaringan Anda adalah router warisan lama, katakanlah, router UNIX. Itulah yang terjadi, Anda mungkin hanya akan terjebak mendukung RIP pada jaringan sehingga kuda tua ini dapat berpartisipasi dalam routing update.

Karena menghabiskan anggaran TI tidak selalu terbatas, Bor Harian ini Down akan menunjukkan cara untuk mengganti routing statis dan menambahkan routing dinamis menggunakan protokol RIP. Kabar baiknya adalah bahwa menambahkan RIP routing pada router Cisco adalah sangat mudah, untuk sedikitnya. Kabar buruknya adalah bahwa apa yang terjadi di latar belakang masalahnya! RIP mengirimkan update berkala setiap 30 detik secara default. kebiasaan buruk ini dapat menyebabkan masalah pada link serial sudah terlalu stres. Tapi jangan khawatir-masa Bor Harian Downs akan mencakup beberapa solusi dan strategi untuk berhadapan dengan Gremlins bandwidth dan kejahatan yang disebabkan oleh RIP routing.

Menghapus rute statis yang ada
Untuk menunjukkan cara mengkonfigurasi RIP, aku akan menggunakan angka yang sama saya gunakan di Harian terakhir saya Drill Down, "Konfigurasi statis dan routing default" (lihat Gambar A). Saya tidak melakukan hal itu karena aku malas-it'll sangat membantu Anda memahami jika kita membangun model kami yang ada! Plus, sebelum kita mulai, saya akan menunjukkan cara untuk menghapus rute statis yang ada dan mengganti semua itu dengan protokol routing RIP dinamis.

Gambar A
Setiap router harus memiliki semua tiga jaringan dalam tabel routing untuk mengirim paket melalui internetwork.


Pada titik ini, tabel routing terlihat seperti ini .

The 2500A router harus tahu bagaimana untuk sampai ke 192.168.10.96 jaringan, sehingga rute statis digunakan memberitahu router untuk meneruskan semua paket ke 192.168.10.66, yang merupakan hop berikutnya.

Selanjutnya, mari kita lihat router 2500B.

The 2500B router memiliki rute statis yang menjelaskan bagaimana untuk sampai ke subnet 32 ​​dan default route ke Internet.

Melepaskan rute statis
Pertama, sebelum kita dapat menambahkan RIP routing, kita harus menghapus rute statis, karena jarak administratif rute statis adalah salah satu (1) secara default. RIP menggunakan administrative distance 120 secara default. Jika kita menambahkan RIP tanpa terlebih dahulu menghapus rute statis, maka RIP rute akan pernah diperbarui dan ditempatkan pada tabel routing.

Dari router 2500A, kita perlu untuk menghapus rute ke subnet 96. Berikut adalah cara yang akan terlihat.

Tabel routing sekarang hanya menunjukkan rute yang terhubung langsung .

Dari router 2500B, kami akan menghapus rute statis untuk subnet 32, tapi meninggalkan rute default ke Internet.

Perhatikan bahwa tabel routing sekarang menunjukkan hanya dua terhubung langsung dan router default ke Internet.

Konfigurasi RIP Routing
Sekarang bahwa rute statis telah dihapus, kita dapat menambahkan protokol RIP routing untuk setiap router dan memungkinkan routing dinamis untuk menemukan setiap jaringan dan menempatkan ini ke dalam tabel routing dari kedua router.

Dari router 2500A, perintah router rip digunakan untuk mengaktifkan RIP routing.

Perintah router rip menyala RIP routing dan tempat Anda pada prompt config-router. Perintah jaringan harus digunakan untuk memberitahu RIP jaringan yang ingin diiklankan dengan RIP. Perhatikan bahwa ini adalah alamat jaringan classful dan alamat subnet tidak digunakan. Router sekarang akan menemukan semua subnet dan mengiklankan masing-masing seluruh internetwork. RIP adalah protokol routing classful, yang berarti bahwa setiap perangkat pada jaringan harus menggunakan subnet mask yang sama.

Mari kita tambahkan RIP untuk router 2500B.

Sekarang kedua router telah dikonfigurasi dengan protokol routing RIP, mari kita lihat pada tabel routing.

The R mewakili rute RIP-ditemukan. Bagian yang paling menarik dari output ini adalah R *, yang menunjukkan rute default. Kami memiliki rute default dikonfigurasi pada router 2500B, yang sekarang sedang diiklankan oleh RIP sebagai rute-sempurna default jaringan karena itulah koneksi internet kita!

Berikut tabel routing pada router 2500B.

output ini memberitahu kita bahwa 32 subnet ditemukan dan sedang diiklankan oleh serial 0 interface dari router 2500A. Rute default telah baik ditemukan dan diiklankan oleh RIP untuk router 2500A.

Memverifikasi RIP routing yang
Perintah show ip rute mungkin perintah terbaik untuk digunakan saat memverifikasi konfigurasi router Anda routing protokol, tetapi ada beberapa lagi perintah yang cukup membantu, juga.

menunjukkan protokol ip
Protokol show ip perintah memberikan informasi routing protokol, termasuk timer dan tetangga ditemukan. > Berikut adalah contoh dari router 2500A.

Semua protokol routing dikonfigurasi di router akan ditampilkan dengan perintah ini, tetapi hanya RIP dikonfigurasi, jadi kami hanya melihat informasi RIP. Perintah ini memberikan waktu update, tahan dan timer flush, serta alamat IP tetangga dan jarak administratif.

Tampilkan protokol
Meskipun protokol acara perintah ini tidak menampilkan informasi routing protokol, itu tidak memberikan daftar semua antarmuka dikonfigurasi dan alamat logis yang dikonfigurasi pada setiap antarmuka. Ini benar-benar informasi yang sangat berharga.
2500A # show protokol
Nilai-nilai global:
Internet Protocol routing diaktifkan
Ethernet0 sudah habis, protokol garis up
Alamat internet 192.168.10.33/27
Serial0 sudah habis, protokol garis up
Alamat internet 192.168.10.65/27
Serial1 secara administratif bawah, protokol garis bawah
2500A #

Debug ip rip
Perintah men-debug ip rip adalah cara yang bagus untuk melihat update RIP yang dikirim dan diterima pada router. Untuk mematikan debugging, > gunakan tidak men-debug ip perintah rip atau undebug semua perintah.

> Mari kita sepotong terpisah ini dengan sepotong , karena ini adalah informasi penting.

Perhatikan bahwa router 2500A adalah mengirimkan Ethernet0 pembaruan menceritakan tentang jalan ke subnet 64 dan 96. Metrik adalah hop untuk setiap jaringan. Karena router 2500A terhubung ke 64 jaringan, itu iklan yang rute dalam satu hop. Namun, 96 subnet adalah salah satu hop jauhnya, sehingga akan mengiklankan rute bahwa sebagai hop 2. Rute default juga sedang diiklankan sebagai dua hop jauhnya.

> Mari kita lihat output berikutnya.

Perhatikan bahwa jaringan 32 hanya yang diiklankan keluar seri 0. Mengapa? Karena router 2500B sudah tahu tentang jaringan 64 dan 96. Ini disebut aturan split-horizon, dan itu digunakan untuk menghentikan informasi yang salah dari yang diiklankan seluruh internetwork. Jika jaringan 64 dan 96 yang diiklankan keluar serial 0 dari router 2500A, maka router 2500B mungkin mempertimbangkan router 2500A untuk sampai ke 96 subnet. Itu akan menjadi buruk karena itu tidak benar; itu bagaimana loop jaringan dapat terjadi.

Oke, sekarang > mari kita lihat apa yang kita terima.

The 2500B router diiklankan dua router ke router 2500A. Satu menjelaskan bagaimana untuk sampai ke 96 subnet, dan yang lainnya mengiklankan rute default.

Menekan update RIP
Tapi tunggu. Ingat antarmuka Ethernet0 dari 2500A jaringan periklanan RIP? RIP diiklankan semua rute antarmuka yang aktif setiap 30 detik secara default. Jadi bagaimana jika kita tidak ingin RIP diiklankan keluar Ethernet0, atau bahkan lebih buruk, serial 1 antarmuka router 2500B yang terhubung ke Internet? Dapatkah Anda mengatakan "masalah keamanan"? Apakah Anda benar-benar ingin mengiklankan jaringan Anda ke Internet? Kami akan memecahkan masalah kecil dengan perintah pasif-interface.

> Berikut adalah contoh menghentikan RIP dari yang dikirim keluar interface Ethernet0 dari router 2500A dan interface serial 1 dan Ethernet0 dari router 2500B.

Sekarang, mari kita lihat > debug ip perintah rip dari router 2500B.

The 2500B router kini mengirim informasi routing keluar serial 0 saja. Oke, mari kita periksa > router 2500A dengan perintah men-debug ip rip.

Keren! The 2500A router sekarang iklan tabel routing hanya keluar serial 0 dan tidak keluar Ethernet0.

Kesimpulan
sampah satu orang adalah harta-RIP routing yang orang lain sebenarnya adalah baik, cepat protokol routing dalam jaringan yang lebih kecil, tetapi jika Anda mengkonfigurasi jaringan yang lebih besar, Anda bisa berada di untuk beberapa masalah serius karena RIP memiliki kecenderungan untuk mengkonsumsi proses bandwidth dan CPU!

HTB Bandwidth Share

Pengaturan Bandwidth Menggunakan Metode HTB (Hierachical Token Bucket)

Kali ini saya akan share sedikit tentang pembagian bandwidth pada OS linux menggunakan Metode HTB (Hierachical Token Bucket). Sebelumnya sudah dibahas juga dalam blog ini tentang pembagian bandwidth menggunakan CBQ.

Download BAB I disini

INSTALASI HTB (Hierachical Token Bucket)
Ada banyak cara untuk membuat shapper htb, anda bisa membuat secara manual dengan command tc
atau anda bisa mengunakan htb.init. Kebetulan saya menggunakan htb.init :)


3.1 Persiapan untuk config htb.init

Download htb.init
[root@probiotik iptables-1.2.9]#wget http://keihanna.dl.sourceforge.net/sourceforge/htbinit/htb.init-v0.8.4
[root@probiotik iptables-1.2.9]#mv htb.init-v0.8.4 /sbin/
[root@probiotik iptables-1.2.9]#chmod 755 htb.init-v0.8.4

3.2 Membuat config pada /etc/sysconfig

[root@probiotik iptables-1.2.9]#mkdir /etc/sysconfig/htb
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10.root
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:20.hanny
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:30.dedy
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:40.amek
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10.root
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:20.hanny
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:30.dedy
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:40.amek

Isi dari masing-masing config htb adalah sebagai berikut:
eth0
eth0-10.root
eth0-10:20.hanny
eth0-10:30.dedy
eth0-10:40.amek
R2Q=1
RATE=64Kbit
QUANTUM=1500
RATE=32Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=192.168.1.2/32,
RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=192.168.1.3/32,
RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=192.168.1.4/32,

eth1
eth1-10.root
eth1-10:20.hanny
eth1-10:30.dedy
eth1-10:40.amek
R2Q=1
RATE=128Kbit
QUANTUM=1500
RATE=64Kbit
QUANTUM=1500
CEIL=128Kbit
LEAF=sfq
RULE=192.168.1.2/32
RATE=32Kbit
QUANTUM=1500
CEIL=128Kbit
LEAF=sfq
RULE=192.168.1.3/32
RATE=32Kbit
QUANTUM=1500
CEIL=128Kbit
LEAF=sfq
RULE=192.168.1.4/32
Bila masih bertanya tanya apa yang dimaksud dgn RATE,QUANTUM,CEIL,LEAF,RULE,dll
anda dapat membaca pada file htb.init
[root@probiotik iptables-1.2.9]#vi /sbin/htb.init-v0.8.4
atau lihat http://www.docum.org/stef.coene/qos/faq/cache/29.html

3.3 Jalankan htb.init

Karena command tc (Trafic Control) terdapat kekurangan, maka anda dapat mengambil patch http://www.rsds.or.id/linux/source/tc

[root@probiotik iptables-1.2.9]#wget http://www.rsds.or.id/linux/source/tc
[root@probiotik iptables-1.2.9]#cp tc /sbin/
[root@probiotik iptables-1.2.9]#cp tc /bin/
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4
Usage: htb.init-v0.8.4 {start|compile|stop|restart|timecheck|list|stats}

[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 compile

[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 start

Lihat pesan pada log

[root@probiotik iptables-1.2.9]#tail -f /var/log/messages
Nov11 00:58:40 probiotik kernel: HTB init, kernel part version 3.12

3.4 Cek pada list module linux anda

[root@probiotik iptables-1.2.9]#lsmod
cls_route 4176 0 (unused)
cls_u32 4752 6
cls_fw 2496 0 (unused)
sch_sfq 3760 6 (unused)
sch_htb 18768 2

Bila anda sudah bosan dengan htb :)

[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 stop

3.5 Agar bisa autorun saat restart, tambahkan script pada rc.local

[root@probiotik iptables-1.2.9]#echo /sbin/htb.init-v0.8.4 start > /etc/rc.local

Bandwidth Management Queue Tree

Full Bandwidth Management Parent Queue Tree


Full Bandwidth Management Parent Queue Tree
This is the combination, continued and completion of bandwidth management methods previously using parent queue tree about to handle all sorts of purposes in an internet network that is more complex. Perhaps if you do not want to think too hard, you simply apply the simple queue to limit bandwidth that so powerful and assertive to limit bandwidth per client on your internet network. The problem is if we share the bandwidth with a simple queue is stiffness, and it's hard for me to divide into many clients normally. It would be appropriate to be applied to the kind of dedicated internet connection.

For example If I have a totally the bandwidth internet connection is up to 2M, after i have tested by speed test, the bandwidth average is 512 kbps. It means that if I have 6 clients, be 512/6 = 86 kbps/clients normally, the ideal number is very small inappropriate for our client. If the bandwidth of up to 2 M calculated with 2000/6 to be around 334 kbps /clients, it can makes browsing and online game stuck if just only one client there who download and play streaming video, because the client spend almost all the average speed (512kbps) other clients will be especially problematic just for browsing or online game. In this case we need the priority to the fourth packets.

Full Bandwidth Management with the parent queue tree complete the lack of packets connection per client, especially to handle the internet network with many clients. The principle is equally divide the bandwidth to all the clients with bandwidth greater than that should be given as the limit bandwidth on each clients, in which we set Online Games, Browsing, Download, Video Streaming packets, connection packets. Well, for now I will make the Full Bandwidth Management using the parent queue tree. For more easily to make the complex rule, I will work with the scripts for more quickly.

Condition Starting:
Total Bandwidth : Up to 2 M

I have 8 Clients
Billing    : 192.168.1.11
Client1    : 192.168.1.17
Client2    : 192.168.1.16
Client3    : 192.168.1.15
Client4    : 192.168.1.14
Client5    : 192.168.1.20
Client6    : 192.168.1.21
Master     : 192.168.1.8

In-Interface   : ether1
Out-Interface  : wlan1

Address List
/ip firewall address-list
add address=192.168.1.0/24  disabled=no list=MikroTik comment=""

1. Separating & Marking Connection Packets "Out & In" Globally

Marking all the connection packet out & in of the traffic mikrotik router, it is relatively depending on the interface that used. Connection packets out from local interface is connection packet In from public interface, it is download connection packet. And Out from local interface is In from public interface, It is upload connection packet. This is implemented on the script below!
?
1
2
3
4
5
6
7
8
/ip firewall mangle
add action=mark-connection chain=prerouting disabled=no in-interface=ether1 new-connection-mark=All-Inconn passthrough=yes comment="UPSTEAM CONNECTION"
add action=mark-packet chain=prerouting connection-mark=all-inconn disabled=no new-packet-mark=All-inpkt passthrough=yes comment="UPSTEAM"
add action=mark-connection chain=forward disabled=no in-interface=wlan1 new-connection-mark=All-Outconn passthrough=yes comment="DOWNSTEAM CONNECTION"
add action=mark-packet chain=forward connection-mark=all-outconn disabled=no new-packet-mark=All-Outpkt passthrough=yes comment="DOWNSTEAM"
  
/queue tree
add name=All-Bandwidth parent=global-out packet-mark=All-Outpkt queue=default priority=8 max-limit=2M

We will focus on All-Outconn as you can see as the above scripts, the connection packets using chain=forward and out-interface=wlan1. From this marking we get All-Outpkt that we can separate again to the various kind of connection packets that we need.

2. Separating Download Connection Packets per Client IP 

The general download packet All-Outpkt, we are going to separate it into connection packets per client IP address, to capture the connection download that used by the clients. It is implemented on the following scripts :
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/ip firewall mangle
add action=mark-packet chain=forward dst-address=192.168.1.11 packet-mark=All-Outpkt new-packet-mark=Billing-pkt passthrough=yes comment="BILLING DOWNSTREAM"
add action=mark-packet chain=forward dst-address=192.168.1.17 packet-mark=All-Outpkt new-packet-mark=Client1-pkt passthrough=yes comment="CLIENT1 DOWNSTREAM"
add action=mark-packet chain=forward dst-address=192.168.1.16 packet-mark=All-Outpkt new-packet-mark=Client2-pkt passthrough=yes comment="CLIENT2 DOWNSTREAM"
add action=mark-packet chain=forward dst-address=192.168.1.15 packet-mark=All-Outpkt new-packet-mark=Client3-pkt passthrough=yes comment="CLIENT3 DOWNSTREAM"
add action=mark-packet chain=forward dst-address=192.168.1.14 packet-mark=All-Outpkt new-packet-mark=Client4-pkt passthrough=yes comment="CLIENT4 DOWNSTREAM"
add action=mark-packet chain=forward dst-address=192.168.1.20 packet-mark=All-Outpkt new-packet-mark=Client5-pkt passthrough=yes comment="CLIENT5 DOWNSTREAM"
add action=mark-packet chain=forward dst-address=192.168.1.21 packet-mark=All-Outpkt new-packet-mark=Client6-pkt passthrough=yes comment="CLIENT6 DOWNSTREAM"
add action=mark-packet chain=forward dst-address=192.168.1.8 packet-mark=All-Outpkt new-packet-mark=Master-pkt passthrough=yes comment="MASTER DOWNSTREAM"
 
  
/queue tree
add name=Billing parent=All-Bandwidth packet-mark=Billing-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name=Client1 parent=All-Bandwidth packet-mark=Client1-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name=Client2 parent=All-Bandwidth packet-mark=Client2-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name=Client3 parent=All-Bandwidth packet-mark=Client3-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name=Client4 parent=All-Bandwidth packet-mark=Client4-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name=Client5 parent=All-Bandwidth packet-mark=Client5-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name=Client6 parent=All-Bandwidth packet-mark=Client6-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name=Master parent=All-Bandwidth packet-mark=Master-pkt queue=default priority=8 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s

The mangle scripts above included with the queue tree rules. From here we have just made the download connections packets per clients, such as
  • Connection Packets Per Client : Billing-pkt, Client1-pkt, Client1-pkt, Client2-pkt, Client3-pkt, Client4-pkt, Client5-pkt, Client6-pkt, Master-pkt

3. Separating Download Packets Clients to Various Kind Connection Packets

The Connections packets per client that we have just made will divided into four kind connection packets such as browsing, online games, download, video streaming. We are going to make 4 kind of the connection packets. If you want to make the kind of connection packets else, you can define using layer 7 protocols.

Part I : Creating the connection packets per client of download and setup the priority in queue tree rules as you wish, you can see the scripts below!
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/ip firewall layer7-protocol
add comment="" name=download regexp="^.*get.+\\.(exe|rar|iso|zip|7zip|flv|mkv|avi|mp4|3gp|rmvb|mp3|img|dat|mov).*\$"
  
/ip firewall mangle
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=billing-dpkt passthrough=no packet-mark=Billing-pkt comment=Billing-Down
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=client1-dpkt passthrough=no packet-mark=Client1-pkt comment=Client1-Down
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=client2-dpkt passthrough=no packet-mark=Client2-pkt comment=Client2-Down
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=client3-dpkt passthrough=no packet-mark=Client3-pkt comment=Client3-Down
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=client4-dpkt passthrough=no packet-mark=Client4-pkt comment=Client4-Down
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=client5-dpkt passthrough=no packet-mark=Client5-pkt comment=Client5-Down
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=client6-dpkt passthrough=no packet-mark=Client6-pkt comment=Client6-Down
add chain=forward layer7-protocol=download action=mark-packet new-packet-mark=master-dpkt passthrough=no packet-mark=Master-pkt comment=Master-Down
 
/ip firewall mangle
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=billing-dpkt packet-mark=Billing-pkt protocol=tcp comment="Billing-Down"
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=client1-dpkt packet-mark=Client1-pkt protocol=tcp comment="Billing-Down"
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=client2-dpkt packet-mark=Client1-pkt protocol=tcp comment="Billing-Down"
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=client3-dpkt packet-mark=Client1-pkt protocol=tcp comment="Billing-Down"
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=client4-dpkt packet-mark=Client1-pkt protocol=tcp comment="Billing-Down"
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=client5-dpkt packet-mark=Client1-pkt protocol=tcp comment="Billing-Down"
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=client6-dpkt packet-mark=Client1-pkt protocol=tcp comment="Billing-Down"
add action=mark-packet chain=forward connection-bytes=1000000-0 src-port=80,443 passthrough=yes new-packet-mark=master-dpkt packet-mark=Master-pkt protocol=tcp comment="Billing-Down"
   
/queue tree
add name=Billing-Down parent=Billing packet-mark=billing-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s
add name=Client1-Down parent=Client1 packet-mark=client1-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s
add name=Client2-Down parent=Client2 packet-mark=client2-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s
add name=Client3-Down parent=Client3 packet-mark=client3-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s
add name=Client4-Down parent=Client4 packet-mark=client4-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s
add name=Client5-Down parent=Client5 packet-mark=client5-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s
add name=Client6-Down parent=Client6 packet-mark=client6-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s
add name=Master-Down parent=Master packet-mark=master-dpkt queue=default priority=6 limit-at=180k max-limit=180k burst-limit=256k burst-threshold=135k burst-time=2s

Here we have used the connections packet per client and to make the download file extension connection packets, so if there are any the extension files that you want to limit, just add the the extension files else to this layer 7 protocols such the above scripts.

Part II. Creating the video streaming connection packet per client and the queue tree rules that you give the priority as you like. Here the scripts that you can paste to the new terminal window, that make more easier.
?
1
2
/ip firewall layer7-protocol
add comment="" name=streaming regexp="^.*get.+\\.(c.youtube.com|cdn.dailymotion.com|metacafe.com|mccont.com).*\$"

If the above script doesn't works, try the second regexp in the layer 7 protocols such the script below!
?
1
2
/ip firewall layer7-protocol
add comment="" name=streaming regexp="videoplayback|video"

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/ip firewall mangle
add comment=Billing-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=billing-spkt passthrough=no packet-mark=Billing-pkt
add comment=Client1-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=client1-spkt passthrough=no packet-mark=Client1-pkt
add comment=Client2-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=client2-spkt passthrough=no packet-mark=Client2-pkt
add comment=Client3-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=client3-spkt passthrough=no packet-mark=Client3-pkt
add comment=Client4-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=client4-spkt passthrough=no packet-mark=Client4-pkt
add comment=Client5-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=client5-spkt passthrough=no packet-mark=Client5-pkt
add comment=Client6-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=client6-spkt passthrough=no packet-mark=Client6-pkt
add comment=Master-Streams chain=forward layer7-protocol=streaming action=mark-packet new-packet-mark=master-spkt passthrough=no packet-mark=Master-pkt
   
/queue tree
add name=Billing-Streams parent=Billing packet-mark=billing-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client1-Streams parent=Client1 packet-mark=client1-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client2-Streams parent=Client2 packet-mark=client2-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client3-Streams parent=Client3 packet-mark=client3-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client4-Streams parent=Client4 packet-mark=client4-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client5-Streams parent=Client5 packet-mark=client5-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client6-Streams parent=Client6 packet-mark=client6-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Master-Streams parent=Master packet-mark=master-spkt queue=default priority=7 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s

I think this is the same method to create the connection packets like the download packets that using layer 7 protocols, that allow you to create more and more the connection packet that you wan along you can understand the regexp language

Part III : Creatingthe Online games connection packets per client together with queue tree rules and the priority of the connection packets, here is the scripts:
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/ip firewall mangle
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=5340-5352,6000-6152,10001-10011,14009-14030,18901-18909 comment="Online Game Portal"
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=39190,27780,29000,22100,10009,4300,15001,15002,7341,7451
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=40000,9300,9400,9700,7342,8005-8010,37466,36567,8822
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=tcp dst-port=47611,16666,20000,5105,29000,18901-18909,9015
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=27005,27015
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=27005-27020,13055,7800-7900,12060-12070
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=8005-8010,9068,1293,1479,9401,9600,30000
add action=mark-packet chain=forward packet-mark=All-Outpkt new-packet-mark=gpkt passthrough=yes protocol=udp dst-port=14009-14030,42051-42052,40000-40050,13000-13080
  
/ip firewall mangle
add action=mark-packet chain=forward new-packet-mark=billing-gpkt passthrough=no src-address=192.168.1.11 packet-mark=gpkt comment=Billing-Game
add action=mark-packet chain=forward new-packet-mark=client1-gpkt passthrough=no src-address=192.168.1.17 packet-mark=gpkt comment=Client1-Game
add action=mark-packet chain=forward new-packet-mark=client2-gpkt passthrough=no src-address=192.168.1.16 packet-mark=gpkt comment=Client2-Game
add action=mark-packet chain=forward new-packet-mark=client3-gpkt passthrough=no src-address=192.168.1.15 packet-mark=gpkt comment=Client3-Game
add action=mark-packet chain=forward new-packet-mark=client4-gpkt passthrough=no src-address=192.168.1.14 packet-mark=gpkt comment=Client4-Game
add action=mark-packet chain=forward new-packet-mark=client5-gpkt passthrough=no src-address=192.168.1.20 packet-mark=gpkt comment=Client5-Game
add action=mark-packet chain=forward new-packet-mark=client6-gpkt passthrough=no src-address=192.168.1.21 packet-mark=gpkt comment=Client6-Game
add action=mark-packet chain=forward new-packet-mark=master-gpkt passthrough=no src-address=192.168.1.8 packet-mark=gpkt comment=Master-Game
 
/queue tree
add name=Billing-Game parent=Billing packet-mark=billing-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client1-Game parent=Client1 packet-mark=client1-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client2-Game parent=Client2 packet-mark=client2-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client3-Game parent=Client3 packet-mark=client3-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client4-Game parent=Client4 packet-mark=client4-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client5-Game parent=Client5 packet-mark=client5-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Client6-Game parent=Client6 packet-mark=client6-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s
add name=Master-Game parent=Master packet-mark=master-gpkt queue=default priority=1 limit-at=220k max-limit=220k burst-limit=256k burst-threshold=165k burst-time=2s

In this case we have create the online-games connection, using the port tcp and udp game that have used by the online games server. Therefore you must the online game ports that usually used. Here I collect the ports to be one before we can separate by IP address of the clients that you have. Then finally we can capture the online games packets in the queue tree rules for the priority and manage the bandwidth for this.

Part IV. Creating the browsing connection packets per client complete with queue tree rules and give you can see on the scripts below :
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/ip firewall mangle
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Billing-pkt new-packet-mark=billing-bpkt protocol=tcp comment="BILLING BROWSING"
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Client1-pkt new-packet-mark=client1-bpkt protocol=tcp comment="CLIENT1 BROWSING"
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Client2-pkt new-packet-mark=client2-bpkt protocol=tcp comment="CLIENT2 BROWSING"
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Client3-pkt new-packet-mark=client3-bpkt protocol=tcp comment="CLIENT3 BROWSING"
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Client4-pkt new-packet-mark=client4-bpkt protocol=tcp comment="CLIENT4 BROWSING"
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Client5-pkt new-packet-mark=client5-bpkt protocol=tcp comment="CLIENT5 BROWSING"
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Client6-pkt new-packet-mark=client6-bpkt protocol=tcp comment="CLIENT6 BROWSING"
add action=mark-packet chain=forward connection-bytes=0-1000000 src-port=80,443 passthrough=no packet-mark=Master-pkt new-packet-mark=master-bpkt protocol=tcp comment="MASTER BROWSING"
  
/queue tree
add name="Billing-Browsing" parent=Billing packet-mark=billing-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name="Client1-Browsing" parent=Client1 packet-mark=client1-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name="Client2-Browsing" parent=Client2 packet-mark=client2-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name="Client3-Browsing" parent=Client3 packet-mark=client3-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name="Client4-Browsing" parent=Client4 packet-mark=client4-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name="Client5-Browsing" parent=Client5 packet-mark=client5-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name="Client6-Browsing" parent=Client6 packet-mark=client6-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s
add name="Master-Browsing" parent=Master packet-mark=master-bpkt queue=default priority=2 limit-at=256k max-limit=256k burst-limit=720k burst-threshold=192k burst-time=2s

We still use the connection packets per client to make the browsing connection packets. Here we use the port 80 and 443 (HTTP and HTTPS), we define small bytes connection-bytes=0-1000000, that using the ports usually used when the client browse any url of the website.


Here we have just implemented "Full Bandwidth Management Parent Queue Tree", then you can customize the scripts with the interface of mikrotik router that you have use, the IP Address of the clients that you have, so that you can manage the queue tree rules as the final result. For more quickly you just need to copy all the scripts to the new terminal window of the winbox. So this is the connection Packets with divided into four main of the connection packets such as download, browsing, video streaming, and online games), the queue tree rules will capture the marking that we have created on the mangle rules and the queue tree will manage that packet mark. The result of the experiment method as shown like the tree pictures above! For more details you can see this article video that I have included!