Skip to content

Instantly share code, notes, and snippets.

@MayMeow
Last active January 15, 2022 08:34
Show Gist options
  • Save MayMeow/e10725b62ad4bca52a017aa61cd8efa0 to your computer and use it in GitHub Desktop.
Save MayMeow/e10725b62ad4bca52a017aa61cd8efa0 to your computer and use it in GitHub Desktop.
Try to get new IP address when no internet on Gateway interface in Mikrotik
# Ping 6 times to some address (google free DNS here) and if no response try to get new IP address
:if ([/ping 8.8.8.8 interface=ethernet-gateway count=6] = 0) do={/ip dhcp-client release numbers=0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment