1. Current Location: Home >  Router Encyclopedia >  The internet connection at home was disconnected for a few minutes and then it recovered. How do you capture the scene of such an instantaneous disconnection?

The internet connection at home was disconnected for a few minutes and then it recovered. How do you capture the scene of such an instantaneous disconnection?

Home network instantaneous disconnection dial test monitoring: Uptime Kuma deployment link, 60-second detection record red and green curve, three types of network disconnection status triage

My broadband started to have problems after winter last year.: While scrolling through the video, I suddenly started spinning around, and after three to five minutes, I felt better again. Come two or three times a week, the time is not fixed. When I put down my mobile phone and walked to the weak power box, the light on the optical modem was normal, and the WAN port status of the router's background was also connected - the scene was long gone. I called No. 10000, and the first thing the technician asked was "What color does the LOS lamp look like when it breaks?" I couldn't answer, and the repair order was not processed. This kind of instantaneous disconnection of the Internet will heal itself. The most annoying thing is that you can't catch the scene.

Later I figured out one thing: I don't need to guard the scene, what I need is to have something that can't sleep watch for me. The Feiniu NAS at home is originally powered on 24 hours a day, and a dial-up test container is inserted into the Docker to detect the external network once a minute. A connection will be recorded, and a disconnection will be recorded. After several days, the time, frequency, and duration of the network disconnection are all in the curve. I have been using this set of equipment for more than two months, and I relied on it to locate the fault at home. The following is written in the order of my actual tossing. Feiniu Qunhui is universal. If you don’t have NAS, I will give an alternative at the end of the article.

Choose tools first: Why Uptime Kuma and not router logs

Anyone who has read the router’s background system logs should have some experience.: Most of what is recorded in it are important events such as "WAN port disconnection" and "WAN port connection". The timestamps are there, but the granularity is rough, and the logs of home routers are covered in a loop, and they will be flushed out within a week. My mother’s Mercury only has the last two hundred or so entries in the log, and I can’t even turn the pages more than once. What can I see in the log and how to see it? I used to WiFi disconnection reason code article I have written in this article that the disconnection has already occurred and there is no way to reverse the case. ; What is needed for an instant disconnection is not a criminal record, but a continuous record.

Uptime Kuma does this job: It is an open source dial-testing tool that runs in Docker and has a web interface. It pings or HTTP requests a target at intervals you set. Each time the results are dropped into the built-in SQLite database and drawn into an availability curve. How many times it was interrupted, how long it took each time, and what period of time it was concentrated are all clearly visible on the picture. I chose it for three reasons: Mirroring tens of MB does not consume memory ; The data is not lost when the network is disconnected like cloud monitoring. ; There are many alarm channels, and I only use notification bar push. By the way, the database of this type of monitoring container is written to the disk every few minutes. If your NAS mechanical disk is put into hibernation, it will become one of the suspects of secretly writing disks. I am talking about this. NAS hard disk hibernation troubleshooting article There was a special note in it.

deploy: Get up in Feiniu Docker in two steps, don’t hit the port

Search the image louislam/uptime-kuma in Feiniu's Docker interface and pull the latest tag directly. If pulling the image times out, that is another matter and has nothing to do with this article. The solution to the problem of not being able to pull the mirror is that I previously explained The article about pulling image timeout I wrote it in, go and check it first. After mirroring, build the container with my own parameters: Port mapping container 3001 to local machine 3001, hang a volume named kuma-data to the container/data directory - the database and configuration are all in it, and the data will still be there if the container is deleted and rebuilt. Don't follow some tutorials and use direct host mode. There will be chaos when there are too many ports. Docker network mode article I have broken down the differences between the three modes here, so I won’t repeat them here.

After you get up, go to Feiniu IP:3001 in the browser. You need to set up an administrator account for the first time. This step takes two minutes. What you really need to worry about is the next step: How to set monitoring items. I made the wrong settings the first time and had to rework them later.

How to set monitoring items: Just staring at the gateway is equivalent to pretending in vain

I only added one monitoring item at the beginning: Ping your home router 192.168.31.1 . After running around all night, everything was green, and I felt pretty good about it. The next day, the Internet was still convulsing, and there was not a single red frame on the picture. What's the problem: When pinging the router through the pure intranet, the modem and broadband were disconnected, but the router itself was alive and well and still responded within seconds. This monitoring item is only effective for "router crash", and my router is the least prone to failure.

Later, I added five items, and each item focused on a section of the link. When there was a convulsion, I looked at which items were red and which were green, and the broken position was framed.:

Monitoring items Which section are you focusing on? interval
ping optical modem gateway From the router to the optical modem 60 seconds
HTTP external website (such as Baidu) Export the entire line to the public network 60 seconds
ping public DNS 223.5.5.5 Whether the exit is open (ICMP layer) 60 seconds
HTTP router backend Is the router CPU/service suspended? 120 seconds
DNS resolution monitoring The export is successful but the analysis fails. 300 seconds

The most important thing in this table is the difference between the second and third items: Some broadband faults are ICMP communication, HTTP all hangs (QoS or transport layer problems), and some are completely disconnected (physical layer or authentication dropped). Only when both items are set, the level of the fault can be clearly distinguished. I have tried all intervals: 60 seconds is the value I weighed. The 30 seconds data is more detailed but the database needs to be written frequently, which is not friendly to mechanical disks. ; More than 120 seconds is too rough, and an instantaneous network disconnection of three to five minutes may completely hide in the gap between the two detections. Don’t set one detection target. I hung up two HTTP stations and looked at them in turn. If a single station vents on its own, it will pollute the data.

Take a look at the two-week chart: Three types of judgment methods, completely different treatments

On the 10th day of the curve, my family's problems revealed themselves. Pick out three typical forms and get them right.:

The first category, HTTP and ping are red at the same time, and then turn green again after a few minutes. . The record in my chart for November is six times, all concentrated between 7pm and 10pm, each lasting two to six minutes. This shape points to the egress physical layer, optical modem or line. I brought this picture to report for repair, and the technician came to my house and directly replaced the optical splitter pigtail without saying, "We checked and there was no problem." There is another advantage to the feature of concentration at night - if it is not the lines, it is congestion during the evening peak, and the solution is completely different. I am The one about slowing down at night I have written about how to distinguish between judgment and slowness. The dial test chart is the strongest evidence to distinguish them.

The second category, HTTP is red but pinging public DNS is still green . It happened twice and it healed itself within a few minutes. This situation is "the egress is alive but the transport layer is troublesome". The common suspect is QoS scheduling or MTU path problems on the operator side. Don't worry about it once, and check again when the frequency is high. If you want to drill down further by yourself, the three-stage ping positioning method is Packet loss troubleshooting article Here, you can compare the time points on the chart.

The third category, The items on the internal network are red, and the external network is all green. . One time, the optical modem gateway pinged red for four minutes, but the external network was always connected. This was good news. It meant that the short network cable from my router to the optical modem had poor contact. It cost five yuan to replace the cable. What I'm most afraid of is that the item in the background of the HTTP router is red and everything else is green. That's because the router service is suspended. It depends on the device load, and it's not the same disease as disconnection. Hierarchical troubleshooting ideas on the router side, The sequence of five levels of disconnection That article is the most comprehensive, and dialing the test chart is equivalent to automating that sequence.

Don't expect it to tell you why, it only tells you where and when

After using it, my positioning of this tool becomes clearer and clearer.: It is a recorder not a diagnostician. At what point did it break, how long did it last, and which section did it break? It answered quickly and accurately. ; Why is it broken? It can't control it. What is the color of the LOS light on the optical modem and what is the reason code for the disconnection? You have to see these on site or go through them. The article on reconnection of the association layer The router log mentioned here. But it solves the problem of "when to look" - it used to be a matter of luck, but now you only look if there is a red bar. The time when the red bar appears is the start and end range of the log retrieval.

Another counter-intuitive point: This set of things is not a substitute for the disconnection reminder of the router App. I am here Router offline reminder article It has been equipped with Mercury's App push. Its advantage is zero deployment and direct notifications on the mobile phone. ; The shortcoming is that it only covers the connection from "the router to the manufacturer's cloud", and the broadband is half-dead and cannot be seen. Dial the test in reverse and look carefully, but the notification needs to be matched by yourself. I have both on now.: The app's push notification is responsible for immediate reminders of major accidents such as "everything in the house is down", and the dial-up chart is responsible for post-event review and chronic disease diagnosis. Rough sieve and careful inspection, each doing his or her own thing.

Notifications and backups: Two finishing moves

Notify me that the match is the most rustic one: Kuma is equipped with Bark push notifications. If the network is disconnected for more than two minutes, the notification will be pushed. When the connection is restored, the notification will be pushed again. Why is it two minutes and not zero tolerance? Instantaneous shaking within one minute is not worth watching at all, and pushing it will only increase anxiety. Why should recovery be postponed? People cannot deal with it immediately when they receive "broken" outside, but "recovered" can save them from worrying about it all the way. If you want people in other places to do it remotely, you have to set up the remote channel first. I'm here to link this link. ddns-go article There are complete records, and IPv6 direct connection is also possible.

Another action is to back up the database. I set up a copy of the SQLite file in the kuma-data volume to the shared directory of the NAS every week. It’s not that the data is expensive, it’s mainly that container upgrades occasionally roll over. I used to Five steps for container upgrade Check it out, and only dare to confirm if you have a backup to upgrade. After two months of monitoring and running, I lost all the curves I accumulated after upgrading, which is still quite frustrating.

If you don’t have a NAS, don’t think this solution is not for you. You can install Docker on any old computer that is gathering dust, or even a desktop computer that is always on. You can install Docker or run the Windows version directly. ; There is really nothing, just adding a memory card to the Raspberry Pi is enough. The performance requirements of this tool are almost zero - it is squeezed together with Jellyfin and qBittorrent on my NAS, and the memory usage is about 40 MB all year round. If you really don’t even have a normally-on device, then return to the mobile app plan. Although it may seem superficial, it is better than nothing.

Finally tell the ending: After replacing the pigtail, the "concentrated red bars at night" in the picture no longer appear. In the past month, the export availability rate was 99.98%. The remaining two red bars were recorded by restarting the router myself. The biggest change after installing this set of things is not that the Internet has gotten better - it is that when something goes wrong again, I no longer have to guess "Is it my imagination?" I can just look at the pictures. It's much better to leave things like catching people on the scene to guys who don't sleep than to guard weak electricity boxes with human flesh.

Read More


Copyright Notice Scan to read on mobile
All Rights Reserved: 《SHUNOT》 => 《The internet connection at home was disconnected for a few minutes and then it recovered. How do you capture the scene of such an instantaneous disconnection?》
Article URL: https://www.shunot.com/en/lybk/1586.html
Unless otherwise stated, all articles are original by 《SHUNOT》. Reposting is welcome! Please indicate the original URL when reposting, thank you.

Contact Us

Online Consultation: Click here to send me a message

WeChat ID: master_135

Scan to follow