You are on page 1of 5

https://www.youtube.com/watch?

v=tibLKJFalaI&t=22s

Balanceo Mikrotik (V7.6) en 10 minutos! - De dos líneas de igual


Velocidad. (23:14) [Richk81]

Enero/07/2023 by RouterOS 7.6


# model = RB750Gr3

PARTE 01
“Nombrar sus Interfaces”
/interface ethernet
set [ find default-name=ether1 ] name=WAN_1
set [ find default-name=ether2 ] name=WAN_2

“Identificar sus Interfaces ´WAN´y ´LAN´”


/ip address
add address=192.168.100.2/24 comment=WAN_01 interface=WAN_1 \
network=192.168.100.0
add address=192.168.200.2/24 comment=WAN_01 interface=WAN_2 \
network=192.168.200.0
add address=192.168.10.1/24 comment=LAN interface=ether5 network=192.168.10.0
PARTE 02
“Enmascarado de las WAN”
/ip firewall nat
add action=masquerade chain=srcnat comment=Enmascarado_wan01 out-interface=WAN_1
add action=masquerade chain=srcnat comment=Enmascarado_wan02 out-interface=WAN_2

PARTE 03
“DNS Cache de LAN”
/ip firewall nat
add action=redirect chain=dstnat comment=”\”Redireccion DNS Cache\”” dst-port=53 \
in-interface=ether5 protocol=udp to-ports=53
/ip pool
add name=dhcp_pool10 ranges=192.168.10.2-192.168.10.254
/ip dhcp-server
add address-pool=dhcp_pool10 interface=ether5 name=dhcp1
/ip dhcp-server network
add address=192.168.10.0/24 gateway=192.168.10.1
/ip proxy
set enabled=yes
/ip dns
set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4

PARTE 04
“Balanceo”
Parte_4.0
/routing table
add disabled=no fib name=to_WAN_1
add disabled=no fib name=to_WAN_2
/ip firewall mangle
add action=accept chain=prerouting comment=”Parte_4.0_Conexiones Locales” \
dst-address=192.168.100.0/24 in-interface=ether5
add action=accept chain=prerouting dst-address=192.168.200.0/24 in-
interface=ether5

Parte_4.1
/ip firewall mangle
add action=mark-connection chain=prerouting comment=”Parte_4.1_Marcar Conexiones \
Entrantes de WAN” connection-mark=no-mark in-interface=WAN_1 new-connection- \
mark=WAN_1_conn passthrough=yes
add action=mark-connection chain=prerouting connection-mark=no-mark in-
interface= \
WAN_2 new-connection-mark=WAN_2_conn passthrough=yes

Parte_4.2
/ip firewall mangle
add action=mark-connection chain=prerouting comment=”Parte_4.2_Balanceo de los
WAN” \
connection-mark=no-mark connection-state=”“ dst-address-type=!local in-
interface= \
ether5 new-connection-mark=WAN_1_conn passthrough=yes per-connection-
classifier= \
both-addresses:2/0
add action=mark-connection chain=prerouting connection-mark=no-mark connection-
state= \
”“ dst-address-type=!local in-interface=ether5 new-connection-
mark=WAN_2_conn \
passthrough=yes per-connection-classifier=both-addresses:2/1

Parte_4.3
/ip firewall mangle
add action=mark-routing chain=prerouting comment=”Parte_4.3_Definir Rutas”
connection- \
mark=WAN_1_conn in-interface=ether5 new-routing-mark=to_WAN_1 passthrough=no
add action=mark-routing chain=prerouting connection-mark=WAN_2_conn in-
interface= \
ether5 new-routing-mark=to_WAN_1 passthrough=no
Parte_4.4
/ip firewall mangle
add action=mark-routing chain=output comment=”Parte_4.4_Definir la Salida de las \
Conexiones” connection-mark=WAN_1_conn new-routing-mark=to_WAN_1 \
passthrough=no
add action=mark-routing chain=output connection-mark=WAN_2_conn new-routing-
mark= \
to_WAN_2 passthrough=no

PARTE 05
“FAILOVER”
/ip route
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway= \
192.168.100.1 pref-src=0.0.0.0 routing-table=main scope=30 suppress-hw-
offload=no \
target-scope=10
add check-gateway=ping disabled=no distance=2 dst-address=0.0.0.0/0 gateway= \
192.168.200.1 pref-src=0.0.0.0 routing-table=main scope=30 suppress-hw-
offload=no \
target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway= \
192.168.100.1 pref-src=0.0.0.0 routing-table=to_WAN_1 scope=30 \
suppress-hw-offload=no target-scope=10
add check-gateway=ping disabled=no distance=1 dst-address=0.0.0.0/0 gateway= \
192.168.200.1 pref-src=0.0.0.0 routing-table=to_WAN_2 scope=30 \
suppress-hw-offload=no target-scope=10

You might also like