dengan 2 modem kita pisahkan jalur nya di mikrotik untuk setiap komputer yang kita tentukan dalam 1 network..
Topologi:
Modem
Modem1=192.168.1.1
Modem2=192.168.9.1
Mikrotik
Eth1=192.168.1.2
Eth2=192.168.9.16
Eth3=192.168.3.1
Komputer Client
Client1=192.168.3.2----Di arahkan Ke Modem1
Client2=192.168.3.3----Di arahkan Ke Modem2
Mari kita mulai:
Langkah awal adalah memberi nama setiap interface di mikrotik,dengan perintah di “New Terminal”:
/interface set 0 name=public-modem1
/interface set 1 name=public-modem2
/interface set 2 name=local-client
Selanjutnya memberi ip untuk ethernet di mikrotik,dengan perintah:
/ip address add address=192.168.1.2 \
netmask=255.255.255.0 \
interface=public-modem1
/ip address add address=192.168.9.16 \
netmask=255.255.255.0 \
interface=public-modem2
/ip address add address=192.168.3.1 \
netmask=255.255.255.0 \
interface=local-client
Selanjutnya memasukkan DNS,sesuaikan dengan dns anda masing2,dengan perintah:
/ip dns set servers=203.130.193.74,203.130.206.250 \
allow-remote-requests=yes
kemudian memasukkan ip route modem1,modem2 beserta routing mark nya:
/ip route add gateway=192.168.1.1
/ip route add gateway=192.168.1.1 routing-mark=MODEM1
/ip route add gateway=192.168.9.1
/ip route add gateway=192.168.1.1 routing-mark=MODEM2
/ip firewall nat add chain=srcnat \
out-interface=public-modem1 \
action=masquerade
/ip firewall nat add chain=srcnat \
out-interface=public-modem2 \
action=masquerade
ip firewall address-list \
add address=192.168.3.2 \
list="IP MENGARAH KE MODEM1"
ip firewall address-list \
add address=192.168.3.3 \
list="IP MENGARAH KE MODEM2”
Selanjutnya
kita buat mangle untuk koneksi dari address list yang telah kita buat
beserta mangle routing mark yang akan di tangkap ip route dengan
routing mark tadi,dan mark packet untuk di opor ke queue tree,dengan
perintah:
/ip firewall mangle add chain=prerouting \
action=mark-connection \
new-connection-mark=MODEM1 passthrough=yes \
src-address-list=”IP MENGARAH KE MODEM1” \
in-interface=local-client
/ip firewall mangle add chain=prerouting \
action=mark-routing new-routing-mark=MODEM1 \
passthrough=no in-interface=local-client \
connection-mark=MODEM1
/ip firewall mangle add chain=forward \
action=mark-packet new-packet-mark=”MODEM1 DOWN” \
passthrough=no dst-address=192.168.3.2 \
connection-mark=MODEM1
/ip firewall mangle add chain=forward \
action=mark-packet new-packet-mark=”MODEM1 UP” \
passthrough=no src-address=192.168.3.2 \
connection-mark=MODEM1
/ip firewall mangle add chain=prerouting \
action=mark-connection \
new-connection-mark=MODEM2 passthrough=yes \
src-address-list=”IP MENGARAH KE MODEM2” \
in-interface=local-client
/ip firewall mangle add chain=prerouting \
action=mark-routing new-routing-mark=MODEM2 \
passthrough=no in-interface=local-client \
connection-mark=MODEM2
/ip firewall mangle add chain=forward \
action=mark-packet new-packet-mark=”MODEM2 DOWN” \
passthrough=no dst-address=192.168.3.3 \
connection-mark=MODEM2
/ip firewall mangle add chain=forward \
action=mark-packet new-packet-mark=”MODEM2 UP” \
passthrough=no src-address=192.168.3.3 \
connection-mark=MODEM2
Selanjutnya
kita buat queue type dengan pcq untuk di tandai di queue tree dengn
download dan upload otomatis bagi rata bandwidth nya,perintahnya:
/queue type add name=DOWN \
kind=pcq pcq-classifier=dst-address,dst-port
/queue type add name=UP \
kind=pcq pcq-classifier=src-address,src-port
Selanjutnya kita buat queue tree nya,untuk download dan upload,perintahnya:
/queue tree add name="CLIENT MODEM1 DOWN" \
parent=global-out packet-mark=”MODEM1 DOWN” \
limit-at=0 queue=DOWN priority=1 \
max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="CLIENT MODEM2 DOWN" \
parent=global-out packet-mark=”MODEM2 DOWN” \
limit-at=0 queue=DOWN priority=1 max-limit=0 \
burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="CLIENT MODEM1 UP" \
parent=public-modem1 packet-mark=”MODEM1 UP” \
limit-at=0 queue=UP priority=2 max-limit=0 \
burst-limit=0 burst-threshold=0 burst-time=0s
/queue tree add name="CLIENT MODEM2 UP" \
parent=public-modem2 packet-mark=”MODEM2 UP” \
limit-at=0 queue=UP priority=2 max-limit=0 \
burst-limit=0 burst-threshold=0 burst-time=0s
Selesai dan selamat mencoba.......