:if ( [/ping 8.8.8.8 interface=wan count=6 ] = 0 ) do={/ip dhcp-client renew wan}
Make the script disable and then enable the interface. That should cause it to renew the DHCP.Hi, I need a sript that will ping some Internet address or dns (let say 8.8.8.8 ) and if no replay for 5 min release WAN address and renew it. I have dynamic address on MT WAN from Internet provider cable modem. Is there any similar solution, cose sometimes Internet stops working and all I have to do is renew IP address on DHCP clinet on WAN interface.
Thanks mate this work like a charm.this scriptCode: Select all:if ( [/ping 8.8.8.8 interface=wan count=6 ] = 0 ) do={/ip dhcp-client renew wan}
and scheduler for the script with interval 5 min
Thanks mate this work like a charm.this scriptCode: Select all:if ( [/ping 8.8.8.8 interface=wan count=6 ] = 0 ) do={/ip dhcp-client renew wan}
and scheduler for the script with interval 5 min
Let me bring this old topic up a bit.this scriptCode: Select all:if ( [/ping 8.8.8.8 interface=wan count=6 ] = 0 ) do={/ip dhcp-client renew wan}
and scheduler for the script with interval 5 min
:if condition=([/ping 1.1.1.1 count=6] =0) do={/ip dhcp-client release [ find interface ="ether1"]}
Please only tell me, where should i put this script?Try this friend
Code: Select all:if condition=([/ping 1.1.1.1 count=6] =0) do={/ip dhcp-client release [ find interface ="ether1"]}
I hope it helps you
EL DONCITO.
:if ([/ping 1.1.1.1 count=10] = 0) do={/ip dhcp-client release [find]}
Ok, now i set this:Do it correctly, this do not need to specific the interface.Do not execute ping too often, or you risk to be putted sooner or later on blacklist...Code: Select all:if ([/ping 1.1.1.1 count=10] = 0) do={/ip dhcp-client release [find]}
:if ([/ping 1.1.1.1 count=5] = 0) do={/ip dhcp-client release [find]}