+ Responder ao Tópico



  1. Load Balancing com Mikrotik 3.x
    load balance temos 5 links aqui e uma interface de saida
    o que precisamos 5 conexoes com a internet
    6 placas de redes sendo q 5 entra e uma sai.

    então, vamos começar, vou usar 5 conexão aqui.


    adcionando os ips para as placas de redes com os link da internet logico que o moden deve esta configurado de acordo. com sua faixa de ips..
    IP Address

    / ip address add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment="" disabled=no
    / ip address add address=10.111.0.2/30 network=10.111.0.0 broadcast=10.111.0.3 interface=uplink1 comment="" disabled=no
    / ip address add address=10.112.0.2/30 network=10.112.0.0 broadcast=10.112.0.3 interface=Uplink2 comment="" disabled=no
    / ip address add address=10.113.0.2/30 network=10.113.0.0 broadcast=10.113.0.3 interface=Uplink3 comment="" disabled=no
    / ip address add address=10.114.0.2/30 network=10.114.0.0 broadcast=10.114.0.3 interface=Uplink4 comment="" disabled=no
    / ip address add address=10.115.0.2/30 network=10.115.0.0 broadcast=10.115.0.3 interface=Uplink5 comment="" disabled=no

    ip firewal mangle configuraçao

    / ip firewall mangle add chain=prerouting in-interface=Local connection-state=new nth=5,1 action=mark-connection new-connection-mark=conn1 passthrough=yes

    comment="" disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-mark=conn1 action=mark-routing new-routing-mark=conn1 passthrough=no comment=""

    disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-state=new nth=4,1 action=mark-connection new-connection-mark=conn2 passthrough=yes

    comment="" disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-mark=conn2 action=mark-routing new-routing-mark=conn2 passthrough=no comment=""

    disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-state=new nth=3,1 action=mark-connection new-connection-mark=conn3 passthrough=yes

    comment="" disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-mark=conn3 action=mark-routing new-routing-mark=conn3 passthrough=no comment=""

    disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-state=new nth=2,1 action=mark-connection new-connection-mark=conn4 passthrough=yes

    comment="" disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-mark=conn4 action=mark-routing new-routing-mark=conn4 passthrough=no comment=""

    disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-state=new action=mark-connection new-connection-mark=conn5 passthrough=yes comment=""

    disabled=no
    / ip firewall mangle add chain=prerouting in-interface=Local connection-mark=conn5 action=mark-routing new-routing-mark=conn5 passthrough=no comment=""

    disabled=no

    ip firewall nat aqui criaremos as nats.. mascarada para os 5 links passar para o cliente

    / ip firewall nat add chain=srcnat connection-mark=conn1 action=masquerade out-interface=Uplink1 comment="" disabled=no
    / ip firewall nat add chain=srcnat connection-mark=conn2 action=masquerade out-interface=Uplink2 comment="" disabled=no
    / ip firewall nat add chain=srcnat connection-mark=conn3 action=masquerade out-interface=Uplink3 comment="" disabled=no
    / ip firewall nat add chain=srcnat connection-mark=conn4 action=masquerade out-interface=Uplink4 comment="" disabled=no
    / ip firewall nat add chain=srcnat connection-mark=conn5 action=masquerade out-interface=Uplink5 comment="" disabled=no

    Route

    / ip route add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=conn1 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=conn2 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 routing-mark=conn3 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=10.114.0.1 scope=255 target-scope=10 routing-mark=conn4 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=10.115.0.1 scope=255 target-scope=10 routing-mark=conn5 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 comment="" disabled=no

    Explicação

    Primeiro vamos dar o código e, em seguida, explicar o que ele realmente faz.

    Endereço IP e Mangle

    / ip address add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local comment="" disabled=no
    / ip address add address=10.111.0.2/30 network=10.111.0.0 broadcast=10.111.0.3 interface=Uplink1 comment="" disabled=no
    / ip address add address=10.112.0.2/30 network=10.112.0.0 broadcast=10.112.0.3 interface=Uplink2 comment="" disabled=no
    / ip address add address=10.113.0.2/30 network=10.113.0.0 broadcast=10.113.0.3 interface=Uplink3 comment="" disabled=no
    / ip address add address=10.114.0.2/30 network=10.114.0.0 broadcast=10.114.0.3 interface=Uplink4 comment="" disabled=no
    / ip address add address=10.115.0.2/30 network=10.115.0.0 broadcast=10.115.0.3 interface=Uplink5 comment="" disabled=no

    O roteador tem 5 upstream (WAN) interface com os endereços dos 10.111.0.2/30; 10.112.0.2/24; 10.113.0.2/30; 10.114.0.2/24 e 10.115.0.2/30. A LAN

    interface tem o nome de "local" eo endereço IP 192.168.0.1/24.

    Para o ip firewall mangle, 5 conexão uplink necessidade de conexão e 5 marcação de roteamento.
    Mangle 1 : nth : 5,1
    Mangle 2 : nth : 4,1
    Mangle 3 : nth : 3,1
    Mangle 4 : nth : 2,1
    Mangle 5 : No nth
    Aqui a explicação:
    Mangle 1: Leia todo o tráfego e combinar 1 / 5 do tráfego
    Mangle 2: Leia 4 / 5 de tráfego e combinar 1 / 4 do que o tráfego (1 / 5 do tráfego total)
    Mangle 3: Leia 3 / 4 de 4 / 5 tráfego acima (ou 3 / 5 do tráfego total) e combinar 1 / 2 acima do tráfego (1 / 5 do tráfego total)
    Mangle 4: Leia 2 / 3 de 3 / 5 tráfego total (ou 2 / 5 do tráfego total) e combinar 1 / 2 acima do tráfego (1 / 5 do tráfego total)
    Mengle 5: Leia o resto do tráfego (1 / 5 do tráfego total)

    É isso. Agora você pode tentar a sua definição.

    =================================================


    Além de utilizar a rota que o anterior, você também pode usar as regras como esta:

    / ip route add dst-address=0.0.0.0/0 gateway=Uplink1 scope=255 target-scope=10 routing-mark=conn1 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=Uplink2 scope=255 target-scope=10 routing-mark=conn2 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=Uplink3 scope=255 target-scope=10 routing-mark=conn3 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=Uplink4 scope=255 target-scope=10 routing-mark=conn4 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=Uplink5 scope=255 target-scope=10 routing-mark=conn5 comment="" disabled=no
    / ip route add dst-address=0.0.0.0/0 gateway=Uplink1 scope=255 target-scope=10 comment="" disabled=no

  2. Boa tarde Buut!
    Otimo post sobre o loadbalance com 5 link, testei na minha rb1000 funfow file, os moudem chega parecia q ia pega fooogoooo kabare.........
    valew, continue assim ajudando o mundo infinito da programacao....



  3. COLEGA COMO EU FARIA PRA MARCAR E VEZ DE CONEXÇÕES , MARCAR PACOTES USANDO ESTE SEU ESQUEMA? TENHO 2 ADSL DE8 MB E 1 DE2 MB E QUERIA MARCAR PACOTES NAS ADSL DE 8 MBS E DEIXAR A DE 2 MB PRA MSN E BANCOS ASSIM QUANDO EU CARREGASSE AS PAGINAS ELAS CARREGARIAM PARTES DOS PACOTES POR 1 LINK DE 8 MB E A OUTRA PARTE DOS PACOTES PELO OUTRO LINK DE8 MB, TEM COMO?






Tópicos Similares

  1. Problemas no Controle de Banda na Versão 6.xx Mikrotik
    Por Paulo José da Silva no fórum Servidores de Rede
    Respostas: 6
    Último Post: 29-12-2015, 05:06
  2. Load Balance na Lan
    Por giovaneh no fórum Redes
    Respostas: 9
    Último Post: 02-06-2010, 11:07
  3. Respostas: 7
    Último Post: 13-04-2010, 09:33
  4. WebProxy/cache na Versão 3.xx Funciona ?
    Por elielgt no fórum Redes
    Respostas: 11
    Último Post: 15-07-2009, 17:01
  5. Respostas: 0
    Último Post: 18-10-2008, 13:56

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L