domingo, 9 de diciembre de 2018

MikroTik Balancer

MikroTik configuracion de balanceo

Prototipo de configuración standar, pcc modo router neutro, adaptable para cualquier uso...



Requerimientos mínimos: RB750x, RB450x, RB433x, RB941x, RB3011, PC x86, etc.

#############################################################################
# Borrando la configuracion para iniciar desde cero
/system reset-configuration keep-users yes no-defaults yes
#############################################################################

#############################################################################
# Balanceo de carga con routers neutro - by JHOELIT
#############################################################################
# ether1 = WAN-1
# ether2 = WAN-2
# ether5 = LAN-Clientes
#############################################################################

/interface ethernet
set [ find default-name=ether1 ] comment="Internet WAN 1"
set [ find default-name=ether2 ] comment="Internet WAN 2"
set [ find default-name=ether5 ] comment="Clientes LAN"

/ip address
add address=192.168.1.10/24 interface=ether1 comment="Internet WAN 1"
add address=192.168.2.10/24 interface=ether2 comment="Internet WAN 2"
add address=192.168.10.1/24 interface=ether5 comment="Clientes LAN"

/ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade comment="WAN-1 enmascarado"
add chain=srcnat out-interface=ether2 action=masquerade comment="WAN-2 enmascarado"

#/ip route

/ip firewall mangle
add chain=prerouting in-interface=ether1 connection-state=new new-connection-mark=ether1_conn action=mark-connection passthrough=yes comment="WAN-1"
add chain=prerouting in-interface=ether2 connection-state=new new-connection-mark=ether2_conn action=mark-connection passthrough=yes comment="WAN-2"
add chain=output connection-mark=ether1_conn new-routing-mark=to_ether1 action=mark-routing passthrough=yes comment="WAN-1"
add chain=output connection-mark=ether2_conn new-routing-mark=to_ether2 action=mark-routing passthrough=yes comment="WAN-2"
add chain=prerouting dst-address=192.168.1.0/24  action=accept in-interface=ether5 comment="Acces WAN-1"
add chain=prerouting dst-address=192.168.2.0/24  action=accept in-interface=ether5 comment="Acces WAN-2"
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:2/0 action=mark-connection new-connection-mark=ether1_conn passthrough=yes comment="WAN-1" 
add chain=prerouting in-interface=ether5 connection-state=new dst-address-type=!local per-connection-classifier=both-addresses:2/1 action=mark-connection new-connection-mark=ether2_conn passthrough=yes comment="WAN-2"
add chain=prerouting in-interface=ether5 connection-mark=ether1_conn action=mark-routing new-routing-mark=to_ether1 passthrough=yes comment="WAN-1"
add chain=prerouting in-interface=ether5 connection-mark=ether2_conn action=mark-routing new-routing-mark=to_ether2 passthrough=yes comment="WAN-2"

/ip route
add gateway=192.168.1.1 routing-mark=to_ether1 check-gateway=ping comment="WAN-1"
add gateway=192.168.2.1 routing-mark=to_ether2 check-gateway=ping comment="WAN-2"
#/ip route
add gateway=192.168.1.1 check-gateway=ping distance=1 comment="WAN-1"

add gateway=192.168.2.1 check-gateway=ping distance=2 comment="WAN-2"

#############################################################################
# OPCIONAL (ether5) PUEDE PONER IP AUTOMÁTICA (lan)
#############################################################################

/ip dns
set servers=8.8.8.8,8.8.4.4
/ip pool
add name=dhcp_pool ranges=192.168.10.2-192.168.10.254
/ip dhcp-server
add address-pool=dhcp_pool disabled=no interface=ether5 name=dhcp1
/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1

/system clock
set time-zone-autodetect=yes

/system identity
set name=Balancer by JHOELIT

#############################################################################
# MEDIDAS DE SEGURIDAD (Opcional)
#############################################################################

/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes

############################################################################
# ESTABLECIENDO ULTIMO RESPALDO
############################################################################

/system backup save name="JHOELIT-CONFIG-BALANCER"

#############################################################################
# BALANCEO CON FAILOVER (mediante pago) 
#############################################################################

/tool netwatch (Si cace una linea se arregla automáticamente)

auto-ajuste en: /ip firewall mangle + /ip firewall nat + /ip route


#############################################################################
# OTRAS CONFIGURACIONES Y MODELOS (MEDIANTE PAGO)
#############################################################################
# BALANCEO DISTINTAS VELOCIDADES (mediante pago) 
# BALANCEO MODO ROUTER NEUTRO (mediante pago) + Failover Extra
# BALANCEO MODO BRIDGE O PPPOE (mediante pago)
#############################################################################

Comentar es agradecer, bendiciones a todos... Donar

2 comentarios:

  1. Buenas.
    Esta configuracion funciona con 2 wan.
    ¿Cual es el costo # BALANCEO CON FAILOVER?
    Saludos

    ResponderEliminar
  2. Así es mi estimado, cualquier consulta
    me escribe aquí: http://fb.com/jhoelrc

    ResponderEliminar

MikroTik Balancer

MikroTik configuracion de balanceo Prototipo de configuración standar, pcc modo router  neutro,  adaptable para cualquier uso... Req...