1

I have Ubuntu 21. I am from India, and have two Fiber Internet connections via Lan cable.

The internet here are not reliable. Every day, one internet connection stops working for 2-3 minutes or so randomly. I wanted to know, when one internet don't work, how can I automatically switch internet?

I am going outside, and need to access my computer via teamviewer 24/7. So a reliable connection is needed. I am new to ubuntu, please consider me a newbie.

  • What you mean exactly by "Fails" and "stops working". – Marco May 09 '22 at 12:07
  • I can't open websites. Can't receive or send data over the internet. All lights are green on the modem. Internet is connected, but no internet. – Rahul tripp May 09 '22 at 12:08
  • Same as, what happens, when you don't recharge your internet. If that makes it clear. Thanks sir @Marco – Rahul tripp May 09 '22 at 12:10
  • someone told me, I need to buy Load balancer device from TP Link. WIll that make my internet more reliable? – Rahul tripp May 09 '22 at 12:39
  • Use Netplan. See https://netplan.io/examples/, and also check their reference and design pages. – heynnema May 09 '22 at 14:12
  • How should any system detect "lights are green" ? To detect "not receiving data from webpage" can only be detected with a timeout and how long should this be? And how to distinguish between your internet problem and the webpage problem? I assume a most devices will only detect "link down". – Marco May 09 '22 at 19:56
  • Ubuntu 21.04 (along with all flavors) is End-of-Life and thus unsupported on this site (https://askubuntu.com/help/on-topic), and many other Ubuntu sites, unless your question is specific to moving to a supported release of Ubuntu. https://fridge.ubuntu.com/2022/01/21/ubuntu-21-04-hirsute-hippo-end-of-life-reached-on-january-20-2022/ https://help.ubuntu.com/community/EOLUpgrades – guiverc May 09 '22 at 22:57
  • FYI: Ubuntu has products that use the year format, they are specialist servers like Ubuntu Core 20, and are limited to snap packages only (thus cannot use dpkg, apt type of commands). There is no specialist product release in 2021, thus no 21. Ubuntu's main products are year.month in format, ie. Ubuntu 20.04 LTS was the long-term-release in 2020-April; Ubuntu 21.04 (2021-April) a short-term product that users upgraded to the next product 21.10 (2021-October) to continue getting support as they weren't LTS or long-term-support releases; they are not year or snap only systems. – guiverc May 09 '22 at 23:00
  • @marco Good question. Let's say, we ping google.com and microsoft.com every 10 second. If both of them don't respond, we switch internet connection automatically. – Rahul tripp May 10 '22 at 04:18
  • You could create a script which does the pings and in case of failure it changes the default gateway of your node. As I said, before you go for a "professional" solution make sure the detection algorithm fits to your needs. "link down" is something else than "ping failed". – Marco May 10 '22 at 04:59

0 Answers0