[QUOTE=m4d3;432038]PCC LOADBALANCE - 3 LINKS SIMÉTRICOS (TESTADO DE 2 ATÉ 16 LINKS)
MKV: 3.x
MKR: 3.28
EthLinkA = Interface do primeiro link
EthLinkB = Interface do segundo link
EthLinkC = Interface do terceiro link
EthClientes = Interface dos clientes
#################################
Instalado e rodando até agora 1000%.
Obrigado Luciano e Andre Prinou !!!!
Alguém que saiba o que está acontecendo favor postar aí. Tem várias pessoas com o mesmo problema de um link estar alto enquanto o outro fica la embaixo. O pessoal que entende bem e pode ajudar não fala nada.
amigos, o meu agora ta rodando beleza, to com problemas somente na questão de bancos, to desde ontem a madrugada, pesquisando, e não conseguir achar uma solução ..
eu já criei a lista (sem balance) mas agora, não conseguir descobrir com exatidão os ips do B.Brasil por exemplo ..
amigo, mudei as minhas regras, que era de acordo com o wiki da mikrotik, mas não rodava junto com o hotspot para usar igual as do m4d3, com a difereça que adptei para 2 links, vou postar abaixo meu ,firewall mangle,nat, route ,ip address, para que vocês possa olhar e ver o que tem de errado ..
Código :/ip address add address=172.16.0.254/24 broadcast=172.16.0.255 comment="Rede Local - Clientes Prefeitura" disabled=no interface="Rede Local" network=\ 172.16.0.0 add address=189.80.16.82/29 broadcast=189.80.16.87 comment="Ip Link 256" disabled=no interface="Oi UP 256" network=189.80.16.80 add address=189.80.219.82/29 broadcast=189.80.219.87 comment="Ip Link 512" disabled=no interface="Oi UP 512" network=189.80.219.80 add address=10.10.10.1/24 broadcast=10.10.10.255 comment="Rede Local - Clientes Rua" disabled=no interface="Rede Local" network=10.10.10.0
Código :/ip firewall mangle add action=mark-connection chain=forward comment="" disabled=no new-connection-mark=conexao-p2p p2p=all-p2p passthrough=yes add action=mark-packet chain=forward comment="" connection-mark=conexao-p2p disabled=no new-packet-mark=pacotes-p2p passthrough=no add action=accept chain=prerouting comment="SEM BALANCE" disabled=no dst-address-list=sem_balance in-interface="Rede Local" add action=mark-connection chain=input comment="" connection-state=new disabled=no in-interface="Oi UP 256" new-connection-mark=conn_na \ passthrough=yes add action=mark-connection chain=input comment="" connection-state=new disabled=no in-interface="Oi UP 512" new-connection-mark=conn_na \ passthrough=yes add action=mark-routing chain=output comment="" connection-mark=conn_na disabled=no new-routing-mark=to_ra passthrough=no add action=mark-routing chain=output comment="" connection-mark=conn_nb disabled=no new-routing-mark=to_rb passthrough=no add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface="Rede Local" new-connection-mark=conn_ma0 \ passthrough=yes per-connection-classifier=both-addresses:2/0 add action=mark-connection chain=prerouting comment="" disabled=no dst-address-type=!local in-interface="Rede Local" new-connection-mark=conn_mb1 \ passthrough=yes per-connection-classifier=both-addresses:2/1 add action=mark-routing chain=prerouting comment="" connection-mark=conn_ma0 disabled=no in-interface="Rede Local" new-routing-mark=to_nra \ passthrough=no add action=mark-routing chain=prerouting comment="" connection-mark=conn_mb1 disabled=no in-interface="Rede Local" new-routing-mark=to_nrb \ passthrough=no
Código :/ip firewall nat add action=passthrough chain=unused-hs-chain comment="place hotspot rules here" disabled=yes add action=masquerade chain=srcnat comment="masquerade hotspot network" disabled=no src-address=10.10.10.0/24 add action=redirect chain=dstnat comment="Redirecionar para Proxy" disabled=yes dst-address-list=sem_proxy dst-port=80 protocol=tcp to-ports=8080 add action=masquerade chain=srcnat comment="MASCARAMENTO PCC" disabled=no out-interface="Oi UP 512" add action=masquerade chain=srcnat comment="" disabled=no out-interface="Oi UP 256" add action=masquerade chain=srcnat comment="" disabled=no
Código :/ip route add comment="" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=189.80.219.81 scope=30 target-scope=10 add comment="" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=189.80.16.81 scope=30 target-scope=10 add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=189.80.219.81 routing-mark=to_nra scope=30 target-scope=10 add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=189.80.16.81 routing-mark=to_nrb scope=30 target-scope=10
Amigo exclusivenet, faça as modificções do seu PCC para igual a este que vou postar a vc abaixo.
Código :/ip firewall mangle add action=mark-connection chain=input comment="Mark new inbound connection wan1" connection-state=new disabled=no in-interface=wan1-pppoe new-connection-mark=wan1 \ passthrough=yes add action=mark-connection chain=input comment="Mark new inbound connection wan2" connection-state=new disabled=no in-interface=wan2-pppoe new-connection-mark=wan2 \ passthrough=yes add action=mark-connection chain=input comment="Mark new inbound connection wan3" connection-state=new disabled=no in-interface=wan3-pppoe new-connection-mark=wan3 \ passthrough=yes add action=mark-connection chain=prerouting comment="Mark established inbound connection wan1" connection-state=established disabled=no in-interface=wan1-pppoe \ new-connection-mark=wan1 passthrough=yes add action=mark-connection chain=prerouting comment="Mark established inbound connection wan2" connection-state=established disabled=no in-interface=wan2-pppoe \ new-connection-mark=wan2 passthrough=yes add action=mark-connection chain=prerouting comment="Mark established inbound connection wan3" connection-state=established disabled=no in-interface=wan3-pppoe \ new-connection-mark=wan3 passthrough=yes add action=mark-connection chain=prerouting comment="Mark related inbound connection wan1" connection-state=related disabled=no in-interface=wan1-pppoe \ new-connection-mark=wan2 passthrough=yes add action=mark-connection chain=prerouting comment="Mark related inbound connection wan2" connection-state=related disabled=no in-interface=wan2-pppoe \ new-connection-mark=wan2 passthrough=yes add action=mark-connection chain=prerouting comment="Mark related inbound connection wan3" connection-state=related disabled=no in-interface=wan3-pppoe \ new-connection-mark=wan3 passthrough=yes add action=mark-routing chain=output comment="Mark new inbound route wan1" connection-mark=wan1 disabled=no new-routing-mark=wan1 passthrough=no add action=mark-routing chain=output comment="Mark new inbound route wan2" connection-mark=wan2 disabled=no new-routing-mark=wan2 passthrough=no add action=mark-routing chain=output comment="Mark new inbound route wan3" connection-mark=wan3 disabled=no new-routing-mark=wan3 passthrough=no add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=new disabled=no \ dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/0 add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=new disabled=no \ dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/1 add action=mark-connection chain=prerouting comment="Mark traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=new disabled=no \ dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan3_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/2 add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=\ established disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=\ both-addresses:3/0 add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=\ established disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=\ both-addresses:3/1 add action=mark-connection chain=prerouting comment="Mark established traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=\ established disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan3_pcc_conn passthrough=yes per-connection-classifier=\ both-addresses:3/2 add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 1" connection-state=related \ disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan1_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/0 add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 2" connection-state=related \ disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan2_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/1 add action=mark-connection chain=prerouting comment="Mark related traffic that isn't local with PCC mark rand (3 possibilities) - option 3" connection-state=related \ disabled=no dst-address-type=!local in-interface=hotspot-bridge new-connection-mark=wan3_pcc_conn passthrough=yes per-connection-classifier=both-addresses:3/2 add action=mark-routing chain=prerouting comment="Mark routing for PCC mark - option 1" connection-mark=wan1_pcc_conn disabled=no new-routing-mark=wan1 passthrough=\ yes add action=mark-routing chain=prerouting comment="Mark routing for PCC mark - option 2" connection-mark=wan2_pcc_conn disabled=no new-routing-mark=wan2 passthrough=\ yes add action=mark-routing chain=prerouting comment="Mark routing for PCC mark - option 3" connection-mark=wan3_pcc_conn disabled=no new-routing-mark=wan3 passthrough=\ yes
Última edição por tiagomatias; 25-09-2009 às 17:28.
Segue aí pessoal
/ip firewall mangle
add action=accept chain=prerouting comment="SEM BALANCE" disabled=no \
dst-address-list=sem_balance in-interface=EthClientes
add action=mark-connection chain=input comment="" connection-state=new \
disabled=no in-interface=EthLinkA new-connection-mark=conn_na \
passthrough=yes
add action=mark-connection chain=input comment="" connection-state=new \
disabled=no in-interface=EthLinkB new-connection-mark=conn_nb \
passthrough=yes
add action=mark-routing chain=output comment="" connection-mark=conn_na \
disabled=no new-routing-mark=to_ra passthrough=no
add action=mark-routing chain=output comment="" connection-mark=conn_nb \
disabled=no new-routing-mark=to_rb passthrough=no
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=EthClientes new-connection-mark=\
conn_ma0 passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="" disabled=no \
dst-address-type=!local in-interface=EthClientes new-connection-mark=\
conn_mb1 passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-routing chain=prerouting comment="" connection-mark=conn_ma0 \
disabled=no in-interface=EthClientes new-routing-mark=to_nra passthrough=\
no
add action=mark-routing chain=prerouting comment="" connection-mark=conn_mb1 \
disabled=no in-interface=EthClientes new-routing-mark=to_nrb passthrough=\
no
/ip firewall nat
add action=accept chain=srcnat comment="MASCARAMENTO PCC" disabled=no \
out-interface=EthLinkA
add action=masquerade chain=srcnat comment="" disabled=no out-interface=\
EthLinkB
add action=masquerade chain=srcnat comment="MASCARAMENTO PCC" disabled=no \
src-address=10.1.1.0/24
/ip route
add comment="" disabled=no distance=2 dst-address=0.0.0.0/0 gateway=EthLinkA
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=EthLinkA \
routing-mark=to_nra
add comment="" disabled=no distance=3 dst-address=0.0.0.0/0 gateway=EthLinkB
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=EthLinkB \
routing-mark=to_nrb
/ip address
add address=10.1.1.1/24 broadcast=10.1.1.255 comment="" disabled=no \
interface=EthClientes network=10.1.1.0
A propósito estou utilizando uma rb450g somente para balanceamento. Minha máquina que faz o controle de mac, banda, proxy etc está com ip 10.1.1.5 Ajuda aí pessoal. Não canso de falar isso.
isso somaria as velocidades dos links, ou ficaria por ex. http para um link, p2p para outro link, etc... ??
Primeiro gostaria de agradecer nosso colega Luciano (M4D3) e ao Andre prinou pela luz no fim do tunel. Estou com o PCC no ar a umas 12 horas, melhorou e muito o acesso aos sites, a resposta esta mais rapida, mas sei q é cedo para elogiar.. farei mais e mais e mais testes. Principalmente por ter o thundercache rodando na rede.
Mas nao consigo acesso externo ao MK onde esta o PCC... nem via winbox, nem ssh...
Gostaria da ajuda dos amigos pra criar a dita regra q habilitaria o acesso remoto.
Grato desde já.
Última edição por paulojrandrade; 25-09-2009 às 21:47.
Aqui amigo do mesmo jeito que o seu, só topa um link, fiz um teste de profile de 12Mbits, (meus links juntos dão 30 Mbits, mas ele não passa dos 9Mbits, porque ele estoura apenas o link da rota com prioridade maior, os outros links deveriam tb repassar abanda e não passa. Algo muito estranho. Lembrando que não tenho um regra se quer nessa rb que não seja as do PCC, ela funcioan exclusivamente como balance, pelo jeito vou ter que comprar uma Balanc da TP-Link.
Amigo marsilba fica complicado ele funcionar corretamente se não se configura corretamente...
vamos aos fatos, quando se configura o mikrotik para discar os modens ADSL/VELOX etc com pppoe-outX as interfaces dos links n é mais a interface q esta conectado ao modem e sim o pppoe-outX que vc definiu para discar o modem. Pensando nesta lógica toda sua configuração aonde tem as interfaces EthLinkX mude para as respectivas interfaces pppoe-outX.
Por isso seu balanceamento estava furado, ele n estava fazendo marcação corretamente.
Em fim só para frisar, mude em toda sua configuração aonde tiver EthLinkX para os pppoe-outX, digo em:
/ip firewall nat
/ip firewall mangle
/ip route
Acredito que agora vc resolve seu problema,
Volto a dizer o PCC é o melhor loadbalaced que a mikrotik tem excelente ferramente, mas lógico que bem configurado, n basta seguir um howto e não se adptar a sua realidade
abraços