0% found this document useful (0 votes)
29 views3 pages

Configurar Direcciones IP para Cada Interfaz WAN

The document outlines the configuration of multiple WAN interfaces, including IP address assignment, DHCP client setup, routing, and traffic marking using firewall mangle rules. It also includes scripts for monitoring the connections and implementing failover mechanisms for each WAN interface. Additionally, it mentions authentication via PPPoE and bandwidth control using simple queues with PCQ type.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views3 pages

Configurar Direcciones IP para Cada Interfaz WAN

The document outlines the configuration of multiple WAN interfaces, including IP address assignment, DHCP client setup, routing, and traffic marking using firewall mangle rules. It also includes scripts for monitoring the connections and implementing failover mechanisms for each WAN interface. Additionally, it mentions authentication via PPPoE and bandwidth control using simple queues with PCQ type.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

# Configurar direcciones IP para cada interfaz WAN

/ip address add address=192.168.1.1/24 interface=ether1


/ip address add address=192.168.2.1/24 interface=ether2
/ip address add address=192.168.3.1/24 interface=ether3
/ip address add address=192.168.4.1/24 interface=ether4
/ip address add address=192.168.5.1/24 interface=ether5
/ip address add address=192.168.6.1/24 interface=ether6
/ip address add address=192.168.7.1/24 interface=ether7

# Configurar clientes DHCP para cada interfaz WAN


/ip dhcp-client add interface=ether1
/ip dhcp-client add interface=ether2
/ip dhcp-client add interface=ether3
/ip dhcp-client add interface=ether4
/ip dhcp-client add interface=ether5
/ip dhcp-client add interface=ether6
/ip dhcp-client add interface=ether7

# Configurar rutas para cada interfaz WAN


/ip route add gateway=192.168.1.1 check-gateway=ping
/ip route add gateway=192.168.2.1 check-gateway=ping
/ip route add gateway=192.168.3.1 check-gateway=ping
/ip route add gateway=192.168.4.1 check-gateway=ping
/ip route add gateway=192.168.5.1 check-gateway=ping
/ip route add gateway=192.168.6.1 check-gateway=ping
/ip route add gateway=192.168.7.1 check-gateway=ping

# Configurar reglas de mangle para marcar el tráfico


/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether1 action=mark-connection new-
connection-mark=WAN1_conn
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether2 action=mark-connection new-
connection-mark=WAN2_conn
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether3 action=mark-connection new-
connection-mark=WAN3_conn
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether4 action=mark-connection new-
connection-mark=WAN4_conn
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether5 action=mark-connection new-
connection-mark=WAN5_conn
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether6 action=mark-connection new-
connection-mark=WAN6_conn
/ip firewall mangle add chain=prerouting dst-address-type=!local in-interface=ether7 action=mark-connection new-
connection-mark=WAN7_conn

# Configurar reglas para marcar paquetes basados en las conexiones


/ip firewall mangle add chain=prerouting connection-mark=WAN1_conn action=mark-routing new-routing-
mark=to_WAN1
/ip firewall mangle add chain=prerouting connection-mark=WAN2_conn action=mark-routing new-routing-
mark=to_WAN2
/ip firewall mangle add chain=prerouting connection-mark=WAN3_conn action=mark-routing new-routing-
mark=to_WAN3
/ip firewall mangle add chain=prerouting connection-mark=WAN4_conn action=mark-routing new-routing-
mark=to_WAN4
/ip firewall mangle add chain=prerouting connection-mark=WAN5_conn action=mark-routing new-routing-
mark=to_WAN5
/ip firewall mangle add chain=prerouting connection-mark=WAN6_conn action=mark-routing new-routing-
mark=to_WAN6
/ip firewall mangle add chain=prerouting connection-mark=WAN7_conn action=mark-routing new-routing-
mark=to_WAN7

# Configurar rutas basadas en el marcado de paquetes


/ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-mark=to_WAN1 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.2.1 routing-mark=to_WAN2 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.3.1 routing-mark=to_WAN3 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.4.1 routing-mark=to_WAN4 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.5.1 routing-mark=to_WAN5 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.6.1 routing-mark=to_WAN6 check-gateway=ping
/ip route add dst-address=0.0.0.0/0 gateway=192.168.7.1 routing-mark=to_WAN7 check-gateway=ping

# Configurar scripts para monitorear conexiones y realizar el failover


/system script add name=check_WAN1 source="/tool netwatch add host=8.8.8.8 interval=10s up-script=\"/ip route
enable [find gateway=192.168.1.1]\" down-script=\"/ip route disable [find gateway=192.168.1.1]\""
/system script add name=check_WAN2 source="/tool netwatch add host=8.8.8.8 interval=10s up-script=\"/ip route
enable [find gateway=192.168.2.1]\" down-script=\"/ip route disable [find gateway=192.168.2.1]\""
/system script add name=check_WAN3 source="/tool netwatch add host=8.8.8.8 interval=10s up-script=\"/ip route
enable [find gateway=192.168.3.1]\" down-script=\"/ip route disable [find gateway=192.168.3.1]\""
/system script add name=check_WAN4 source="/tool netwatch add host=8.8.8.8 interval=10s up-script=\"/ip route
enable [find gateway=192.168.4.1]\" down-script=\"/ip route disable [find gateway=192.168.4.1]\""
/system script add name=check_WAN5 source="/tool netwatch add host=8.8.8.8 interval=10s up-script=\"/ip route
enable [find gateway=192.168.5.1]\" down-script=\"/ip route disable [find gateway=192.168.5.1]\""
/system script add name=check_WAN6 source="/tool netwatch add host=8.8.8.8 interval=10s up-script=\"/ip route
enable [find gateway=192.168.6.1]\" down-script=\"/ip route disable [find gateway=192.168.6.1]\""
/system script add name=check_WAN7 source="/tool netwatch add host=8.8.8.8 interval=10s up-script=\"/ip route
enable [find gateway=192.168.7.1]\" down-script=\"/ip route disable [find gateway=192.168.7.1]\""

ADMINISTRADOR

Autenticacion: PPPoE.
Control de ancho de banda: COLA SIMPLE.
Tipo de cola: PCQ.
Con reuso.

You might also like