Está en la página 1de 7

Manual de Balanceo de Carga para 2 Líneas de Internet de La Misma Velocidad

PASO 1

Nombrando las interfaces

Aquí se deben identificar las interfaces que vamos a usar

/interface Ethernet

set [ find default-name=ether1] comment=Ether1 name=WAN1

set [ find default-name=ether2] comment=Ether2 name=WAN2

set [ find default-name=ether3] comment=Ether3 name=LAN

PASO 2

Configurando las direcciones IP en cada Interfaz

/ip address

add address=172.168.2.1/24 interface=LAN network=192.168.2.0


add address=192.168.0.2/24 interface=WAN1 network=192.168.0.0

add address=192.168.1.1/24 interface=WAN2 network=192.168.1.0

PASO 3

En mascarando las interfaces WAN

/ip firewall nat


add action=masquerade chain=srcnat out-interface=WAN1

add action=masquerade chain=srcnat out-interface=WAN2


PASO 4

Creando las rutas

/ip route

add gateway=192.168.0.1 check-gateway=ping distance=1


add gateway=192.168.1.1 check-gateway=ping distance=2

PASO 5

Vamos a configurar en el mangle las siguientes líneas sirven para marcar las conexiones nuevas y
que lo que entre por una conexión WAN Salga por la misma.

/ip firewall mangle

add chain=prerouting in-interface=WAN1 connection-state=new new-connection-


mark=WAN1_conn action=mark-connection passthrough=yes

add chain=prerouting in-interface=WAN2 connection-state=new new-connection-


mark=WAN2_conn action=mark-connection passthrough=yes

add chain=output connection-mark=WAN1_conn new-routing-mark=to_WAN1 action=mark-


routing passthrough=yes

add chain=output connection-mark=WAN2_conn new-routing-mark=to_WAN2 action=mark-


routing passthrough=yes
PASO 6

Ahora dividiremos las conexiones que ingresan por la interfaz nombrada "LAN" utilizando el
clasificador per-connection-classifier

/ip firewall mangle

add chain=prerouting in-interface=LAN connection-state=new dst-address-type=!local per-


connection-classifier=both-addresses:2/0 action=mark-connection new-connection-
mark=WAN1_conn passthrough=yes

add chain=prerouting in-interface=LAN connection-state=new dst-address-type=!local per-


connection-classifier=both-addresses:2/1 action=mark-connection new-connection-
mark=WAN2_conn passthrough=yes

Y también marcamos las rutas de las conexiones

/ip firewall mangle

add chain=prerouting in-interface=LAN connection-mark=WAN1_conn action=mark-routing new-


routing-mark=to_WAN1 passthrough=yes

add chain=prerouting in-interface=LAN connection-mark=WAN2_conn action=mark-routing new-


routing-mark=to_WAN2 passthrough=yes
PASO 7

Configurando las rutas, recuerdan las marcas de ruta que hicimos en el paso 5, to_WAN1 y
to_WAN2 vamos a usarlas ahora

/ip route

add gateway=192.168.0.1 routing-mark=to_WAN1 check-gateway=ping

add gateway=192.168.1.1
routing-mark=to_WAN2 check-
gateway=ping

También podría gustarte