Skip to content

Goorkey's Blog

Note the life of a Son of Karo highland

Bandwidth yang gak di batasin akan menyebabkan terjadinya pembagian bandwidth yang gak merata ke setiap client.
Agar setiap client mendapatkan bagian nya masing2 n gak tarik2 an ma yang lain kita bisa implementasi manajemen bandwidth. klo udah kek gini, dari sisi client nya mo di apa2 in juga ttp aja g akan bisa curi2 bandwidth client sebelah nya  8)

/ip firewall mangle
add chain=prerouting action=mark-connection new-connection-mark=iix-con \
    passthrough=yes in-interface=Lan dst-address-list=nice comment=”marking iix” \
    disabled=no
add chain=prerouting action=mark-packet new-packet-mark=iix \
    passthrough=no connection-mark=iix-con comment=”” disabled=no
add chain=prerouting action=mark-packet new-packet-mark=inter \
    passthrough=no comment=”marking internasional” disabled=no
/queue simple
add name=”INTERNASIONAL” target-addresses=10.0.0.0 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”INDONESIA” target-addresses=10.0.0.0 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET01-INTERNASIONAL” target-addresses=10.0.0.1 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET01-INDONESIA” target-addresses=10.0.0.1 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET02-INTERNASIONAL” target-addresses=10.0.0.2 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET02-INDONESIA” target-addresses=10.0.0.2 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET03-INTERNASIONAL” target-addresses=10.0.0.3 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET03-INDONESIA” target-addresses=10.0.0.3 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET04-INTERNASIONAL” target-addresses=10.0.0.4 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET04-INDONESIA” target-addresses=10.0.0.4 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET05-INTERNASIONAL” target-addresses=10.0.0.5 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET05-INDONESIA” target-addresses=10.0.0.5 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET06-INTERNASIONAL” target-addresses=10.0.0.6 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET06-INDONESIA” target-addresses=10.0.0.6 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET07-INTERNASIONAL” target-addresses=10.0.0.7 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET07-INDONESIA” target-addresses=10.0.0.7 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET08-INTERNASIONAL” target-addresses=10.0.0.8 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET08-INDONESIA” target-addresses=10.0.0.8 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET09-INTERNASIONAL” target-addresses=10.0.0.9 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET09-INDONESIA” target-addresses=10.0.0.9 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”AGINET10-INTERNASIONAL” target-addresses=10.0.0.10 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”AGINET10-INDONESIA” target-addresses=10.0.0.10 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….

add name=”BILLING-INTERNASIONAL” target-addresses=10.0.0.50 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”BILLING-INDONESIA” target-addresses=10.0.0.50 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….
add name=”ADMIN-INTERNASIONAL” target-addresses=10.0.0.100 dst-address=0.0.0.0/0 \
interface=all parent=none packet-marks=inter direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=512000/512000 \
total-queue=default-small disabled=no

add name=”ADMIN-INDONESIA” target-addresses=10.0.0.100 dst-address=0.0.0.0/0 \
interface=Lan parent=none packet-marks=iix direction=both priority=1 \
queue=default-small/default-small limit-at=0/0 max-limit=0/0 \
total-queue=default-small disabled=no
………………………………………………………………….
Quote
Asumsi:
Up-Stream & Down-Stream = 2Mbps
jumlah client 10
2Mbps / 10 client = 200Kbps

/ queue simple add name=AGi-Net-01 target-address=10.0.0.1 max-limit=200000/200000
/ queue simple add name=AGi-Net-02 target-address=10.0.0.2 max-limit=200000/200000
/ queue simple add name=AGi-Net-03 target-address=10.0.0.3 max-limit=200000/200000
/ queue simple add name=AGi-Net-04 target-address=10.0.0.4 max-limit=200000/200000
/ queue simple add name=AGi-Net-05 target-address=10.0.0.5 max-limit=200000/200000
/ queue simple add name=AGi-Net-06 target-address=10.0.0.6 max-limit=200000/200000
/ queue simple add name=AGi-Net-07 target-address=10.0.0.7 max-limit=200000/200000
/ queue simple add name=AGi-Net-08 target-address=10.0.0.8 max-limit=200000/200000
/ queue simple add name=AGi-Net-09 target-address=10.0.0.9 max-limit=200000/200000
/ queue simple add name=AGi-Net-10 target-address=10.0.0.10 max-limit=200000/200000

cara2:
Quote
:for i from=1 to=20 do = {
/queue simple add name=(“AGi-Net-” . $i) target-address=(“10.0.0.” . $i) max-limit=200000/200000
}

simpen scrip nya di system->Script trus tinggal di run
=====================================================================================================

/ ip firewall mangle
add chain=prerouting action=mark-packet new-packet-mark=proxy-hit
passthrough=no tos=48 comment=”SQUID” disabled=no
/ queue simple
add name=”PROXY” dst-address=0.0.0.0/0 interface=all parent=none packet-marks=proxy-hit
direction=both priority=1 queue=default-small/default-small limit-at=0/0 max-limit=0/0
total-queue=default-small disabled=no

=====================================================================================================

/ip firewall mangle

add chain=prerouting action=mark-connection \
    new-connection-mark=trace-con passthrough=yes \
    src-address=192.168.1.0/24 dst-port=33434-33534 \
    protocol=udp comment=”” disabled=no

add chain=prerouting action=mark-packet \
    new-packet-mark=tracert passthrough=no \
    connection-mark=trace-con comment=”” \
    disabled=no

/ queue simple
add name=”traceroute” dst-address=0.0.0.0/0 \
    interface=all parent=none \
    packet-marks=tracert direction=both priority=1 \
    queue=default-small/default-small \
    limit-at=0/0 max-limit=0/0 \
    total-queue=default-small disabled=no

=====================================================================================================
/ip firewall mangle

add action=change-ttl dst-address=192.168.1.0/24 \
chain=forward new-ttl=set:1
=====================================================================================================

About these ads

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: