Skenario Interface 1 ( ISP Telkom ) Ip Address : 192.168.2.105/24 Gateway : 192.168.2.100 Int Name : Telkom ...
Interface 1 ( ISP Telkom )
Ip Address : 192.168.2.105/24
Gateway : 192.168.2.100
Int Name : Telkom
Interface 2 ( IP Local / Client )
Ip Address : 192.168.0.1/24
Int Name : local
Interface 3 ( ISP First Media )
Ip Address : 11.0.0.113/24
Gateway : 11.0.0.100
Int Name : First
# Setting Interface Name
/interface ethernet
set 0 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
"" disabled=no full-duplex=yes l2mtu=1524 mac-address=00:0C:42:70:B6:94 \
master-port=none mtu=1500 name=Telkom speed=100Mbps
set 1 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
"" disabled=no full-duplex=yes l2mtu=1524 mac-address=00:0C:42:70:B6:95 \
master-port=none mtu=1500 name=local speed=100Mbps
set 2 arp=enabled auto-negotiation=yes bandwidth=unlimited/unlimited comment=\
"" disabled=no full-duplex=yes l2mtu=1524 mac-address=00:0C:42:70:B6:96 \
master-port=none mtu=1500 name=First speed=100Mbps
# Setting IP Address
/ip address
add address=192.168.0.1/24 broadcast=192.168.0.255 comment="" disabled=no \
interface=local network=192.168.0.0
add address=11.0.0.113/24 broadcast=11.0.0.255 comment="First Media Net" \
disabled=no interface=First network=11.0.0.0
add address=192.168.2.105/24 broadcast=192.168.2.255 comment=\
"Telkom Media Net" disabled=no interface=Telkom network=192.168.2.0
# Setting Firewall Mangle
/ip firewall mangle
add action=mark-connection chain=input comment="" connection-state=new \
disabled=no in-interface=Telkom new-connection-mark=isp-1 passthrough=yes
add action=mark-connection chain=input comment="" connection-state=new \
disabled=no in-interface=First new-connection-mark=isp-2 passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=isp-1 \
disabled=no new-routing-mark=jalur-1 passthrough=no
add action=mark-routing chain=output comment="" connection-mark=isp-2 \
disabled=no new-routing-mark=jalur-2 passthrough=no
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=local new-connection-mark=isp-1 \
passthrough=yes per-connection-classifier=both-addresses-and-ports:2/0
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=local new-connection-mark=isp-2 \
passthrough=yes per-connection-classifier=both-addresses-and-ports:2/1
add action=mark-routing chain=prerouting comment="" connection-mark=isp-1 \
disabled=no in-interface=local new-routing-mark=jalur-1 passthrough=yes
add action=mark-routing chain=prerouting comment="" connection-mark=isp-2 \
disabled=no in-interface=local new-routing-mark=jalur-2 passthrough=yes
# Setting Firewall Nat
/ip firewall nat
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\
Telkom
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\
Telkom
add action=masquerade chain=srcnat comment="" disabled=no out-interface=First
# Setting Default Gateway
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.2.100 \
routing-mark=jalur-1 scope=30 target-scope=10
add disabled=no distance=2 dst-address=0.0.0.0/0 gateway=11.0.0.100 \
routing-mark=jalur-2 scope=30 target-scope=10
## Pengaturan routing untuk masing-masing mark-routing beban trafik
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=192.168.2.100
add comment="" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=11.0.0.100

COMMENTS