Senin, 15 Juni 2020

MIKROTIK LOADBALANCE 3 ISP

MIKROTIK LOADBALANCE 3 ISP

/ip address
add address=192.168.110.2/29 disabled=no interface=ether1-WAN1 network=192.168.110.0
add address=192.168.120.2/29 disabled=no interface=ether2-WAN2 network=192.168.120.0
add address=192.168.130.1/29 disabled=no interface=ether3-WAN3 network=192.168.130.0
add address=192.168.100.1/29 disabled=no interface=ether4-LAN network=192.168.100.0


/ip firewall mangle
add action=mark-connection chain=input disabled=no in-interface=ether1-WAN1 new-connection-mark=WAN1_connmark passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=ether2-WAN2 new-connection-mark=WAN2_connmark passthrough=yes
add action=mark-connection chain=input disabled=no in-interface=ether3-WAN3 new-connection-mark=WAN3_connmark passthrough=yes
add action=mark-routing chain=output connection-mark=WAN1_connmark disabled=no new-routing-mark=ke_ISP1 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN2_connmark disabled=no new-routing-mark=ke_ISP2 passthrough=yes
add action=mark-routing chain=output connection-mark=WAN3_connmark disabled=no new-routing-mark=ke_ISP3 passthrough=yes
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=ether4-LAN new-connection-mark=WAN1_connmark passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=ether4-LAN new-connection-mark=WAN2_connmark passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=ether4-LAN new-connection-mark=WAN3_connmark passthrough=yes per-connection-classifier=both-addresses-and-ports:2/2
add action=mark-routing chain=prerouting connection-mark=WAN1_connmark disabled=no in-interface=ether4-LAN new-routing-mark=ke_ISP1 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN2_connmark disabled=no in-interface=ether4-LAN new-routing-mark=ke_ISP2 passthrough=yes
add action=mark-routing chain=prerouting connection-mark=WAN3_connmark disabled=no in-interface=ether4-LAN new-routing-mark=ke_ISP3 passthrough=yes

/ip firewall nat
add action=masquerade chain=srcnat disabled=no out-interface=ether1-WAN1
add action=masquerade chain=srcnat disabled=no out-interface=ether2-WAN2
add action=masquerade chain=srcnat disabled=no out-interface=ether3-WAN3

/ip route
add dst-address=8.8.8.8 gateway=192.168.110.1 scope=10
add dst-address=8.8.4.4 gateway=192.168.120.1 scope=10
add dst-address=8.8.8.8 gateway=192.168.130.1 scope=10

/ip route
add distance=1 gateway=8.8.8.8 routing-mark=ke_ISP1 check-gateway=ping
add distance=2 gateway=8.8.4.4 routing-mark=ke_ISP2 check-gateway=ping
add distance=3 gateway=8.8.8.8 routing-mark=ke_ISP3 check-gateway=ping

/ip route
add dst-address=10.20.30.1 gateway=8.8.8.8 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.20.30.2 gateway=8.8.4.4 scope=10 target-scope=10 check-gateway=ping
add dst-address=10.20.30.3 gateway=8.8.8.8 scope=10 target-scope=10 check-gateway=ping

/ip route
add distance=1 gateway=10.20.30.1 routing-mark=ke_ISP1
add distance=2 gateway=10.20.30.2 routing-mark=ke_ISP2
add distance=3 gateway=10.20.30.3 routing-mark=ke_ISP3

/ip route
add distance=1 gateway=10.20.30.1
add distance=2 gateway=10.20.30.2
add distance=3 gateway=10.20.30.3

Tidak ada komentar:

Posting Komentar