+ Responder ao Tópico



  1. Atualmente estou fazendo testes e funciona perfeito balanceamento com 2 linhas, que se tornam IP dinâmico por DHCP.

    O problema é que eu preciso de failover de modo que quando a queda de uma linha, todo o tráfego é redirecionado para outra.

    e tentei várias configurações e scripts, sem sucesso.

    Aca les dejo la configuração do balanço. (Obras 100%).

    / ip address
    add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=Local

    / ip firewall mangle
    add chain=input in-interface=wlan1 action=mark-connection new-connection-mark=wlan1_conn
    add chain=input in-interface=wlan2 action=mark-connection new-connection-mark=wlan2_conn
    add chain=input in-interface=wlan3 action=mark-connection new-connection-mark=wlan3_conn
    add chain=input in-interface=wlan4 action=mark-connection new-connection-mark=wlan4_conn
    add chain=input in-interface=wlan5 action=mark-connection new-connection-mark=wlan5_conn

    add chain=output connection-mark=wlan1_conn action=mark-routing new-routing-mark=to_wlan1
    add chain=output connection-mark=wlan2_conn action=mark-routing new-routing-mark=to_wlan2
    add chain=output connection-mark=wlan3_conn action=mark-routing new-routing-mark=to_wlan3
    add chain=output connection-mark=wlan4_conn action=mark-routing new-routing-mark=to_wlan4
    add chain=output connection-mark=wlan5_conn action=mark-routing new-routing-mark=to_wlan5

    add chain=prerouting dst-address=RANGOIP.0.0/24 action=accept in-interface=Local
    add chain=prerouting dst-address=RANGOIP.0.0/24 action=accept in-interface=Local
    add chain=prerouting dst-address=RANGOIP.0.0/24 action=accept in-interface=Local
    add chain=prerouting dst-address=RANGOIP.0.0/24 action=accept in-interface=Local
    add chain=prerouting dst-address=RANGOIP.0.0/24 action=accept in-interface=Local

    add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/0 \
    action=mark-connection new-connection-mark=wlan1_conn passthrough=yes
    add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/1 \
    action=mark-connection new-connection-mark=wlan2_conn passthrough=yes
    add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/2 \
    action=mark-connection new-connection-mark=wlan3_conn passthrough=yes
    add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/3 \
    action=mark-connection new-connection-mark=wlan4_conn passthrough=yes
    add chain=prerouting dst-address-type=!local in-interface=Local per-connection-classifier=both-addresses:5/4 \
    action=mark-connection new-connection-mark=wlan5_conn passthrough=yes

    add chain=prerouting connection-mark=wlan1_conn in-interface=Local action=mark-routing new-routing-mark=to_wlan1
    add chain=prerouting connection-mark=wlan2_conn in-interface=Local action=mark-routing new-routing-mark=to_wlan2
    add chain=prerouting connection-mark=wlan3_conn in-interface=Local action=mark-routing new-routing-mark=to_wlan3
    add chain=prerouting connection-mark=wlan4_conn in-interface=Local action=mark-routing new-routing-mark=to_wlan4
    add chain=prerouting connection-mark=wlan5_conn in-interface=Local action=mark-routing new-routing-mark=to_wlan5

    / ip route
    add dst-address=0.0.0.0/0 gateway=wlan1 routing-mark=to_wlan1 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan2 routing-mark=to_wlan2 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan3 routing-mark=to_wlan3 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan4 routing-mark=to_wlan4 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan5 routing-mark=to_wlan5 check-gateway=ping

    add dst-address=0.0.0.0/0 gateway=wlan1 distance=1 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan2 distance=2 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan3 distance=3 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan4 distance=4 check-gateway=ping
    add dst-address=0.0.0.0/0 gateway=wlan5 distance=5 check-gateway=ping

    / ip firewall nat
    add chain=srcnat out-interface=wlan1 action=masquerade
    add chain=srcnat out-interface=wlan2 action=masquerade
    add chain=srcnat out-interface=wlan3 action=masquerade
    add chain=srcnat out-interface=wlan4 action=masquerade
    add chain=srcnat out-interface=wlan5 action=masquerade


    Atualmente está trabalhando com 2 linhas, mas com 5 pistas para a perfeição.


    Desculpe o meu Português, mas com o Google traduge

    aca config failover pero no obra.

    /system script
    add name=LINK2-OFF policy=ftp,reboot,read,write,test,winbox source="/ip route set [/ip \
    route find gateway=186.89.32.1] disable=yes\r\
    \n\r\
    \n/ip route set [/ip route find dst-address=64.233.169.104] disable=no"

    add name=LINK2-ON policy=ftp,reboot,read,write,policy,test,winbox source="/ip route set\
    \_[/ip route find gateway=186.89.32.1] disable=no\r\
    \n\r\
    \n/ip route set [/ip route find dst-address=200.98.249.120] disable=no"

    add name=LINK1-OFF policy=ftp,reboot,read,write,policy,test,winbox source="/ip route se\
    t [/ip route find gateway=190.200.128.1] disable=yes\r\
    \n\r\
    \n/ip route set [/ip route find dst-address=200.98.249.120] disable=no"

    add name=LINK1-ON policy=ftp,reboot,read,write,policy,test,winbox source="/ip route set\
    \_[/ip route find gateway=190.200.128.1] disable=no\r\
    \n\r\
    \n/ip route set [/ip route find dst-address=64.233.169.104] disable=no"

    add name=LINKS-UPS policy=ftp,reboot,read,write,policy,test,winbox source="/tool netwat\
    ch set [/tool netwatch find host=200.98.249.120] disable=no\r\
    \n\r\
    \n/tool netwatch set [/tool netwatch find host=64.233.169.104] disable=no"

    /tool netwatch
    add comment=LINK1 disabled=no down-script=LINK1-OFF host=200.98.249.120 interval=5s timeout=3s up-script=LINK1-ON
    add comment=LINK2 disabled=no down-script=LINK2-OFF host=64.233.169.104 interval=5s timeout=3s up-script=LINK2-ON


    /system scheduler
    add comment="Forcar Verificacao dos Links" disabled=no interval=10s name=\
    LINKS-UPS on-event=LINKS-UPS policy=ftp,read,policy,test,winbox,sniff start-date=\
    sep/10/2009 start-time=00:00:00
    Última edição por endcoronel; 12-02-2010 às 16:06.

  2. Aqui preferi usar todos os modems em bridge e se acaso um cair a interface ppp-out desabilita e os outros assumem normalmente. Agora com eles roteados o bicho pega. Meu link full quase nunca cai mas se cair a internet para. Como nunca cai neme squentei em fazer faill over.

    Manda esses modems todos em bridge logo e seja muito feliz



  3. O failover funciona perfeitamente e de forma muito simples. Deve criar uma rota estatica para um determinado Ip e Rota.
    Criar no Tools, Netwatch, se ON link = Enable. Se Down=Link Disable.

  4. Obrigado por seus amigos de respostas.

    Mas eu mesmo ainda pode failover para funcionar corretamente.

    (Arcanjo_tc) não entendem o seu comentário.

    (Interhome) se você tiver um exemplo para me ajudar seria maravilhoso.

    Saudações a todos



  5. [QUOTE = endcoronel; 463366] Obrigado por seus amigos de respostas.

    Mas eu mesmo ainda pode failover para funcionar corretamente.

    (Arcanjo_tc) não entendem o seu comentário.

    (Interhome) se você tiver um exemplo para me ajudar seria maravilhoso.

    Saudações a todos [/ QUOTE]

    / Ip route

    add dst-address = 159.148.60.2/32 gateway = xx.xx.xx.xx check-gateway = ping \
    scope = 255 target-scope = 10 comment = "TESTE ROTA XXXXXXXX"Disabled = no

    / tool netwatch

    add host=159.148.60.2 timeout=1s interval=1m up-script="/ip route enable \
    \[find comment=\"TESTE ROTA XXXXXXXX\"\]
    \n:log warning \"TESTE ROTA XXXXXXXX \
    FUNCIONANDO OK -\";" down-script="/ip route disable \[find comment=\"Rota \
    XXXXXXXXXXX\"\]
    \n/ip route enable \[find comment=\"ROTA \
    XXXXXXXXXXX\"\]
    \n:log error \"XXXXXXXXX não está funcionando, \
    possivelmente sem link -\";" comment=" ROTA XXXXXXXXXX" disabled=no
    Última edição por interhome; 15-02-2010 às 08:44.






Tópicos Similares

  1. Load balance pcc com links ip dinamico , como fazer?
    Por julinribeiro no fórum Redes
    Respostas: 21
    Último Post: 25-10-2017, 08:41
  2. loadbalance com oi velox e link IP dinamico
    Por valternatel no fórum Redes
    Respostas: 2
    Último Post: 11-05-2014, 11:16
  3. Respostas: 0
    Último Post: 27-04-2011, 22:33
  4. LoadBalance PCC MK pega referencia do 1º Link?
    Por cyberpool no fórum Redes
    Respostas: 1
    Último Post: 08-12-2010, 10:42
  5. Respostas: 0
    Último Post: 12-09-2004, 08:34

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L