0% found this document useful (0 votes)
206 views1 page

MISP Script DHCP-Client Ruta Recursiva

This document contains configuration details for a DHCP client and recursive route on an interface named "ether3". It defines variables for the comment and monitoring IP of the recursive route. The DHCP client script adds and modifies the recursive route and default route through the monitoring IP if bound, and removes the routes if unbound, ensuring only one recursive route exists.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
206 views1 page

MISP Script DHCP-Client Ruta Recursiva

This document contains configuration details for a DHCP client and recursive route on an interface named "ether3". It defines variables for the comment and monitoring IP of the recursive route. The DHCP client script adds and modifies the recursive route and default route through the monitoring IP if bound, and removes the routes if unbound, ensuring only one recursive route exists.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

# ------ Datos del DHCP-Client ------

:global NombreInterfaz "ether3"

# ------ Datos de la Ruta Recursiva ------


:global ComentarioRutas "Ruta Recursiva - Link3"
:global IPMonitoreo "1.1.1.1"
:global DistanciaRuta "3"

/ip dhcp-client
add add-default-route=no dhcp-options=hostname,clientid disabled=no
interface=$NombreInterfaz script="{\r\
\n :local count [/ip route print count-only where (comment=\"No Tocar |
$ComentarioRutas\" and dst-address!=0.0.0.0/0)]\r\
\n :if (\$bound=1) do={\r\
\n :if (\$count = 0) do={\r\
\n /ip route add ds=$IPMonitoreo gateway=\$\"gateway-address\"
comment=\"No Tocar | $ComentarioRutas\" scope=10\r\
\n /ip route add ds=0.0.0.0/0 check-gateway=ping
distance=$DistanciaRuta gateway=$IPMonitoreo comment=\"No Tocar |
$ComentarioRutas\" scope=10\r\
\n } else={\r\
\n :if (\$count > 2) do={\r\
\n :local test [/ip route find where (comment=\"No Tocar |
$ComentarioRutas\" and dst-address!=0.0.0.0/0)]\r\
\n :if ([/ip route get \$test gateway] != \$\"gateway-address\")
do={\r\
\n /ip route set \$test gateway=\$\"gateway-address\"\r\
\n }\r\
\n } else={\r\
\n :error \"Hay demasiadas rutas.\"\r\
\n }\r\
\n }\r\
\n } else={\r\
\n /ip route remove [find comment=\"No Tocar | $ComentarioRutas\"]\r\
\n }\r\
\n}"

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy