Koneksi yg saya gunakan Line 2 Speedy Langsung saja ya kita praktek
Cara Pertama
/ip address
add address=192.168.10.22/24 network=192.168.10.0 broadcast=192.168.10.255 interface=lan comment="" disabled=no
add address=192.168.1.3/24 network=192.168.1.0 broadcast=192.168.255 interface=speedy1 comment="" disabled=no
add address=192.168.2.11/24 network=192.168.2.0 broadcast=192.168.2.255 interface=speedy2 comment="" disabled=no
/ip firewall mangle
add chain=prerouting in-interface=lan connection-state=new nth=1,2,0 action=mark-connection new-connection-mark=satu passthrough=yes comment="" disabled=no
add chain=prerouting in-interface=lan connection-mark=satu action=mark-routing new-routing-mark=satu passthrough=no comment="" disabled=no
add chain=prerouting in-interface=lan connection-state=new nth=1,2,1 action=mark-connection new-connection-mark=dua passthrough=yes comment="" disabled=no
add chain=prerouting in-interface=lan connection-mark=dua action=mark-routing new-routing-mark=dua passthrough=no comment="" disabled=no
/ip firewall nat
add chain=srcnat connection-mark=satu action=src-nat to-addresses=192.168.1.3 to-ports=0-65535 comment="" disabled=no
add chain=srcnat connection-mark=dua action=src-nat to-addresses=192.168.2.11 to-ports=0-65535 comment="" disabled=no
/ ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=255 target-scope=10 routing-mark=satu comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.2.2 scope=255 target-scope=10 routing-mark=dua comment="" disabled=no
add dst-address=0.0.0.0/0 gateway=192.168.2.2 scope=255 target-scope=10 comment="" disabled=no <<-- ini default route nya
Cara Kedua
Load Balancing 2 Speedy Mikrotik RouterOS V.3.x.xx dan V.4.x.xx
Langka pertama
Ip modem 1 192.168.1.1
Ip modem 2 192.168.2.1
colokkan modem 1 pada ether1
colokkan modem 2 pada ether2
colokkan yang dari hub pada ether3
posisi PPoE dari modem
--------------------------------------------------------------------------
Pada mikrotik
buka pada winbox.
muncul baru pertama kali remove all configuration
--------------------------------------------------------------------------
/interface
set 0 name=modem1
set 1 name=modem2
set 2 name=lokal
---------------------------------------------------------------------------------------------------------------------------------------
buat IP di masing2 ethernet
---------------------------------------------------------------------------------------------------------------------------------------
/ip address
add address=192.168.1.2/24 netmask=255.255.255.0 interface=modem1
add address=192.168.2.2/24 netmask=255.255.255.0 interface=modem2
add address=192.168.0.254/24 netmask=255.255.255.0 interface=lokal
---------------------------------------------------------------------------------------------------------------------------------------
buat mangle untuk load balancing
---------------------------------------------------------------------------------------------------------------------------------------
/ip firewall mangle
add chain=prerouting in-interface=lokal connection-state=new nth=2,1 action=mark-connection new-connection-mark=speedy1 passthrough=yes
add chain=prerouting in-interface=Lokal connection-mark=speedy1 action=mark-routing new-routing-mark=speedy1 passthrough=no
add chain=prerouting in-interface=lokal connection-state=new nth=2,2 action=mark-connection new-connection-mark=speedy2 passthrough=yes
add chain=prerouting in-interface=Lokal connection-mark=speedy1 action=mark-routing new-routing-mark=speedy2 passthrough=no
---------------------------------------------------------------------------------------------------------------------------------------
buat NAT untuk load balancing
---------------------------------------------------------------------------------------------------------------------------------------
/ip firewall nat
chain=srcnat out-interface=modem1 action=masquerade
chain=srcnat out-interface=modem2 action=masquerade
---------------------------------------------------------------------------------------------------------------------------------------
buat ip route
---------------------------------------------------------------------------------------------------------------------------------------
/ip route
add gateway=192.168.1.1
add gateway=192.168.2.1 routing-mark=speedy2
---------------------------------------------------------------------------------------------------------------------------------------
Tips and Trik
apabila salah satu speedy down, silahkan semua mangle.
misalnya speedy2 down silahkan disable gateway yang mengarah speedy2
misalnya speedy1 down silahkan disable gateway yang mengarah speedy1 dan hilangkan routing-mark speedy2
Cara Ketiga
/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment=”” \
disabled=no
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=wlan2 \
comment=”” disabled=no
add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=wlan1 \
comment=”” disabled=no
/ ip firewall mangle
add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \
action=mark-connection new-connection-mark=odd passthrough=yes comment=”” \
disabled=no
add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \
new-routing-mark=odd passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=even passthrough=yes comment=”” \
disabled=no
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
new-routing-mark=even passthrough=no comment=”” disabled=no
/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
to-ports=0-65535 comment=”” disabled=no
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
to-ports=0-65535 comment=”” disabled=no
/ ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
comment=”” disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
comment=”” disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment=”” \
disabled=no
Mangle
/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment=”” \
disabled=no
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=wlan2 \
comment=”” disabled=no
add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=wlan1 \
comment=”” disabled=no
router punya 2 upstream (WAN) interfaces dengan ip address 10.111.0.2/24 and 10.112.0.2/24. dan interface LAN dengan nama
interface “Local” dan ip address 192.168.0.1/24.
/ ip firewall mangle
add chain=prerouting in-interface=Local connection-state=new nth=1,1,0 \
action=mark-connection new-connection-mark=odd passthrough=yes comment=”” \
disabled=no
add chain=prerouting in-interface=Local connection-mark=odd action=mark-routing \
new-routing-mark=odd passthrough=no comment=”” disabled=no
add chain=prerouting in-interface=Local connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=even passthrough=yes comment=”” \
disabled=no
add chain=prerouting in-interface=Local connection-mark=even action=mark-routing \
new-routing-mark=even passthrough=no comment=”” disabled=no
NAT
/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
to-ports=0-65535 comment=”” disabled=no
add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
to-ports=0-65535 comment=”” disabled=no
Routing
/ ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
comment=”” disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
comment=”” disabled=no
add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment=”” \
disabled=no comment=”gateway for the router itself”
NB : NTH yaitu :
Angka Pertama = Every (N)
Angka Kedua = Counter (T)
Angka Ketiga = Packet (H)
1,1,0 berarti
1 ( 2 paket, 0-1)
1 ( 1 paket)
0 ( paket yg pertama)
Tidak ada komentar:
Posting Komentar