This page was exported from Administración y Diseño de Redes Departamentales [ https://redes.noralemilenio.com ]
Export date: Fri Dec 4 17:51:22 2020 / +0000 GMT

Balanceo de Carga usando Router Home Station


Aprovechando que Movistar con "Imagenio", trabaja con dos VLAN una para Imagenio con la IP 10.x.x.x y la otra para Internet con la IP 192.168.x.x. La idea es configurar Mikrotik para usar Balanceo de Carga.

Lo primero es realizar una copia de seguridad de la configuración del Mikrotik para ello vamos a:

Files --> Backup

2015-06-12 09_26_27-admin@192.168.0.1 (MikroTik) - WinBox v6.29.1 on hAP lite (smips)
Recordar! Renombrar las interfaces y realizar comentarios si es necesario para un mejor resultado!

Para realizar el balanceo de carga, usaremos la boca 1 para "Gateway" (192.168.x.x), la boca 2 la llamaremos Imagenio (10.138.x.x), la boca 3 para el Switch o en mi caso un PLC (192.168.0.x)

En "Interfaces" veremos las bocas y podremos cambiar los nombres.

2015-06-12 12_06_41-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

Para asignarles las IP correspondientes utilizaremos:

IP --> Addresses

2015-06-12 12_08_17-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

Debemos configurar el "Mangle" (marcado de paquetes según el puerto de destino) en el "Firewall", para ello utilizaremos "New Terminal" copiaremos y pegaremos las siguientes líneas:

/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=ether3-PLC
add address=192.168.1.2/24 network=192.168.0.0 broadcast=192.168.0.255 interface=ether2-Gateway
add address=10.138.55.243/8 network=10.138.0.0 broadcast=10.138.0.255 interface=ether1-Imagenio

/ ip firewall mangle
add chain=prerouting src-address-list=ether1-Gateway in-interface=ether3-PLC action=mark-connection
new-connection-mark=ether1-Gateway passthrough=yes

add chain=prerouting src-address-list=ether1-Gateway in-interface=ether3-PLC action=mark-routing
new-routing-mark=ether1-Gateway passthrough=no

add chain=prerouting src-address-list=ether2-Imagenio in-interface=ether3-PLC action=mark-connection
new-connection-mark=ether2-Imagenio passthrough=yes

add chain=prerouting src-address-list=ether2-Imagenio in-interface=ether3-PLC action=mark-routing
new-routing-mark=ether2-Imagenio passthrough=no

add chain=prerouting in-interface=ether3-PLC connection-state=new nth=2,1
action=mark-connection new-connection-mark=ether1-Gateway passthrough=yes

add chain=prerouting in-interface=ether3-PLC action=add-src-to-address-list
address-list=ether1-Gateway address-list-timeout=1d connection-mark=ether1-Gateway passthrough=yes

add chain=prerouting in-interface=ether3-PLC connection-mark=ether1-Gateway action=mark-routing
new-routing-mark=ether1-Gateway passthrough=no

add chain=prerouting in-interface=ether3-PLC connection-state=new nth=2,2
action=mark-connection new-connection-mark=ether2-Imagenio passthrough=yes

add chain=prerouting in-interface=ether3-PLC action=add-src-to-address-list
address-list=ether2-Imagenio address-list-timeout=1d connection-mark=ether2-Imagenio passthrough=yes

add chain=prerouting in-interface=ether3-PLC connection-mark=ether2-Imagenio action=mark-routing
new-routing-mark=ether2-Imagenio passthrough=no

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

/ ip route
add dst-address=0.0.0.0/0 gateway=10.138.55.241 scope=255 target-scope=10 routing-mark=ether2-Imagenio
add dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=255 target-scope=10 routing-mark=ether1-Gateway
add dst-address=0.0.0.0/0 gateway=192.168.1.1 scope=255 target-scope=10

En forma gráfica sería:

add chain=prerouting

2015-06-12 12_47_53-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

connection-mark=ether1-Gateway (cambiamos odd por ether1-Gateway)

2015-06-12 12_48_46-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

2015-06-12 12_49_12-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

action=mark-routing=ether1-Gateway (cambiamos odd por ether1-Gateway)

2015-06-12 12_49_31-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

new-connection-mark=ether1-Gateway (cambiamos odd por ether1-Gateway)

2015-06-12 12_51_38-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

nth=2,2

 

2015-06-12 12_58_23-admin@E4_8D_8C_12_56_AC (MikroTik) - WinBox v6.29.1 on hAP lite (smips)

Fuente:

http://wiki.mikrotik.com/wiki/Balanceo_de_carga_mejorado_atrav%C3%A9z_de_multiples_gateway_(wan)

http://www.ryohnosuke.com/

 

 

 

 
Post date: 2015-06-12 07:38:03
Post date GMT: 2015-06-12 07:38:03
Post modified date: 2015-06-15 18:37:16
Post modified date GMT: 2015-06-15 18:37:16
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com