Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Results 1 to 1 of 1
  1. #1
    Status
    Offline
    onnymikrotik's Avatar
    Baru Gabung
    Join Date
    Feb 2008
    Posts
    10
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    scrip failover n LB error di mikrotik v2.97

    saya punya script untuk fail over loadbalancing mikrotik v4.6 jalan dengan baik, jalan juga di mikrotik v3.2 tp dengan perubahan sedikit, nah untuk mikrotik v2.97 kok ga jalan sama sekali ya... mohon bantuan mapa suhu nihhh

    ni scriptnya:


    :local gateways {"192.168.101.254"}
    :local gateways {$gateways,"192.168.102.254"}
    :local gateways {$gateways,"192.168.103.254"}
    :local gateways {$gateways,"192.168.104.254"}
    :local gateways {$gateways,"192.168.105.254"}
    :local gateways {$gateways,"192.168.106.254"}
    :local gateways {$gateways,"192.168.107.254"}
    :local gateways {$gateways,"192.168.108.254"}



    :local testers {"198.41.0.4"}
    :local testers {$testers,"192.228.79.201"}
    :local testers {$testers,"128.8.10.90"}
    :local testers {$testers,"192.5.5.241"}
    :local testers {$testers,"192.36.148.17"}
    :local testers {$testers,"192.58.128.30"}
    :local testers {$testers,"193.0.14.129"}
    :local testers {$testers,"192.33.4.12"}

    :local gatecount 6;
    :local counter ($gatecount - 1);
    :global gwup {};


    /ip route
    :for i from=0 to=$counter do={ \
    :local cgateway {:tostr [Click here to enlargeick $gateways $i]}; \
    :local tester {:tostr [Click here to enlargeick $testers $i]}; \
    :local dstaddress {$testers . "/32"}; \
    Click here to enlargeut $cgateway; \
    Click here to enlargeut $tester; \
    Click here to enlargeut $dstaddress; \
    :if ([find dst-address=$dstaddress gateway=$cgateway]="") do={add dst-address=$dstaddress gateway=$cgateway;}; \
    :if {[/ping $tester count=2]>0} do={:set gwup [$gwup ,$cgateway];enable [find comment=$cgateway]} else={disable [find comment=$cgateway]}; \
    };

    Click here to enlargeut $gwup
    :local currentgateway {[/ip route get [find comment="ALL"] gateway]};
    Click here to enlargeut $currentgateway

    :if ([:tostr $gwup] != [:tostr $currentgateway]) do { \
    Click here to enlargeut "Not same"; \
    set [find comment="ALL"] gateway=$gwup; \
    };
    Last edited by onnymikrotik; 15-07-2011 at 23:04.

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dual Mikrotik Failover
    By alvee_poke in forum Scripting @ Mikrotik
    Replies: 5
    Last Post: 19-05-2011, 17:51
  2. Buat Scrip Log per user di mikrotik
    By aries2527 in forum Scripting @ Mikrotik
    Replies: 4
    Last Post: 01-07-2010, 19:10
  3. Replies: 6
    Last Post: 04-01-2010, 23:38
  4. [help] mikrotik error pivot_root error
    By konpiuse in forum Beginner Basics
    Replies: 1
    Last Post: 17-10-2008, 16:52
  5. [help] gabung 2 adsl dengan mikrotik (tanpa failover)
    By nandong in forum General Networking
    Replies: 3
    Last Post: 10-09-2008, 08:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •