+ Responder ao Tópico



  1. #1

    Padrão LoadBalance escolha da rota principal

    Bom dia a todos, estou com um pequeno probleminha, fiz um load balance, está funcionando bem, porém meu cenário é o seguinte aqui na empresa:

    ISP1 : 50Mb
    ISP2 : 10Mb
    ISP3 : 10Mb

    Eu gostaria que maioria do trafego saísse pelo link 1, já que ele tem mais taixa de down e up, porém o load balance PCC ta dando prioridade a os links de 10Mb

    To colocando uma SS, da route list e das interfaces. Quem poder me da a dica agradeço bastante.
    Segue abaixo.
    Clique na imagem para uma versão maior

Nome:	         routes.jpg
Visualizações:	148
Tamanho: 	86,9 KB
ID:      	49767

    O que devo fazer?

  2. #2

    Padrão Re: LoadBalance escolha da rota principal

    Citação Postado originalmente por robertojr2k Ver Post
    Bom dia a todos, estou com um pequeno probleminha, fiz um load balance, está funcionando bem, porém meu cenário é o seguinte aqui na empresa:

    ISP1 : 50Mb
    ISP2 : 10Mb
    ISP3 : 10Mb

    Eu gostaria que maioria do trafego saísse pelo link 1, já que ele tem mais taixa de down e up, porém o load balance PCC ta dando prioridade a os links de 10Mb

    To colocando uma SS, da route list e das interfaces. Quem poder me da a dica agradeço bastante.
    Segue abaixo.
    Clique na imagem para uma versão maior

Nome:	         routes.jpg
Visualizações:	148
Tamanho: 	86,9 KB
ID:      	49767

    O que devo fazer?
    Amigo,

    As distancias na sua tabela de rota estão erradas. Seguindo na ordem da foto, as distâncias teriam que ser:
    2
    3
    4
    1
    1
    1

    Poste suas regras do /ip firewall mangle...



  3. #3

    Padrão Re: LoadBalance escolha da rota principal

    Poste suas regras isso pode ser só, o balanceamento das cargas.

    E ajeita as rotas como o amigo a cima falou..

  4. #4

    Padrão Re: LoadBalance escolha da rota principal

    Opa corrigi lá a distâncias dos links, e continuam do mesmo modo, sempre dando prioridade a o ISP2 e ISP3, e o ISP1 não puxa quase nada, tendo 50mb de disponibilidade.


    IP route list

    Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit
    # DST-ADDRESS PREF-SRC GATEWAY DISTANCE
    0 A S 0.0.0.0/0 192.168.25.1 1
    1 A S 0.0.0.0/0 10.2.1.1 1
    2 A S 0.0.0.0/0 10.3.1.1 1
    3 A S 0.0.0.0/0 192.168.25.1 2
    4 S 0.0.0.0/0 10.2.1.1 3
    5 S 0.0.0.0/0 10.3.1.1 4
    6 ADC 10.2.1.0/24 10.2.1.2 ISP2 0



    IP Firewall Mangle
    0 ;;; -------------------------------------
    chain=prerouting action=accept src-address=192.168.88.0/24 dst-address=192.168.88.0/24

    1 chain=prerouting action=accept src-address=192.168.88.0/24 dst-address=192.168.25.0/24

    2 chain=prerouting action=accept src-address=192.168.88.0/24 dst-address=10.2.1.0/24

    3 chain=prerouting action=accept src-address=192.168.88.0/24 dst-address=10.3.1.0/24

    4 ;;; -------------
    chain=prerouting action=mark-connection new-connection-mark=ISP1_conn passthrough=yes in-interface=ISP1 connection-mark=no-mark

    5 chain=prerouting action=mark-connection new-connection-mark=ISP2_conn passthrough=yes in-interface=ISP2 connection-mark=no-mark

    6 chain=prerouting action=mark-connection new-connection-mark=ISP3_conn passthrough=yes in-interface=ISP3 connection-mark=no-mark

    7 ;;; ------------------------
    chain=prerouting action=jump jump-target=policy_router in-interface=Local connection-mark=no-mark

    8 ;;; ------------------------------
    chain=prerouting action=mark-routing new-routing-mark=ISP1_Traffic passthrough=yes src-address=192.168.88.0/24 connection-mark=ISP1_conn

    9 chain=prerouting action=mark-routing new-routing-mark=ISP2_Traffic passthrough=yes src-address=192.168.88.0/24 connection-mark=ISP2_conn

    10 chain=prerouting action=mark-routing new-routing-mark=ISP3_Traffic passthrough=yes src-address=192.168.88.0/24 connection-mark=ISP3_conn

    11 chain=output action=mark-routing new-routing-mark=ISP1_Traffic passthrough=yes connection-mark=ISP1_conn

    12 chain=output action=mark-routing new-routing-mark=ISP2_Traffic passthrough=yes connection-mark=ISP2_conn

    13 chain=output action=mark-routing new-routing-mark=ISP3_Traffic passthrough=yes connection-mark=ISP3_conn

    14 ;;; ---------
    chain=policy_router action=mark-connection new-connection-mark=ISP1_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/0

    15 chain=policy_router action=mark-connection new-connection-mark=ISP2_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/1

    16 chain=policy_router action=mark-connection new-connection-mark=ISP3_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/2



  5. #5

    Padrão Re: LoadBalance escolha da rota principal

    Seu problema esta aqui nessa regras você deve somar os links e dividir pelo maior, olhe esse tópico que vai entender

    https://under-linux.org/showthread.php?t=131343

    14 ;;; ---------
    chain=policy_router action=mark-connection new-connection-mark=ISP1_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/0

    15 chain=policy_router action=mark-connection new-connection-mark=ISP2_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/1

    16 chain=policy_router action=mark-connection new-connection-mark=ISP3_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/2[/QUOTE]

  6. #6

    Padrão Re: LoadBalance escolha da rota principal

    Citação Postado originalmente por wagnersn Ver Post
    Seu problema esta aqui nessa regras você deve somar os links e dividir pelo maior, olhe esse tópico que vai entender

    https://under-linux.org/showthread.php?t=131343

    14 ;;; ---------
    chain=policy_router action=mark-connection new-connection-mark=ISP1_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/0

    15 chain=policy_router action=mark-connection new-connection-mark=ISP2_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/1

    16 chain=policy_router action=mark-connection new-connection-mark=ISP3_conn passthrough=yes dst-address-type=!local per-connection-classifier=both-addresses:3/2
    [/QUOTE]

    Como o amigo Wagner disse, o problema estava não só nas rotas, o seu classificador também está errado. Verificando o link mencionado não tem erro.



  7. #7

    Padrão Re: LoadBalance escolha da rota principal

    amigo tb to com problema diferente dele
    eu preciso alterar rotar default, como faco isso ??


    /ip route
    add comment=ROTA_DEDICADO disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    187.17.50.49 routing-mark=to_nra scope=30 target-scope=10
    add comment=ROTA_GVT disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    192.168.88.1 routing-mark=to_nrb scope=30 target-scope=10
    add comment=ROTA_OI disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    200.223.97.145 routing-mark=to_nra2 scope=30 target-scope=10
    add comment=Rota1 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    4-Dsl-Dedicado-OI routing-mark=Rota1 scope=30 target-scope=10
    add comment=Rota0 disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    3-Dsl-Gvt routing-mark=Rota0 scope=30 target-scope=10
    add comment=ROTA_DEDICADO disabled=no distance=1 dst-address=0.0.0.0/0 gateway=\
    187.17.50.49 scope=30 target-scope=10
    add comment=ROTA_GVT disabled=no distance=2 dst-address=0.0.0.0/0 gateway=\
    192.168.88.1 scope=30 target-scope=10
    add comment=ROTA_OI disabled=no distance=3 dst-address=0.0.0.0/0 gateway=\
    200.223.97.145 scope=30 target-scope=10
    /ip firewall mangle
    add action=accept chain=prerouting comment="SEM BALANCE" disabled=no \
    dst-address-list=sem_balance in-interface=1-LOCAL
    add action=accept chain=prerouting comment="SEM BALANCE HTTPS" disabled=no \
    dst-port=443 in-interface=1-LOCAL protocol=tcp
    add action=mark-connection chain=input comment="///// LOAD BALANCE PCC /////" \
    connection-state=new disabled=no in-interface=2-Dedicado \
    new-connection-mark=conn_na passthrough=yes
    add action=mark-connection chain=input connection-state=new disabled=no \
    in-interface=4-Dsl-Dedicado-OI new-connection-mark=conn_na2 passthrough=yes
    add action=mark-connection chain=input connection-state=new disabled=no \
    in-interface=3-Dsl-Gvt new-connection-mark=conn_nb passthrough=yes
    add action=mark-routing chain=output comment=X connection-mark=conn_na \
    disabled=no new-routing-mark=to_ra passthrough=no
    add action=mark-routing chain=output connection-mark=conn_na2 disabled=no \
    new-routing-mark=to_ra2 passthrough=no
    add action=mark-routing chain=output connection-mark=conn_nb disabled=no \
    new-routing-mark=to_rb passthrough=no
    add action=mark-connection chain=prerouting comment=CONN disabled=no \
    dst-address-type=!local in-interface=1-LOCAL new-connection-mark=conn_ma0 \
    passthrough=yes per-connection-classifier=both-addresses:8/0
    add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
    in-interface=1-LOCAL new-connection-mark=conn_ma0 passthrough=yes \
    per-connection-classifier=both-addresses:8/1
    add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
    in-interface=1-LOCAL new-connection-mark=conn_ma0 passthrough=yes \
    per-connection-classifier=both-addresses:8/2
    add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
    in-interface=1-LOCAL new-connection-mark=conn_ma1 passthrough=yes \
    per-connection-classifier=both-addresses:8/3
    add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
    in-interface=1-LOCAL new-connection-mark=conn_mb1 passthrough=yes \
    per-connection-classifier=both-addresses:8/4
    add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
    in-interface=1-LOCAL new-connection-mark=conn_mb1 passthrough=yes \
    per-connection-classifier=both-addresses:8/5
    add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
    in-interface=1-LOCAL new-connection-mark=conn_mb1 passthrough=yes \
    per-connection-classifier=both-addresses:8/6
    add action=mark-connection chain=prerouting disabled=no dst-address-type=!local \
    in-interface=1-LOCAL new-connection-mark=conn_mb1 passthrough=yes \
    per-connection-classifier=both-addresses:8/7
    add action=mark-routing chain=prerouting comment=ROUTING connection-mark=\
    conn_ma0 disabled=no in-interface=1-LOCAL new-routing-mark=to_nra \
    passthrough=no
    add action=mark-routing chain=prerouting connection-mark=conn_mb1 disabled=no \
    in-interface=1-LOCAL new-routing-mark=to_nrb passthrough=no
    add action=mark-routing chain=prerouting connection-mark=conn_ma1 disabled=no \
    in-interface=1-LOCAL new-routing-mark=to_nra2 passthrough=no