Set up mikrotik
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.
-
679 38 0 Hello.
I am engaged in configuring MikroTik network equipment and can complete your project.
For preliminary analysis, please provide the full configuration.
Also, records from the log for the problematic period are needed.
The price indicated is approximate and will be adjusted after discussing the details.
-
Добрый день, А у Вас случайно не телесистемы провайдер ? Ради эксперимента, в следующей раз как пропадет интерент наберите провайдера и попрости пускай они с своей стороны выключат и включат порт. И тут именно они ключевое, имею кейс с очень похожей ситацией и перепайка оптики тоже не помагла, у провайдера естественно всегда все ок, но вот когда появляется проблема при отключение и включение порта с их стороны чудным образом все начинает работать
-
Ok, тут не ip дело. Просто как повторится отвал позвоните и скажите, вы все перезагружали не помогает, может ли они выключить и включить порт с своей стороны, у себя не чего в этот момент не трогайте
-
Какая загрузка процессора, когда возникают проблемы?
-
Использование коммутатора, хоть и с функциями L3, для маршрутизации гигабитного трафика, да еще и с simple QoS, да еще и с NAT-ом и какими ни какими правилами файрвлоа - так себе идея. Поэтому и спрашиваю про загрузку процессора.
-
Current freelance projects in the category DevOps
Integration of respond and CRM for sending the report on the first messageWe need to track the time of the first contact with the lead. For this, we need to send data through n8n to the respondent. CRM setup on our side. DevOps, Software & Server Configuration ∙ 17 hours 41 minutes back ∙ 12 proposals |
Integration of Google Analytics into CRM via n8nGood day, I need help connecting Google Analytics and CRM through n8n. All settings on the CRM side are done. Now we just need to set up the analytics through n8n to transmit sales events. DevOps, System & Network Administration ∙ 1 day 2 hours back ∙ 18 proposals |
Setting up a backup system and optimizing server infrastructureObjective of the work: Ensure reliable data storage for the CRM system and application by implementing an automated backup system, as well as carry out a series of server improvements to enhance the stability, security, and performance of the infrastructure. DevOps, Databases & SQL ∙ 9 days 20 hours back ∙ 29 proposals |