Вы находитесь на странице: 1из 2

ether1 (ISP1) : 111.111.111.

111
ehter2 (ISP2) : 222.222.222.222
ehter3 (LAN) : 192.168.254.1
Tambahkan IP Address pada mikrotik box untuk keperluan diatas:
/ip address
add address=111.111.111.111/24 network=111.111.111.0 broadcast=111.111.111.255 i
nterface=ether1
add address=222.222.222.222/24 network=222.222.222.0 broadcast=222.222.222.255 i
nterface=ether2
add address=192.168.254.1/24 network=192.168.254.0 broadcast=192.168.254.255 int
erface=ether3
4 buah workstation dengan ip : 192.168.254.2 (WORKST-1),
192.168.254.3(WORKST-2), 192.168.254.4(WORKST-3) dan 192.168.254.5(WORKST-3)
/ip
add
add
add
add

firewall address-list
list=jalur1 address="192.168.254.2"
list=jalur1 address="192.168.254.3"
list=jalur2 address="192.168.254.4"
list=jalur2 address="192.168.254.5"

/ip firewall nat


add chain=srcnat action=masquerade to-addresses=111.111.111.111 src-address-list
=jalur1 comment="via ISP1"
add chain=srcnat action=masquerade to-addresses=222.222.222.222 src-address-list
=jalur2 comment="via ISP2"
/ip firewall mangle
add chain=prerouting action=mark-routing new-routing-mark=jalur1-route passthrou
gh=no\
src-address-list=jalur1 in-interface=ether3 comment"Mark Routing Jalur1"
add chain=prerouting action=mark-routing new-routing-mark=jalur2-route passthrou
gh=no\
src-address-list=jalur2 in-interface=ether3 comment"Mark Routing Jalur2"
/ip route
add dst-address=0.0.0.0/0 gateway=111.111.111.1
ope=30\
target-scope=10 routing-mark=jalur1-route
add dst-address=0.0.0.0/0 gateway=222.222.222.1
ope=30\
target-scope=10 routing-mark=jalur1-route
add dst-address=0.0.0.0/0 gateway=111.111.111.1
ope=30\
target-scope=10 routing-mark=jalur2-route
add dst-address=0.0.0.0/0 gateway=222.222.222.1
ope=30\
target-scope=10 routing-mark=jalur2-route
add dst-address=0.0.0.0/0 gateway=111.111.111.1
ope=30\
target-scope=10
add dst-address=0.0.0.0/0 gateway=222.222.222.1
ope=30\
target-scope=10
/ip
add
add
add

check-gateway=ping distance=1 sc
check-gateway=ping distance=1 sc
check-gateway=ping distance=1 sc
check-gateway=ping distance=1 sc
check-gateway=ping distance=1 sc
check-gateway=ping distance=1 sc

route rule
dst-address=111.111.111.0/24 action=lookup table=main
dst-address=222.222.222.0/24 action=lookup table=main
dst-address=192.168.254.0/24 action=lookup table=main

add
add
add
add

src-address=111.111.111.0/24 action=lookup table=jalur1-route


src-address=222.222.222.0/24 action=lookup table=jalur2-route
routing-mark=jalur1-route action=lookup table=jalur1-route
routing-mark=jalur2-route action=lookup table=jalur2-route

Вам также может понравиться