Página 6 de 8 PrimeiroPrimeiro ... 2345678 ÚltimoÚltimo
+ Responder ao Tópico



  1. amigo poderia postar como ficaria o nth tipo
    nth=1,1,0 - 1,1,1
    como ficaria o nth para estes 2 links:
    link1 = 1024 kbps
    link2 = 512 kbps

  2. Olá amigo!

    Você tem que ter 3 placas de rede na maquina !

    Se for ADSL de operadoras diferentes utilize DNS publico !

    Ex: primario 208.67.222.222
    secundario 208.67.220.220

    estes DNS funcionam com quase todas operadoras .

    Colocar os modems em modo router !

    Dois ADSL


    1024k 10.112.0.0 e 512k 10.111.0.0


    / ip address

    add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=ether1 comment="" \
    disabled=no

    add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=ether2 \
    comment="" disabled=no

    add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=ether3 \
    comment="" disabled=no


    / ip firewall mangle

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,0 \
    action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=odd action=mark-routing \
    new-routing-mark=odd passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,1 \
    action=mark-connection new-connection-mark=even passthrough=yes comment="" \
    disabled=no



    add chain=prerouting in-interface=ether1 connection-mark=even action=mark-routing \
    new-routing-mark=even passthrough=no comment="" disabled=no


    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,2 \
    action=mark-connection new-connection-mark=oves passthrough=yes comment="" \

    disabled=no


    add chain=prerouting in-interface=ether1 connection-mark=oves action=mark-routing \
    new-routing-mark=oves passthrough=no comment="" disabled=no





    / ip firewall nat

    add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
    to-ports=0-65535 comment="" disabled=no


    add chain=srcnat connection-mark=oves action=src-nat to-addresses=10.112.0.2 \
    to-ports=0-65535 comment="" disabled=no


    / ip route

    add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
    comment="" disabled=no


    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=oves \
    comment="" disabled=no


    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment="" \
    disabled=no



    Se der uma boa lida vai ver que tem duas marcações para um link, e uma outra para o outro!
    Altere com forme sua realidade!



  3. Giovani.couto

    sem ser chato, mais eu não conseguir entender muito bem esse load balance... pq c repete 3 vez o mesmo ip route do gateway...
    so meio leio..

    tem como vc editar 1 para min... fazer aki e estudar emcima dele para min entender por favor...
    são 3 adsl de 4Megas

    modem default= 10.1.1.12/24 (gateway 10.1.1.1)
    modem 2= 192.168.1.64/24 (gateway 192.168.1.254)
    modem 3= 192.168.2.64/24 (gateway 192.168.2.254)

    os links tem uma velocidade media de 4 megas cada um... uma outra coisa giovani.couto e sobre os bancos e msn.. tem com da um explica tbm por favor..

    muito obrigado



    Citação Postado originalmente por Giovani.couto Ver Post
    Olá amigo!

    Você tem que ter 3 placas de rede na maquina !

    Se for ADSL de operadoras diferentes utilize DNS publico !

    Ex: primario 208.67.222.222
    secundario 208.67.220.220

    estes DNS funcionam com quase todas operadoras .

    Colocar os modems em modo router !

    Dois ADSL

    1024k 10.112.0.0 e 512k 10.111.0.0


    / ip address

    add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=ether1 comment="" \
    disabled=no

    add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=ether2 \
    comment="" disabled=no

    add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=ether3 \
    comment="" disabled=no


    / ip firewall mangle

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,0 \
    action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=odd action=mark-routing \
    new-routing-mark=odd passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,1 \
    action=mark-connection new-connection-mark=even passthrough=yes comment="" \
    disabled=no


    add chain=prerouting in-interface=ether1 connection-mark=even action=mark-routing \
    new-routing-mark=even passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,2 \
    action=mark-connection new-connection-mark=oves passthrough=yes comment="" \
    disabled=no


    add chain=prerouting in-interface=ether1 connection-mark=oves action=mark-routing \
    new-routing-mark=oves passthrough=no comment="" disabled=no





    / ip firewall nat

    add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
    to-ports=0-65535 comment="" disabled=no


    add chain=srcnat connection-mark=oves action=src-nat to-addresses=10.112.0.2 \
    to-ports=0-65535 comment="" disabled=no


    / ip route

    add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=oves \
    comment="" disabled=no


    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 comment="" \
    disabled=no


    Se der uma boa lida vai ver que tem duas marcações para um link, e uma outra para o outro!
    Altere com forme sua realidade!

  4. Citação Postado originalmente por mktguaruja Ver Post
    Giovani.couto

    sem ser chato, mais eu não conseguir entender muito bem esse load balance... pq c repete 3 vez o mesmo ip route do gateway...
    so meio leio..

    tem como vc editar 1 para min... fazer aki e estudar emcima dele para min entender por favor...
    são 3 adsl de 4Megas

    modem default= 10.1.1.12/24 (gateway 10.1.1.1)
    modem 2= 192.168.1.64/24 (gateway 192.168.1.254)
    modem 3= 192.168.2.64/24 (gateway 192.168.2.254)

    os links tem uma velocidade media de 4 megas cada um... uma outra coisa giovani.couto e sobre os bancos e msn.. tem com da um explica tbm por favor..

    muito obrigado
    3 ADSL

    1x1x1 no nth



    você tem que ter 4 placas de rede na maquina !


    / ip address

    add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=ether1 comment="" \
    disabled=no

    add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=ether2 \
    comment="" disabled=no

    add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=ether3 \
    comment="" disabled=no

    add address=10.113.0.2/24 network=10.113.0.0 broadcast=10.113.0.255 interface=ether4 \
    comment="" disabled=no



    / ip firewall mangle

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,0 \
    action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=odd action=mark-routing \
    new-routing-mark=odd passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,1 \
    action=mark-connection new-connection-mark=even passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=even action=mark-routing \
    new-routing-mark=even passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,2 \
    action=mark-connection new-connection-mark=ode passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=ode action=mark-routing \
    new-routing-mark=ode passthrough=no comment="" disabled=no


    / ip firewall nat

    add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=ode action=src-nat to-addresses=
    10.113.0.2 \
    to-ports=0-65535 comment="" disabled=no



    / ip route

    add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 routing-mark=ode \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 comment="" \
    disabled=no



    Sobre msn e bancos é simples !


    Faça marcação dos pacotes por porta ou range de ip em mangle e mande sair por mais uma marcação route !


    Resumindo !

    /ip route

    add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=nobres \
    comment="" disabled=no



    /ip firewall mangle


    add chain=prerouting protocol=tcp dst-port=443 action=mark-routing new-routing-mark=nobres passthrough=yes comment="" disabled=no

    add chain=prerouting in-interface=ethe1 routing-mark=nobres action=mark-packet new-packet-mark=nobres passthrough=yes comment="" disabled=no

    Qualquer coisa posta ai !



  5. / ip firewall nat

    add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=ode action=src-nat to-addresses=
    10.113.0.2 \
    to-ports=0-65535 comment="" disabled=no



    / ip route

    add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 routing-mark=ode \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 comment="" \
    disabled=no


    eu so declaro o route dos modem e nat tbm??? eu tenho que declara a route do cliente e fazer o mascarade para os clientes tbm neh ??? a interface clientes.. q eh 192.168.0.1 correto neh ?


    Citação Postado originalmente por Giovani.couto Ver Post
    3 ADSL

    1x1x1 no nth



    você tem que ter 4 placas de rede na maquina !


    / ip address

    add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=ether1 comment="" \
    disabled=no

    add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=ether2 \
    comment="" disabled=no

    add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=ether3 \
    comment="" disabled=no

    add address=10.113.0.2/24 network=10.113.0.0 broadcast=10.113.0.255 interface=ether4 \
    comment="" disabled=no



    / ip firewall mangle

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,0 \
    action=mark-connection new-connection-mark=odd passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=odd action=mark-routing \
    new-routing-mark=odd passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,1 \
    action=mark-connection new-connection-mark=even passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=even action=mark-routing \
    new-routing-mark=even passthrough=no comment="" disabled=no

    add chain=prerouting in-interface=ether1 connection-state=new nth=2,1,2 \
    action=mark-connection new-connection-mark=ode passthrough=yes comment="" \
    disabled=no

    add chain=prerouting in-interface=ether1 connection-mark=ode action=mark-routing \
    new-routing-mark=ode passthrough=no comment="" disabled=no


    / ip firewall nat

    add chain=srcnat connection-mark=odd action=src-nat to-addresses=10.111.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=even action=src-nat to-addresses=10.112.0.2 \
    to-ports=0-65535 comment="" disabled=no

    add chain=srcnat connection-mark=ode action=src-nat to-addresses=
    10.113.0.2 \
    to-ports=0-65535 comment="" disabled=no



    / ip route

    add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=odd \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.112.0.1 scope=255 target-scope=10 routing-mark=even \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 routing-mark=ode \
    comment="" disabled=no

    add dst-address=0.0.0.0/0 gateway=10.113.0.1 scope=255 target-scope=10 comment="" \
    disabled=no


    Sobre msn e bancos é simples !


    Faça marcação dos pacotes por porta ou range de ip em mangle e mande sair por mais uma marcação route !


    Resumindo !

    /ip route

    add dst-address=0.0.0.0/0 gateway=10.111.0.1 scope=255 target-scope=10 routing-mark=nobres \
    comment="" disabled=no


    /ip firewall mangle


    add chain=prerouting protocol=tcp dst-port=443 action=mark-routing new-routing-mark=nobres passthrough=yes comment="" disabled=no

    add chain=prerouting in-interface=ethe1 routing-mark=nobres action=mark-packet new-packet-mark=nobres passthrough=yes comment="" disabled=no

    Qualquer coisa posta ai !






Tópicos Similares

  1. RB 450g e 750 - Balanceamento entre links
    Por geovaneboth no fórum Redes
    Respostas: 22
    Último Post: 06-04-2016, 16:36
  2. Balanceamento de carga entre links com iproute2 - mini-howto
    Por PEdroArthurJEdi no fórum Servidores de Rede
    Respostas: 33
    Último Post: 29-10-2011, 21:55
  3. Balanceamento entre 3 link + squid
    Por brunophsp no fórum Redes
    Respostas: 4
    Último Post: 12-08-2010, 21:47
  4. Hotspot + Balanceamento entre 2 Links
    Por romeudu no fórum Redes
    Respostas: 2
    Último Post: 25-01-2009, 23:22
  5. Balanceamento entre links
    Por jairof no fórum Servidores de Rede
    Respostas: 3
    Último Post: 23-06-2004, 22:35

Visite: BR-Linux ·  VivaOLinux ·  Dicas-L