You are on page 1of 2

/ip firewall mangle

add action=mark-connection chain=input comment="Penanda ISP1" connection-state=n


ew \
disabled=no in-interface=ether1-wan1 new-connection-mark=isp-1 passthrough=y
es
add action=mark-connection chain=input comment="Penanda ISP2" connection-state=n
ew \
disabled=no in-interface=ether2-wan2 new-connection-mark=isp-2 passthrough=y
es
add action=mark-connection chain=input comment="Penanda ISP3" connection-state=n
ew \
disabled=no in-interface=ether3-wan3 new-connection-mark=isp-3 passthrough=y
es
add action=mark-routing chain=output comment="Jalur ISP1" connection-mark=isp-1
\
disabled=no new-routing-mark=jalur-1 passthrough=no
add action=mark-routing chain=output comment="Jalur ISP2" connection-mark=isp-2
\
disabled=no new-routing-mark=jalur-2 passthrough=no
add action=mark-routing chain=output comment="Jalur ISP3" connection-mark=isp-3
\
disabled=no new-routing-mark=jalur-3 passthrough=no
add action=mark-connection chain=prerouting comment="Penanda Akses ISP 1" disabl
ed=no \
dst-address-type=!local in-interface=ether4-local new-connection-mark=\
isp-1 passthrough=yes per-connection-classifier=both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting comment="Penanda Akses ISP 2" disabl
ed=no \
dst-address-type=!local in-interface=ether4-local new-connection-mark=\
isp-2 passthrough=yes per-connection-classifier=both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting comment="Penanda Akses ISP 3" disabl
ed=no \
dst-address-type=!local in-interface=ether4-local new-connection-mark=\
isp-3 passthrough=yes per-connection-classifier=both-addresses-and-ports:3/2
add action=mark-routing chain=prerouting comment="Akses Jalur 1" connection-mark
=isp-1 \
disabled=no in-interface=ether4-local new-routing-mark=jalur-1 passthrough=y
es
add action=mark-routing chain=prerouting comment="Akses Jalur 2" connection-mark
=isp-2 \
disabled=no in-interface=ether4-local new-routing-mark=jalur-2 passthrough=y
es
add action=mark-routing chain=prerouting comment="Akses Jalur 3" connection-mark
=isp-3 \
disabled=no in-interface=ether4-local new-routing-mark=jalur-3 passthrough=y
es
/ip
add
add
add

route
dst-address=202.134.1.10 gateway=192.168.2.1 scope=10 comment="Step 1"
dst-address=8.8.8.8 gateway=192.168.3.1 scope=10 comment="Step 1"
dst-address=8.8.4.4 gateway=192.168.4.1 scope=10 comment="Step 1"

add distance=1 gateway=202.134.1.10 routing-mark=jalur-1 check-gateway=ping comm


ent="Step 2"
add distance=2 gateway=8.8.8.8 routing-mark=jalur-2 check-gateway=ping comment="
Step 2"

add distance=3 gateway=8.8.4.4 routing-mark=jalur-3 check-gateway=ping comment="


Step 2"
add dst-address=10.20.30.1 gateway=202.134.1.10 scope=10 target-scope=10 check-g
ateway=ping comment="Step 3"
add dst-address=10.20.30.2 gateway=8.8.8.8 scope=10 target-scope=10 check-gatewa
y=ping comment="Step 3"
add dst-address=10.20.30.3 gateway=8.8.4.4 scope=10 target-scope=10 check-gatewa
y=ping comment="Step 3"
add distance=1 gateway=10.20.30.1 routing-mark=jalur-1 comment="Step 4"
add distance=2 gateway=10.20.30.2 routing-mark=jalur-2 comment="Step 4"
add distance=3 gateway=10.20.30.3 routing-mark=jalur-3 comment="Step 4"
add distance=1 gateway=10.20.30.1 comment="Step 5"
add distance=2 gateway=10.20.30.2 comment="Step 5"
add distance=3 gateway=10.20.30.3 comment="Step 5"

You might also like