Página 1 de 2 12 ÚltimoÚltimo
+ Responder ao Tópico



  1. galera pra quem quer fazer um Load balance com 2 links vai ai um script

    Scripts Load Balance Mikrotik
    Script para loandind balance de 2 links
    01 - Instale 3 placas de rede no servidor e de nome as interfaces de acordo com os script
    02 - Troque os ip das interface de acordo com os endereços de sua rede
    03 - Copie cada script e cole no new terminal via winbox ou via ssh
    OBS: Se vc quiser facilitar copie tudo da forma que esta no script cole no terminal e depois altere via winbox

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    / ip address
    add address=192.168.100.1/24 network=192.168.100.0 broadcast=192.168.100.255 interface=Local
    add address=172.0.2.92/16 network=172.0.0.0 broadcast=172.0.255.255 interface=Link1
    add address=172.0.1.49/16 network=172.0.0.0 broadcast=172.0.255.255 interface=Link2
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    / ip firewall mangle
    add chain=prerouting src-address-list=odd in-interface= Local action=mark-connection \ new-connection-mark=odd passthrough=yes
    add chain=prerouting src-address-list=odd in-interface= Local action=mark-routing \ new-routing-mark=odd
    add chain=prerouting src-address-list=even in-interface= Local action=mark-connection \ new-connection-mark=even passthrough=yes
    add chain=prerouting src-address-list=even in-interface= Local action=mark-routing \ new-routing-mark=even
    add chain=prerouting in-interface= Local connection-state=new nth=1,1,0 \ action=mark-connection new-connection-mark=odd passthrough=yes
    add chain=prerouting in-interface= Local action=add-src-to-address-list \ address-list=odd address-list-timeout=1d connection-mark=odd passthrough=yes
    add chain=prerouting in-interface= Local connection-mark=odd action=mark-routing \ new-routing-mark=odd passthrough=no
    add chain=prerouting in-interface= Local connection-state=new nth=1,1,1 \ action=mark-connection new-connection-mark=even passthrough=yes
    add chain=prerouting in-interface= Local action=add-src-to-address-list \ address-list=even address-list-timeout=1d connection-mark=even passthrough=yes
    add chain=prerouting in-interface= Local connection-mark=even action=mark-routing \ new-routing-mark=even passthrough=no

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    / ip firewall nat
    add chain=srcnat connection-mark=odd action=src-nat to-addresses=172.0.2.92 \ to-ports=0-65535
    add chain=srcnat connection-mark=even action=src-nat to-addresses=172.0.1.49 \ to-ports=0-65535

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    / ip route
    add dst-address=0.0.0.0/0 gateway=172.0.1.1 scope=255 target-scope=10 routing-mark=odd
    add dst-address=0.0.0.0/0 gateway=172.0.1.1 scope=255 target-scope=10 routing-mark=even
    add dst-address=0.0.0.0/0 gateway=172.0.1.1 scope=255 target-scope=10

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    é só abrir o new terminal e colocar por partes tipo cola i bloco 1 lá fecha o terminal e de novo assim sucessivamente só n vale reclamar q agora ta difícil q ta quase impossível para dar errado.

  2. Parabenz pela dica



  3. amigo... esses gateway estao certos... sao todos os mesmos??

  4. Tbm não entendi??!!
    / ip route
    add dst-address=0.0.0.0/0 gateway=172.0.1.1 scope=255 target-scope=10 routing-mark=odd

    add dst-address=0.0.0.0/0 gateway=172.0.1.1 scope=255 target-scope=10 routing-mark=even
    add dst-address=0.0.0.0/0 gateway=172.0.1.1 scope=255 target-scope=10



  5. os gateways nao sao os mesmos,mas no meu caso sim, porque os meus Links sao todos de um provedor Só etao a faixa de IP é a mesma,ok?






Tópicos Similares

  1. Respostas: 17
    Último Post: 16-06-2009, 22:52
  2. LOAD BALANCE - link dedicado X adsl
    Por alykepler no fórum Redes
    Respostas: 2
    Último Post: 28-05-2008, 19:33
  3. Load Balance, link aleatório?
    Por EdilsonLSouza no fórum Redes
    Respostas: 14
    Último Post: 26-04-2008, 19:33
  4. Load Balance Link dedicado + Adsl
    Por alykepler no fórum Redes
    Respostas: 0
    Último Post: 10-03-2008, 10:37
  5. Respostas: 4
    Último Post: 07-03-2008, 08:58

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L