Página 2 de 2 PrimeiroPrimeiro 12
+ Responder ao Tópico



  1. segue a forma que eu ja usei aqui, que é assim....um cliente conecta vai para o link 1 outro conecta vai para o link 2, outro link1, outro link2, e assim sucessivamente....

    / ip firewall mangle
    add chain=prerouting in-interface=Saida src-address-list=link1 \
    action=mark-connection new-connection-mark=link1 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link1 \
    action=mark-routing new-routing-mark=link1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link2 \
    action=mark-connection new-connection-mark=link2 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link2 \
    action=mark-routing new-routing-mark=link2 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida connection-state=new nth=1,1,0 \
    action=mark-connection new-connection-mark=link1 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address=192.168.0.0/16 \
    connection-mark=link1 action=add-src-to-address-list address-list=link1 \
    address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=Saida connection-mark=link1 \
    action=mark-routing new-routing-mark=link1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida connection-state=new nth=1,1,1 \
    action=mark-connection new-connection-mark=link2 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address=192.168.0.0/16 \
    connection-mark=link2 action=add-src-to-address-list address-list=link2 \
    address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=Saida connection-mark=link2 \
    action=mark-routing new-routing-mark=link2 passthrough=no comment="" \
    disabled=no


    / ip firewall nat
    add chain=srcnat connection-mark=link1 action=src-nat \
    to-addresses=192.168.5.103 to-ports=0-65535 comment="" disabled=no
    add chain=srcnat connection-mark=link2 action=src-nat \
    to-addresses=192.168.4.103 to-ports=0-65535 comment="" disabled=no



    / ip route
    add dst-address=0.0.0.0/0 gateway=192.168.5.254 scope=255 target-scope=10 \
    comment="ROTA PADRAO" disabled=no
    add dst-address=0.0.0.0/0 gateway=192.168.5.254 scope=255 target-scope=10 \
    routing-mark=link1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=192.168.4.254 scope=255 target-scope=10 \
    routing-mark=link2 comment="" disabled=no

    abração....

    Kildare....receita de bolo vai ser dificel vc encontrar aqui amigo...mas use a ferramenta pesquisar que vc vai encontrar oque precisa....pode se basear tbm nestas regras que enviei ai....
    Última edição por scinfovirtual; 21-11-2009 às 21:02.

  2. Citação Postado originalmente por scinfovirtual Ver Post
    segue a forma que eu ja usei aqui, que é assim....um cliente conecta vai para o link 1 outro conecta vai para o link 2, outro link1, outro link2, e assim sucessivamente....

    / ip firewall mangle
    add chain=prerouting in-interface=Saida src-address-list=link1 \
    action=mark-connection new-connection-mark=link1 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link1 \
    action=mark-routing new-routing-mark=link1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link2 \
    action=mark-connection new-connection-mark=link2 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link2 \
    action=mark-routing new-routing-mark=link2 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida connection-state=new nth=1,1,0 \
    action=mark-connection new-connection-mark=link1 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address=192.168.0.0/16 \
    connection-mark=link1 action=add-src-to-address-list address-list=link1 \
    address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=Saida connection-mark=link1 \
    action=mark-routing new-routing-mark=link1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida connection-state=new nth=1,1,1 \
    action=mark-connection new-connection-mark=link2 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address=192.168.0.0/16 \
    connection-mark=link2 action=add-src-to-address-list address-list=link2 \
    address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=Saida connection-mark=link2 \
    action=mark-routing new-routing-mark=link2 passthrough=no comment="" \
    disabled=no


    / ip firewall nat
    add chain=srcnat connection-mark=link1 action=src-nat \
    to-addresses=192.168.5.103 to-ports=0-65535 comment="" disabled=no
    add chain=srcnat connection-mark=link2 action=src-nat \
    to-addresses=192.168.4.103 to-ports=0-65535 comment="" disabled=no



    / ip route
    add dst-address=0.0.0.0/0 gateway=192.168.5.254 scope=255 target-scope=10 \
    comment="ROTA PADRAO" disabled=no
    add dst-address=0.0.0.0/0 gateway=192.168.5.254 scope=255 target-scope=10 \
    routing-mark=link1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=192.168.4.254 scope=255 target-scope=10 \
    routing-mark=link2 comment="" disabled=no

    abração....

    Kildare....receita de bolo vai ser dificel vc encontrar aqui amigo...mas use a ferramenta pesquisar que vc vai encontrar oque precisa....pode se basear tbm nestas regras que enviei ai....

    Amigo, no caso aqui do src-address-list=link1 , vou cadastrar os gateway's do link1 e 2 no adress list correto ?



  3. #8
    g.kildare
    Legal Junior

    Muito obrigado. É isto mesmo que preciso
    Tomara que este espaço possa contar com pessoas que como você, contribui com o conhecimento do próximo. Valeu.

  4. Oi Zau eu gostaria de saber como formatar um pc pq o meu entrou vírus.

    Laura!



  5. Ótimo!
    simples e Funcional.
    Justamente o que muita gente precisa!
    Como não sou o primeiro e não vou ser o ultimo a usar vários links simultaneos e preciso dividir uma quantidade de clientes entro links diferentes, atualmente utilizo um servidor em cada link mas com esse código vou poder usar o mesmo servidor para dividir os links entre os clientes.
    Gostaria de sua ajuda pois tentei configurar mais de 2 link e não consegui, quando coloco uma terceira configuracao ele usa a rota do link 2. segue codigo modificado!

    / ip firewall mangle

    add chain=prerouting in-interface=clientes1 src-address-list=link1 action=mark-connection new-connection-mark=link1 passthrough=yes comment="balanceamento de links" disabled=no
    add chain=prerouting in-interface=clientes1 src-address-list=link1 action=mark-routing new-routing-mark=link1 passthrough=no comment="" disabled=no
    add chain=prerouting in-interface=clientes1 src-address-list=link2 action=mark-connection new-connection-mark=link2 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=clientes1 src-address-list=link2 action=mark-routing new-routing-mark=link2 passthrough=no comment="" disabled=no
    add chain=prerouting in-interface=clientes1 src-address-list=link3 action=mark-connection new-connection-mark=link3 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=clientes1 src-address-list=link3 action=mark-routing new-routing-mark=link3 passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=clientes1 connection-state=new nth=1,1,0 action=mark-connection new-connection-mark=link1 passthrough=yes comment="balanceamento de ips" disabled=no
    add chain=prerouting in-interface=clientes1 src-address=172.1.1.0/24 connection-mark=link1 action=add-src-to-address-list address-list=link1 address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=clientes1 connection-mark=link1 action=mark-routing new-routing-mark=link1 passthrough=no comment="" disabled=no
    add chain=prerouting in-interface=clientes1 connection-state=new nth=1,1,1 action=mark-connection new-connection-mark=link2 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=clientes1 src-address=172.2.1.0/24 connection-mark=link2 action=add-src-to-address-list address-list=link2 address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=clientes1 connection-mark=link2 action=mark-routing new-routing-mark=link2 passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=clientes1 connection-state=new nth=1,1,3 action=mark-connection new-connection-mark=link3 passthrough=yes comment="" disabled=no
    add chain=prerouting in-interface=clientes1 src-address=172.3.1.0/24 connection-mark=link3 action=add-src-to-address-list address-list=link3 address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=clientes1 connection-mark=link3 action=mark-routing new-routing-mark=link3 passthrough=no comment="" disabled=no

    / ip firewall nat
    add chain=srcnat connection-mark=link1 action=src-nat to-addresses=10.254.221.3 to-ports=0-65535 comment="balanceamento de links" disabled=no
    add chain=srcnat connection-mark=link2 action=src-nat to-addresses=10.254.222.3 to-ports=0-65535 comment="" disabled=no
    add chain=srcnat connection-mark=link3 action=src-nat to-addresses=10.254.230.3 to-ports=0-65535 comment="" disabled=no

    / ip route
    add dst-address=0.0.0.0/0 gateway=10.254.221.1 scope=255 target-scope=10 comment="link-default" disabled=no
    add dst-address=0.0.0.0/0 gateway=10.254.221.1 scope=255 target-scope=10 routing-mark=link1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=10.254.222.1 scope=255 target-scope=10 routing-mark=link2 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=10.254.230.1 scope=255 target-scope=10 routing-mark=link3 comment="" disabled=no

    Aguardo,

    Luciano Santos


    Citação Postado originalmente por scinfovirtual Ver Post
    segue a forma que eu ja usei aqui, que é assim....um cliente conecta vai para o link 1 outro conecta vai para o link 2, outro link1, outro link2, e assim sucessivamente....

    / ip firewall mangle
    add chain=prerouting in-interface=Saida src-address-list=link1 \
    action=mark-connection new-connection-mark=link1 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link1 \
    action=mark-routing new-routing-mark=link1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link2 \
    action=mark-connection new-connection-mark=link2 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address-list=link2 \
    action=mark-routing new-routing-mark=link2 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida connection-state=new nth=1,1,0 \
    action=mark-connection new-connection-mark=link1 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address=192.168.0.0/16 \
    connection-mark=link1 action=add-src-to-address-list address-list=link1 \
    address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=Saida connection-mark=link1 \
    action=mark-routing new-routing-mark=link1 passthrough=no comment="" \
    disabled=no
    add chain=prerouting in-interface=Saida connection-state=new nth=1,1,1 \
    action=mark-connection new-connection-mark=link2 passthrough=yes \
    comment="" disabled=no
    add chain=prerouting in-interface=Saida src-address=192.168.0.0/16 \
    connection-mark=link2 action=add-src-to-address-list address-list=link2 \
    address-list-timeout=1d comment="" disabled=no
    add chain=prerouting in-interface=Saida connection-mark=link2 \
    action=mark-routing new-routing-mark=link2 passthrough=no comment="" \
    disabled=no


    / ip firewall nat
    add chain=srcnat connection-mark=link1 action=src-nat \
    to-addresses=192.168.5.103 to-ports=0-65535 comment="" disabled=no
    add chain=srcnat connection-mark=link2 action=src-nat \
    to-addresses=192.168.4.103 to-ports=0-65535 comment="" disabled=no



    / ip route
    add dst-address=0.0.0.0/0 gateway=192.168.5.254 scope=255 target-scope=10 \
    comment="ROTA PADRAO" disabled=no
    add dst-address=0.0.0.0/0 gateway=192.168.5.254 scope=255 target-scope=10 \
    routing-mark=link1 comment="" disabled=no
    add dst-address=0.0.0.0/0 gateway=192.168.4.254 scope=255 target-scope=10 \
    routing-mark=link2 comment="" disabled=no

    abração....

    Kildare....receita de bolo vai ser dificel vc encontrar aqui amigo...mas use a ferramenta pesquisar que vc vai encontrar oque precisa....pode se basear tbm nestas regras que enviei ai....






Tópicos Similares

  1. balanceamento de link
    Por ansi no fórum Sistemas Operacionais
    Respostas: 1
    Último Post: 24-06-2003, 04:39
  2. balanceamento de carga....
    Por ansi no fórum Servidores de Rede
    Respostas: 1
    Último Post: 03-05-2003, 19:48
  3. Balanceamento (OSPF2)
    Por neurobashing no fórum Servidores de Rede
    Respostas: 4
    Último Post: 07-02-2003, 18:24
  4. Respostas: 3
    Último Post: 19-01-2003, 10:32
  5. balanceamento de carga
    Por wolvie no fórum Servidores de Rede
    Respostas: 1
    Último Post: 12-04-2002, 23:00

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L