Thursday, May 16, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2487  / 2 Years ago, tue, may 24, 2022, 12:42:37

Hello and I'm a very new user of Linux and I'm trying to learn about this brand new environment.


Today I ran into a problem. I have a wired broadband connection with my computer. I do also have a WiFi dongle with my PC which helps me to transfer files between my other devices. but when I connect the WiFi with other computers or phone, the connection is fine but I lose my Internet connection through the wired broadband.


I understand this as a multiple network connection error happening in Linux but I am not aware of how to solve the problem. I used to configure the metric levels of networks in windows system but I am not able to do the same on Linux. How to do that ?


I'm actually running Lubuntu 20.04 , a light-weight port of Ubuntu.


More From » networking

 Answers
1

Maybe it is routing problem. In case two interfaces are active in the same time (and both are leaved with dynamic IP assignment) then two default routes are in collision. This command could you help to check the situation:


ip route

Search for routes starting "default" in command response. A problem is if more then one such routes (i.e. lines) are listed.
Example of unwanted state:


jiri@b01x:~$ ip route
default via 10.1.1.1 dev br0 proto dhcp metric 600
default via 192.168.1.1 dev wlan0 proto dhcp metric 425
...
jiri@b01x:~$

Testing: Remove default route attached to Wi-Fi interface. Temporary way how to do it is by command:


sudo ip route del default via 192.168.1.1 dev wlan0

Correct IP address and interface name must be copied from your previous "ip route" command output.


Now re-check routes by "ip route". Only one route should remain in list. Then check the internet connection. If all is OK, you have found solution. Use one of these possibilities:



  1. Modify Wi-Fi interface setting in IPv4 section (e.g. using GUI system setting). Change Wi-Fi IP address assignment from Automatic to Manual, set own IP address, but leave default route empty!

  2. Create small script containing "sudo route del ..." command and run it in case you use both interfaces. The script must be started AFTER Wi-Fi interface is activated.


In case you will lost connection to your other devices connected via Wi-Fi, you should add or modify static routes. I will try to help you to solve this secondary problem, but more details and command outputs are needed.


[#826] Wednesday, May 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
elopingapo

Total Points: 206
Total Questions: 110
Total Answers: 114

Location: Guam
Member since Tue, Nov 29, 2022
1 Year ago
elopingapo questions
Fri, Sep 10, 21, 17:52, 3 Years ago
Sat, Apr 23, 22, 03:16, 2 Years ago
Fri, Jan 13, 23, 06:41, 1 Year ago
Sat, Jun 11, 22, 10:16, 2 Years ago
;