Follow us on...
Follow us on G+ Follow us on Twitter Follow us on Facebook Watch us on YouTube
Register
Results 1 to 7 of 7
  1. #1
    Status
    Offline
    zdienos's Avatar
    Forum Guru
    Join Date
    Feb 2010
    Location
    ~/makasar
    Posts
    1,252
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0

    membuat mangle otomatis untuk load balancing

    habis jalan2 di forum luar negeri, dapet ini.
    belum ngerti sih, masih coba dipahami. daripada hilang, mending sy posting di sini aja...

    sumbernya dah lupa.. Click here to enlarge Click here to enlarge Click here to enlarge

    menurut yg saya bisa pahami, kayaknya script ini akan membuat mangle pcc sesuai dengan jumlah ip route yang aktif. (load balancing pcc)

    Code:
    :global activeroutesold;
    :local activeroutes 0;
    :local route;
    :local tes;
    :local divs 0;
    :local less;
    :local routingmarks;
    :local arrayrouting;
    :local routemark;
    
    
    :log info "BEGIN************"
    :foreach route in=[/ip route find where comment~"^[a-z]*balanceo" active=yes] do={
       :set tes [ /ip route get $route routing-mark ];
       :set activeroutes ($activeroutes + 1)
       :set routingmarks ($routingmarks, $tes);
    }
    :if ($activeroutes != $activeroutesold) do={
       /ip firewall
          mangle {
             :foreach a in=[find where comment~"^[a-z]*balance" ] do={
                remove $a }
       }
       :set arrayrouting [:toarray $routingmarks]
       :set divs $activeroutes;
       :set less $activeroutes;
    
    
    
       :log info "email enviado";
       :for i from=0 to=($activeroutes-1) do={
          :set routemark [:pick $routingmarks $i] 
          :set divs ($activeroutes - $less);
          :set less ($less - 1);
          :log info "$routemark";
          :log info "$activeroutes/$divs"
           /ip firewall mangle
          :log info "Setting filters";
          add action=mark-connection chain=prerouting comment="balance conn $routemark" \
              disabled=no dst-address-type=!local in-interface=local \
              new-connection-mark="$routemark" passthrough=yes per-connection-classifier=\
              "both-addresses:$activeroutes/$divs" place-before=3
          add action=mark-routing chain=prerouting comment="balance route $routemark" \
             connection-mark="$routemark" disabled=no in-interface=local new-routing-mark=\
             "$routemark" passthrough=no place-before=3
        }
    } else={:log info "rutas no han cambiado"};
    :log info ("$activeroutes rutas activas");
    :set activeroutesold $activeroutes;
    :log info "END**************"
    Last edited by zdienos; 04-05-2011 at 20:14.

  2. #2
    Status
    Offline
    si_faisal's Avatar
    Contributor
    Join Date
    Jul 2008
    Location
    Jakarta & Sukabumi
    Posts
    485
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    coba mungkin ada master2 yang mau membahas...

    kyknya bagus nih skripnya Click here to enlarge

    learning mode : on

  3. #3
    Status
    Offline
    dencow's Avatar
    Forum Guru
    Join Date
    Jan 2008
    Posts
    1,728
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    silakan lihat disini:

  4. #4
    Status
    Offline
    dencow's Avatar
    Forum Guru
    Join Date
    Jan 2008
    Posts
    1,728
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    1 (100%)
    sepertinya fungsinya untuk menonaktifkan jalur upstream yang sedang down dari jalur ADSL yang dimiliki dan mengaktifkan kembali kalau sudah up.

  5. #5
    Status
    Offline
    zdienos's Avatar
    Forum Guru
    Join Date
    Feb 2010
    Location
    ~/makasar
    Posts
    1,252
    Reviews
    Read 0 Reviews
    Downloads
    0
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by dencow Click here to enlarge
    silakan lihat disini:
    perciss, itu dia link nya....


    gimana nih master??, bahas donk, biar murid2 mu ini bisa belajar...


    Click here to enlarge

  6. The Following User Says Thank You to zdienos For This Useful Post:


  7. #6
    Status
    Offline
    k4t4k1's Avatar
    Baru Gabung
    Join Date
    Dec 2009
    Location
    jakarta
    Posts
    9
    Reviews
    Read 0 Reviews
    Downloads
    8
    Uploads
    0
    Feedback Score
    0
    Click here to enlarge Originally Posted by zdienos Click here to enlarge
    perciss, itu dia link nya....


    gimana nih master??, bahas donk, biar murid2 mu ini bisa belajar...


    Click here to enlarge
    betul tuh..bahas donk master

  8. #7
    Status
    Offline
    Vandal's Avatar
    Member
    Join Date
    May 2011
    Location
    Port 3128
    Posts
    107
    Reviews
    Read 0 Reviews
    Downloads
    2
    Uploads
    0
    Feedback Score
    0
    up lg dong...

 

 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 98
    Last Post: 05-06-2015, 10:08
  2. [ask] set bandwith management untuk load balancing
    By buchek in forum Beginner Basics
    Replies: 21
    Last Post: 17-06-2014, 00:23
  3. Cari hardware untuk membuat load balancing 6 - 9 speedy
    By awarmanf in forum Others Hardware
    Replies: 24
    Last Post: 10-12-2009, 13:05
  4. [TANYA] Load balancing untuk 2 web server
    By bubble7th in forum General Networking
    Replies: 1
    Last Post: 12-09-2009, 23:49
  5. load balancing untuk gamenet
    By anshor in forum Beginner Basics
    Replies: 8
    Last Post: 27-03-2009, 15:05

Posting Permissions

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