0% found this document useful (0 votes)
5 views1 page

Setting Load Balance Mikrotik

The document outlines the configuration of IP addresses and routing for a network setup with two ISPs. It includes static IP assignments for LAN and ISP interfaces, DHCP client setup for the second ISP, and NAT and mangle rules for traffic management. Additionally, it specifies routing rules for directing traffic based on connection marks to the respective ISPs.

Uploaded by

geng.anwar.05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Setting Load Balance Mikrotik

The document outlines the configuration of IP addresses and routing for a network setup with two ISPs. It includes static IP assignments for LAN and ISP interfaces, DHCP client setup for the second ISP, and NAT and mangle rules for traffic management. Additionally, it specifies routing rules for directing traffic based on connection marks to the respective ISPs.

Uploaded by

geng.anwar.05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

ip address

add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255


interface=ether5 // sebagai lan
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255
interface=ether1 // sebagai isp 1 statis

ip dhcp-client // isp 2 DHCP


add interface=ether2 add-default-route=no disabled=no

ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade comment=nat-isp1
add chain=srcnat out-interface=ether2 action=masquerade comment=nat-isp2

ip firewall mangle
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=ether5
add chain=prerouting dst-address=172.16.0.0/24 action=accept in-interface=ether5

add chain=prerouting in-interface=ether1 connection-mark=no-mark action=mark-


connection new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ether2 connection-mark=no-mark action=mark-
connection new-connection-mark=ISP2_conn

add chain=prerouting in-interface=ether5 connection-mark=no-mark dst-address-


type=!local per-connection-classifier=both-addresses:3/0 action=mark-connection
new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ether5 connection-mark=no-mark dst-address-
type=!local per-connection-classifier=both-addresses:3/1 action=mark-connection
new-connection-mark=ISP1_conn
add chain=prerouting in-interface=ether5 connection-mark=no-mark dst-address-
type=!local per-connection-classifier=both-addresses:3/2 action=mark-connection
new-connection-mark=ISP2_conn

add chain=prerouting connection-mark=ISP1_conn in-interface=ether5 action=mark-


routing new-routing-mark=to_ISP1
add chain=prerouting connection-mark=ISP2_conn in-interface=ether5 action=mark-
routing new-routing-mark=to_ISP2

add chain=output connection-mark=ISP1_conn action=mark-routing new-routing-


mark=to_ISP1
add chain=output connection-mark=ISP2_conn action=mark-routing new-routing-
mark=to_ISP2

ip route
add dst-address=0.0.0.0/0 gateway=10.111.0.1 routing-mark=to_ISP1 check-
gateway=ping
add dst-address=0.0.0.0/0 gateway=172.16.0.1 routing-mark=to_ISP2 check-
gateway=ping
add dst-address=0.0.0.0/0 gateway=10.111.0.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=172.16.0.1 distance=2 check-gateway=ping

You might also like