Sei sulla pagina 1di 3

//BALANCE DE CARGAS//

/interface ethernet

set [ find default-name=ether5 ] comment="Ether5 :::Salida Internet:::" name=\

LAN

set [ find default-name=ether1 ] comment="Ether1 ::::ProveedorA::::" \

name=WAN1

set [ find default-name=ether2 ] comment=\

"Ether2 :::::ProveedorB:::::" name=WAN2

/ip address

add address=192.168.100.1/24 interface=LAN network=192.168.100.0

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

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

/ip dns

set allow-remote-requests=yes servers=8.8.8.8,8.8.4.4

/ip firewall mangle

add action=mark-connection chain=input comment="Entrada de Conexiones" \

in-interface=WAN1 new-connection-mark=WAN1_conn

add action=mark-connection chain=input in-interface=WAN2 new-connection-mark=\

WAN2_conn

add action=mark-routing chain=output comment="Salida De Conexiones" \

connection-mark=WAN1_conn new-routing-mark=to_WAN1

add action=mark-routing chain=output connection-mark=WAN2_conn \

new-routing-mark=to_WAN2

add chain=prerouting comment="Politicas De Ruteo Forzan A que el trafico salga\


\_por determinado Gateway/acceso a routers" dst-address=192.168.0.0/24 \

in-interface=LAN

add chain=prerouting dst-address=192.168.1.0/24 in-interface=LAN

add action=mark-connection chain=prerouting dst-address-type=!local \

in-interface=LAN new-connection-mark=WAN1_conn per-connection-classifier=\

both-addresses:2/0

add action=mark-connection chain=prerouting dst-address-type=!local \

in-interface=LAN new-connection-mark=WAN2_conn per-connection-classifier=\

both-addresses:2/1

add action=mark-routing chain=prerouting comment="Pcc Dividiremos El Trafico E\

n 2 Flujos Iguales Basados En Origen Y destino" connection-mark=WAN1_conn \

in-interface=LAN new-routing-mark=to_WAN1

add action=mark-routing chain=prerouting connection-mark=WAN2_conn \

in-interface=LAN new-routing-mark=to_WAN2

/ip firewall nat

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

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

/ip route

add check-gateway=ping distance=1 gateway=208.67.222.222 routing-mark=to_WAN1 \

target-scope=30

add check-gateway=ping distance=1 gateway=208.67.220.220 routing-mark=to_WAN2 \

target-scope=30

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

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

add check-gateway=ping distance=1 dst-address=208.67.220.220/32 gateway=\

192.168.1.1 scope=10

add check-gateway=ping distance=1 dst-address=208.67.222.222/32 gateway=\


192.168.0.1 scope=10