Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 7. Operating System, mikrotik » 3 WAN Mikrotik

3 WAN Mikrotik

Ini Config sudah jadi-nya
-----
MikroTik-16012015-2135 (2).backup --> Hilangkan Extension.txt-nya 
user: admin
Password: prbn10
---
IP Port 
[admin@MikroTik] /ip address> print

Flags: X – disabled, I – invalid, D – dynamic
# ADDRESS NETWORK INTERFACE
0 203.201.173.183/28 203.201.173.176 PublicDnet
1 192.168.3.11/24 192.168.3.0 LAN253
2 192.168.1.11/24 192.168.1.0 WAN1
3 192.168.2.11/24 192.168.2.0 WAN2
4 192.168.99.2/24 192.168.99.0 WAN3


-----
Ini Tutorialnya...
#Set Ethernet name as WAN1,WAN2,WAN3,Local and copy below script on terminal window.

#Reboot my Mikrotik and test your setup.

/ip address
add address=192.168.1.2/24 interface=WAN1
add address=192.168.2.2/24 interface=WAN2
add address=192.168.3.2/24 interface=WAN3
add address=192.168.21.1/24 interface=Local

/ip dns
set allow-remote-requests=yes cache-size=5000KiB max-udp-packet-size=2048 servers=192.168.1.1,192.168.2.1

/ ip firewall mangle
add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=WAN1_conn
add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=WAN2_conn
add chain=input in-interface=WAN3 action=mark-connection new-connection-mark=WAN3_conn

add action=mark-routing chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1
add action=mark-routing chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2
add action=mark-routing chain=output connection-mark=WAN3_conn new-routing-mark=to_WAN3

add chain=prerouting dst-address=192.168.1.0/24 in-interface=Local
add chain=prerouting dst-address=192.168.2.0/24 in-interface=Local
add chain=prerouting dst-address=192.168.3.0/24 in-interface=Local

add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN1_conn per-connection-classifier=both-addresses-and-ports:3/0
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN2_conn per-connection-classifier=both-addresses-and-ports:3/1
add action=mark-connection chain=prerouting dst-address-type=!local in-interface=Local new-connection-mark=WAN3_conn per-connection-classifier=both-addresses-and-ports:3/2

add action=mark-routing chain=prerouting connection-mark=WAN1_conn in-interface=Local new-routing-mark=to_WAN1
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=Local new-routing-mark=to_WAN2
add action=mark-routing chain=prerouting connection-mark=WAN2_conn in-interface=Local new-routing-mark=to_WAN3

/ip firewall nat
add action=masquerade chain=srcnat out-interface=WAN1
add action=masquerade chain=srcnat out-interface=WAN2
add action=masquerade chain=srcnat out-interface=WAN3

/ip route
add check-gateway=ping distance=1 gateway=192.168.1.1 routing-mark=to_WAN1
add check-gateway=ping distance=1 gateway=192.168.2.1 routing-mark=to_WAN2
add check-gateway=ping distance=1 gateway=192.168.3.1 routing-mark=to_WAN3
add check-gateway=ping distance=1 gateway=192.168.1.1
add check-gateway=ping distance=2 gateway=192.168.2.1
add check-gateway=ping distance=3 gateway=192.168.3.1

Filed under: 7. Operating System, mikrotik

Leave a Reply

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>