#  > Telecomunicações >  > Mikrotik >  >  Balance Nth

## kurole

Olá fiz um balance com 2 links iguais, porem o balance puxa 75% (ether1) de um link e 25%(ether2) do outro pq isso acontece..

Seque as configurações

/ip firewall mangle
add action=mark-connection chain=prerouting connection-state=new new-connection-mark=internet_ether1 nth=2,1 passthrough=yes src-address=10.0.0.0/24
add action=mark-connection chain=prerouting connection-state=new new-connection-mark=internet_ether2 nth=2,2 passthrough=yes src-address=10.0.0.0/24
add action=mark-routing chain=prerouting connection-mark=internet_ether1 new-routing-mark=rota_link_ether1 passthrough=yes src-address=10.0.0.0/24
add action=mark-routing chain=prerouting connection-mark=internet_ether2 new-routing-mark=rota_link_ethe2 passthrough=yes src-address=10.0.0.0/24

/ip route

add check-gateway=ping comment=aaa_lb1 distance=1 gateway=192.168.0.1 routing-mark=rota_link_ether1
add check-gateway=ping comment=aaa_lb1 distance=1 gateway=192.168.1.254 routing-mark=rota_link_ethe2
add check-gateway=ping comment=aaa_lb1 distance=1 gateway=192.168.0.1
add comment=aaa_lb1 distance=2 gateway=192.168.1.254

/ip firewall nat
add action=masquerade chain=srcnat src-address=10.0.0.0/24
add action=masquerade chain=srcnat src-address=20.0.0.0/24



/ip address
add address=192.168.0.101/24 interface=ether1 network=192.168.0.0
add address=192.168.1.102/24 interface=ether2 network=192.168.1.0

Abraços
Marco

----------


## muttley

/ip firewall mangle
add action=mark-routing chain=prerouting disabled=yes dst-address-type=!local \
new-routing-mark=Rota-1 passthrough=no per-connection-classifier=\
src-address:2/0
add action=mark-routing chain=prerouting disabled=yes dst-address-type=!local \
new-routing-mark=Rota-1 passthrough=no per-connection-classifier=\
src-address:2/1



/ip route
add check-gateway=ping comment="Rota padrão link 1-marcando rota" distance=1 gateway=192.168.3.1 routing-mark=Rota-1
add check-gateway=ping comment="Rota padrão link 2-marcando rota" distance=1 gateway=pppoe-out2 routing-mark=Rota-2
add check-gateway=ping comment="Rota padrão link 1" distance=2 gateway=192.168.3.1
add check-gateway=ping comment="Rota padrão link 2" distance=3 gateway=pppoe-out2



192.168.3.1 é o ip do modem (roteado) que eu tenho, coloque o seu ip, a sua faixa de ip.
pppoe-out2 é o meu segundo modem. (em bridge).

===================
Eu uso assim! Mas em breve vou mudar!

----------

