Mikrotik Balanceamento de carga

Avatar do usuário
Luis Robles
Global Moderator
Global Moderator
Mensagens: 27
Registrado em: 11 Jun 2013 22:32
Localização: Lima
Idade: 36
Status: Offline

Mikrotik Balanceamento de carga

Mensagem por Luis Robles »

Olá, depois de muito tempo voltei a entrar no fórum. Desta vez, será sobre problemas de Mikrotik.

O seguinte balanceamento de carga está no PCC, considere as seguintes notas:

WAN1 = ether1
WAN2= ether2
LAN = ether5

******** A LAN pode ser considerada dentro de uma ponte (Bridge).


/ip address
add address=192.168.1.254/24 network=192.168.1.1 interface=ether1
add address=192.168.2.254/24 network=192.168.2.1 interface=ether2
add address=192.168.10.1/24 network=192.168.10.1 interface=ether5

MANGLE:

/ip firewall mangle
add chain=input in-interface=ether1 action=mark-connection new-connection-mark=wan1_conn
add chain=input in-interface=ether2 action=mark-connection new-connection-mark=wan2_conn
add chain=output connection-mark=wan1_conn action=mark-routing new-routing-mark=to_wan1
add chain=output connection-mark=wan2_conn action=mark-routing new-routing-mark=to_wan2
add chain=prerouting dst-address=192.168.1.0/24 action=accept in-interface=ether5
add chain=prerouting dst-address=192.168.2.0/24 action=accept in-interface=ether5
add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=wan1_conn passthrough=yes
add chain=prerouting dst-address-type=!local in-interface=ether5 per-connection-classifier=both-addresses:2/2 action=mark-connection new-connection-mark=wan2_conn passthrough=yes
add chain=prerouting connection-mark=wan1_conn in-interface=ether5 action=mark-routing new-routing-mark=to_wan1
add chain=prerouting connection-mark=wan2_conn in-interface=ether5 action=mark-routing new-routing-mark=to_wan2

RUTAS
/ip route
add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_wan1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_wan2 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.1.1 distance=1 check-gateway=ping
add dst-address=0.0.0.0/0 gateway=192.168.2.1 distance=2 check-gateway=ping


/ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade
add chain=srcnat out-interface=ether2 action=masquerade

Saludos.



Voltar para “Tutoriais”