+ Responder ao Tópico



  1. #1

    Padrão Nth + Bonding!!!

    Tenho 4 links aqui, a minha idéia é pegar 2 links e colocar para http e outros servicos, 1 link para p2p, e o outro para o resto. Mas como eu dividiria o http entre 2 links pppoe??? Vlws!!

  2. #2

    Padrão Re: Nth + Bonding!!!

    Amigo,

    Você poderia fazer a marcação do serviços http, p2p e "resto" no mangle e usaria o pcc pra distribuir. Se os links forem simetricos fica simples, ok?

    Abs.



  3. #3

    Padrão Re: Nth + Bonding!!!

    Opa guilherme vlws pela resposta, entao mas como isso seria feito??Nao tenho nem ideia, sou novo em mikrotik,sempre usei linux, entao estou me adaptando ainda..teria como vc me ajudar??segue aqui o meu script que roda hoje...
    Código :
    /ip address add address=201.xxx.xxx.xxx/29 interface=ether2
    # interface pppoe-client ------------------------------------------------
    /interface pppoe-client add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 dial-on-demand=no disabled=no interface=ether3 max-mru=1480 max-mtu=1480 mrru=disabled name=ether3adsl password=pass profile=default service-name="" use-peer-dns=no user=user
    /interface pppoe-client add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 dial-on-demand=no disabled=no interface=ether4 max-mru=1480 max-mtu=1480 mrru=disabled name=ether4adsl password=pass profile=default service-name="" use-peer-dns=no user=user
    /interface pppoe-client add ac-name="" add-default-route=no allow=pap,chap,mschap1,mschap2 dial-on-demand=no disabled=no interface=ether5 max-mru=1480 max-mtu=1480 mrru=disabled name=ether5adsl password=pass profile=default service-name="" use-peer-dns=no user=user
    # ip dns ----------------------------------------------------------------
    /ip dns set primary-dns=192.168.0.1
    /ip dns set secondary-dns=201.10.128.3
    /ip dns static add address=192.168.0.1 comment="" disabled=no name=192.168.0.1.dns.com.br ttl=1d
    # ip firewall Filter-----------------------------------------------------
    /ip firewall filter add action=accept chain=input disabled=no in-interface=!ether2 src-address=192.168.0.1/24
    # ip firewall nat--------------------------------------------------------
    /ip firewall nat add action=masquerade chain=srcnat disabled=no out-interface=ether2
    /ip firewall nat add action=masquerade chain=srcnat disabled=no out-interface=ether3adsl
    /ip firewall nat add action=masquerade chain=srcnat disabled=no out-interface=ether4adsl
    /ip firewall nat add action=masquerade chain=srcnat disabled=no out-interface=ether5adsl
    # ip firewall mangle-----------------------------------------------------
    /ip firewall mangle add action=accept chain=prerouting comment="HTTPS FORA DO LOADBALACED" disabled=no protocol=tcp dst-port=443 in-interface=ether1
    /ip firewall mangle add action=accept chain=prerouting comment="FORA DO LOADBALACED" disabled=no dst-address-list=loopback in-interface=ether1
    /ip firewall mangle add action=change-ttl chain=forward comment="Filtro Tracert / Traceroute" disabled=no new-ttl=set:30 protocol=icmp
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no in-interface=ether2 new-connection-mark=ether2_conn passthrough=yes
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no in-interface=ether3adsl new-connection-mark=ether3adsl_conn passthrough=yes
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no in-interface=ether4adsl new-connection-mark=ether4adsl_conn passthrough=yes
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no in-interface=ether5adsl new-connection-mark=ether5adsl_conn passthrough=yes
    /ip firewall mangle add action=mark-routing chain=output connection-mark=ether2_conn disabled=no new-routing-mark=to_ether2 passthrough=yes
    /ip firewall mangle add action=mark-routing chain=output connection-mark=ether3adsl_conn disabled=no new-routing-mark=to_ether3adsl passthrough=yes
    /ip firewall mangle add action=mark-routing chain=output connection-mark=ether4adsl_conn disabled=no new-routing-mark=to_ether4adsl passthrough=yes
    /ip firewall mangle add action=mark-routing chain=output connection-mark=ether5adsl_conn disabled=no new-routing-mark=to_ether5adsl passthrough=yes
    /ip firewall mangle add action=accept chain=prerouting disabled=no dst-address=xxx.xxx.xxx.xxx/29 in-interface=ether1
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=ether2_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:5/0
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=ether3adsl_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:5/1
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=ether4adsl_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:5/2
    /ip firewall mangle add action=mark-connection chain=prerouting disabled=no dst-address-type=!local in-interface=ether1 new-connection-mark=ether5adsl_conn passthrough=yes per-connection-classifier=both-addresses-and-ports:5/3
    /ip firewall mangle add action=mark-routing chain=prerouting connection-mark=ether2_conn disabled=no in-interface=ether1 new-routing-mark=to_ether2 passthrough=yes
    /ip firewall mangle add action=mark-routing chain=prerouting connection-mark=ether3adsl_conn disabled=no in-interface=ether1 new-routing-mark=to_ether3adsl passthrough=yes
    /ip firewall mangle add action=mark-routing chain=prerouting connection-mark=ether4adsl_conn disabled=no in-interface=ether1 new-routing-mark=to_ether4adsl passthrough=yes
    /ip firewall mangle add action=mark-routing chain=prerouting connection-mark=ether5adsl_conn disabled=no in-interface=ether1 new-routing-mark=to_ether5adsl passthrough=yes
    # ip route---------------------------------------------------------------
    /ip route add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway=xxx.xx.xxx.xxx routing-mark=to_ether2 comment="Link1"
    /ip route add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=ether3adsl routing-mark=to_ether3adsl comment="Link2"
    /ip route add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=ether4adsl routing-mark=to_ether4adsl comment="Link3"
    /ip route add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=ether5adsl routing-mark=to_ether5adsl comment="Link4"
    /ip route add check-gateway=ping comment="Link1" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=201.xxx.xxx.xxx scope=30 target-scope=10
    /ip route add comment="Link2" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=ether3adsl scope=30 target-scope=10
    /ip route add comment="Link3" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=ether4adsl scope=30 target-scope=10
    /ip route add comment="Link4" disabled=no distance=4 dst-address=0.0.0.0/0 gateway=ether5adsl scope=30 target-scope=10
    # ip firewall address-list-----------------------------------------------
    /ip firewall address-list add address=200.155.80.0-200.155.255.255 comment=BRADESCO disabled=no list=loopback
    /ip firewall address-list add address=200.220.186.0/24 comment=BRADESCO disabled=no list=loopback
    /ip firewall address-list add address=200.220.178.0/24 comment=BRADESCO disabled=no list=loopback
    /ip firewall address-list add address=64.38.29.0/24 comment=RapidShare disabled=no list=loopback
    /ip firewall address-list add address=208.69.32.0/24 comment="" disabled=no list=loopback
    /ip firewall address-list add address=208.67.217.0/24 comment="" disabled=no list=loopback
    /ip firewall address-list add address=201.7.178.0/24 comment="" disabled=no list=loopback
    /ip firewall address-list add address=201.7.176.0/24 comment="" disabled=no list=loopback
    /ip firewall address-list add address=200.159.128.0/24 comment=BRADESCO disabled=no list=loopback
    /ip firewall address-list add address=201.7.176.0/20 comment="Vídeos - Globo" disabled=no list=loopback
    /ip firewall address-list add address=208.84.247.0/24 comment="Vídeos - terratv" disabled=no list=loopback
    /ip firewall address-list add address=200.154.56.0/24 comment="Vídeos - terratv" disabled=no list=loopback
    /ip firewall address-list add address=200.201.160.0/24 comment="Caixa Economica Federal" disabled=no list=loopback
    /ip firewall address-list add address=200.201.166.0/24 comment="" disabled=no list=loopback
    /ip firewall address-list add address=200.201.173.0/24 comment="" disabled=no list=loopback
    /ip firewall address-list add address=200.201.174.0/24 comment="" disabled=no list=loopback
    /ip firewall address-list add address=200.141.207.3 comment=Detran disabled=no list=loopback

    Se puder me ajudar ficaria grato!!!
    Última edição por osmano807; 29-05-2010 às 15:26. Razão: Colocação de tags code

  4. #4

    Padrão Re: Nth + Bonding!!!

    Amigo essa configuração que você postou é PCC. Tem um post do Luciano que tem bastante material sobre pcc. Qualquer duvida posta ai pra gente. t+



  5. #5

    Padrão Re: Nth + Bonding!!!

    Entao exato,pq o amigo ai em cima disse para usar pcc para distribuir.Eu tava pensando em fazer o seguinte, vc viu la em cima q tem o fora do loadbalance ne???Entao essee ai e o q o script pcc gerou, estava pensando em marcar em mangle e adicionar a rota la em fora do loadbalance, e programar o pcc para dois links, ou seja todo o resto, sera q daria certo??? Eu ja vi varias formas de balanceamento, com mark routing, mark packet, qual eu deveria usar??? Grato!!

  6. #6

    Padrão Re: Nth + Bonding!!!

    Amigo se você adicionar os ip´s que você qrer q sai por um link somente, so adicionar la e ele vai sair pela rota default.