Bagi yang pernah mencoba script ECMP Fail Over Mikrotik 3.10 yang saya tulis sebelumnya mungkin ada kesulitan pada waktu menjalankan script ecmp-shutdown dan ecmp-startup , baru-baru ini saya menghadapi masalah tersebut. oleh karena itu coba gunakan script baru dibawah, jadi script lamanya didelete aja lalau diganti script ini dengan terlebih dahulu menyesuaikan ip gateway masing-masing koneksi.
/system script
add name=ecmp-shutdown policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff source=":if ([/pin\
g 10.95.130.129 count=1]=0 || [/ping 10.168.2.1 count=1]=0) do={:log info \
\"Gateway down\" \r\
\n/ip firewall mangle disable [/ip firewall mangle find comment=\"Route HT\
TP traffic to ECMP\"] \r\
\n/ip firewall mangle disable [/ip firewall mangle find comment=\"SMTP Tra\
ffic\"]\r\
\n} else {:log info \"ecmp-shutdown check ok\"}"
add name=ecmp-startup policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff source=":if ([/pin\
g 10.95.130.129 count=1]=1 && [/ping 10.168.2.1 count=1]=1) do={:log info \
\"Both Gateway are up\"\r\
\n/ip firewall mangle enable [/ip firewall mangle find comment=\"Route HTT\
P traffic to ECMP\"]\r\
\n/ip firewall mangle enable [/ip firewall mangle find comment=\"SMTP Traf\
fic\"]\r\
\n} else {:log info \"ecmp-startup check ok\"}"
add name=wireless-gateway-check policy=\
ftp,reboot,read,write,policy,test,winbox,password,sniff source=":if ([/pin\
g 10.95.130.129 count=1]=1) do={:log info \"Wireless Gateway are up\"\r\
\n/ip route enable [/ip route find comment=\"Default Route to Internet Wir\
eless\"]\r\
\n/ip route disable [/ip route find comment=\"Default Route to Internet AD\
SL\"]\r\
\n} else {:log info \"Wireless Gateway are down\"\r\
\n/ip route disable [/ip route find comment=\"Default Route to Internet Wi\
reless\"]\r\
\n/ip route enable [/ip route find comment=\"Default Route to Internet ADS\
L\"]\r\
\n}"
/system scheduler
add comment="" disabled=no interval=25s name=gateway-check1 on-event=\
ecmp-shutdown start-date=jun/13/2008 start-time=16:26:27
add comment="" disabled=no interval=30s name=gateway-check2 on-event=\
ecmp-startup start-date=jun/13/2008 start-time=16:26:27
add comment="" disabled=no interval=20s name=wireless-gateway-check on-event=\
wireless-gateway-check start-date=jun/13/2008 start-time=16:26:27
selain itu agar pengecekkan ke ip gateway link WIRELESS pasti lewat Interface WIRELESS coba tambahkan script berikut:
/ip firewall filter
add action=drop chain=output comment=\
"supaya ke gateway wireless tidak bisa lewat interface adsl" disabled=no \
dst-address=10.95.130.129 out-interface=ADSL protocol=icmp
Tidak ada komentar:
Posting Komentar