I have a MikroTik CRS125-24G-1S-IN
I reset it without using the default settings. Then I configured it as described below, omitting some details.
Currently, a new provider is connected to port ether1 via a pon cable with a speed of 1 gigabit.
Ports 2 to 16 are bridged, and a DHCP server is configured on them. The remaining ports are unused and not currently active.
Simple queues are applied to individual IP addresses, limiting their speed to 50M/50M. There is also a common rule for the entire range of IP addresses that limits the speed to 20M/20M.
There is also one fasttrack rule in the firewall so that the speed on IP 192.168.88.21 is not limited.
For monitoring in the Telegram bot whether everything is working, I have a script that is added to the schedule. I am adding the script.
:local botToken "-------:AAGmvhHsqEХХХХХХХХХХХХХХХХХfw"
:local chatID "--------"
:local pingResult [:len [/ping 8.8.8.8 count=3]]
:if ($pingResult = 0) do={
:log info "No internet connection, restarting DHCP client on ether1."
/interface dhcp-client disable ether1
:delay 5s
/interface dhcp-client enable ether1
:delay 5s
:local message "MikroTik: dhcp on ether1 restarted."
/tool fetch url="https://api.telegram.org/bot$botToken/sendMessage?chat_id=$chatID&text=$message" keep-result=no
} else={
:log info "Internet is up, no action needed."
:local message "MikroTik: ping to 8.8.8.8 ok"
/tool fetch url="https://api.telegram.org/bot$botToken/sendMessage?chat_id=$chatID&text=$message" keep-result=no
}
:local domain "google.com"
:local resolvedIP
:do {
:set resolvedIP [:resolve $domain]
} on-error={
:set resolvedIP ""
}
:if ($resolvedIP = "") do={
:log warning "Could not resolve IP for $domain"
:local message "MikroTik: No IP resolved for $domain. Restarted dhcp on ether1."
/tool fetch url="https://api.telegram.org/bot$botToken/sendMessage?chat_id=$chatID&text=$message" keep-result=no
/interface dhcp-client disable ether1
:delay 3s
/interface dhcp-client enable ether1
:delay 3s
} else={
:log info "DNS for $domain OK, no action needed."
:local message "MikroTik: DNS to $domain OK"
/tool fetch url="https://api.telegram.org/bot$botToken/sendMessage?chat_id=$chatID&text=$message" keep-result=no
}Also, netwatch has been added to monitor nodes in the network by IP. So that similarly to the script above, I know when something in the network turns off or on.
PROBLEM
Every day at the same time from 15:30 to various times from 16:00 to 19:30, the internet stops working stably.
Specifically, the ping to 8.8.8.8 may work, but ResolveIP for google.com does not execute. That is, from the messages in the bot, I see when ResolveIP does not execute, this can last from 10 minutes to an hour, then suddenly everything is fine, and it disappears again. During this time, the ping to 8.8.8.8 can also disappear for up to 20 minutes. As you can see, I restart port ether1 when this happens. I do this because when I was present at the moment these glitches appeared, I manually turned off the port and turned it back on through Winbox connected to the MikroTik, and the problem disappears. It may appear again the next day at the same time.
What we tried to do:
The provider said to change the MAC address on ether1 - I did it. Nothing changed.
The optics were resoldered on both my side and the provider's side.
I tried changing the WAN port to ether24 - it didn't help.
I tried to make the MikroTik a dumb switch and turned off everything unnecessary, and provided internet to it through a regular router that took on the DHCP function for the network, but without any limitations of course on speeds, etc. Just on an Asus 100 megabit router, there were no such problems. The internet did not disappear for several days. When I switched back to MikroTik, everything resumed with the glitch.