I can confirm this problem even with recent RouterOS 6.44.5, with a Sagemcom DOCSIS 3.0 modem.
When the connectivity is gone temporarily due to cable operator outage, I need to explicitly release both IPv4 and IPv6 DHCP to get back connectivity.
I’m currently playing with two scripts that could fix the problem, but I did not yet put them into production, it’s just “wild thinking”. One option is to check for actual connectivity, and release DHCP in case the ping is unsuccessful:
:if ([/ping 8.8.8.8 interface=ether1 count=6]=0 && [/ping 1.1.1.1 interface=ether1 count=6]=0) do={/ip dhcp-client release [find interface=ether1]; /ip cloud force-update; :log info "forced DHCP IPv4 renew due to loss of connectivity"}
:if ([/ping 2001:4860:4860::8888 interface=ether1 count=6]=0 && [/ping 2606:4700:4700::1111 interface=ether1 count=6]=0) do={/ipv6 dhcp-client release [find interface=ether1]; /ip cloud force-update; :log info "forced DHCP IPv6 renew due to loss of connectivity"}
The alternative is to scan for the DHCP status, but I’m not sure if during a valid renewal the state is also “bound”:
:foreach i in=[/ip dhcp-client find where interface=ether1 status!=bound disabled=no] do={/ip dhcp-client release $i; /ip cloud force-update; :log info "forced DHCP IPv4 renew due to loss of connectivity"}
:foreach i in=[/ipv6 dhcp-client find where interface=ether1 status!=bound disabled=no] do={/ipv6 dhcp-client release $i; /ip cloud force-update; :log info "forced DHCP IPv6 renew due to loss of connectivity"}
It should be possible to run either of these code snippets via the scheduler, e.g.
/system script add name=conncheck policy=read,write,test source={ ...code from above... }
/system scheduler add name=conncheck interval=5m on-event=conncheck
Take them with a grain of salt - they are untested, I’m right now looking into how to deploy this best! ![]()