Community discussions

MikroTik App
 
pvidal
newbie
Topic Author
Posts: 28
Joined: Fri May 11, 2012 6:18 pm
Location: Buenos Aires, Argentina
Contact:

NETWATCH issue with DHCP-CLIENT

Mon Jun 10, 2013 5:23 pm

Hi!
Im trying to monitor a gateway of my ISP. Im using netwatch for that purpose. Basically, i need that when that GW is unreachable (DOWN) the netwatch enables the DHCP-Client for an eth interface (in this case, ether1), and when is UP, the opposite: disable that DHCP-Client over that eth. When the GW is UP, the "disabling" of that eth works fine, but when its DOWN, is not working.
Here i attach a screenshot. What is wrong with this?

Thank you in advance!

Regards
You do not have the required permissions to view the files attached to this post.
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: NETWATCH issue with DHCP-CLIENT

Mon Jun 10, 2013 7:00 pm

On Up:

ros code

/ip dhcp-client set [find name="ether1"] disabled=yes;
On Down:

ros code

/ip dhcp-client set [find name="ether1"] disabled=no;
HTH,
 
pvidal
newbie
Topic Author
Posts: 28
Joined: Fri May 11, 2012 6:18 pm
Location: Buenos Aires, Argentina
Contact:

Re: NETWATCH issue with DHCP-CLIENT

Mon Jun 10, 2013 8:45 pm

On Up:

ros code

/ip dhcp-client set [find name="ether1"] disabled=yes;
On Down:

ros code

/ip dhcp-client set [find name="ether1"] disabled=no;
HTH,
Thank you so much!
 
pvidal
newbie
Topic Author
Posts: 28
Joined: Fri May 11, 2012 6:18 pm
Location: Buenos Aires, Argentina
Contact:

Re: NETWATCH issue with DHCP-CLIENT

Mon Jun 10, 2013 9:13 pm

ros code

On Up:
[code1=ros]/ip dhcp-client set [find name="ether1"] disabled=yes;[/code2]
On Down:
[code1=ros]/ip dhcp-client set [find name="ether1"] disabled=no;[/code2]

HTH,
In rOS 5.x didn't work for me (i just tried it), but like this yeah:

ros code

/ip dhcp-client set [find interface="ether1"] disabled=yes
on UP

ros code

/ip dhcp-client set [find interface="ether1"] disabled=no
on DOWN

Thanks for the guidance!
 
ditonet
Forum Veteran
Forum Veteran
Posts: 835
Joined: Mon Oct 19, 2009 12:52 am
Location: Europe/Poland/Konstancin-Jeziorna
Contact:

Re: NETWATCH issue with DHCP-CLIENT

Tue Jun 11, 2013 6:49 pm

Try interface name without quotation marks:

ros code

/ip dhcp-client set [find interface=ether1] disabled=yes
/ip dhcp-client set [find interface=ether1] disabled=no
HTH,

Who is online

Users browsing this forum: 4l4R1, Amazon [Bot], ggwp, jaclaz, jvanhambelgium, vagrik, wanarta and 36 guests