Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2423  / 2 Years ago, mon, july 4, 2022, 1:21:41

I am currently using a mobile internet connection, however I wish to mount a drive via a wifi connection. However, whenever I do so, the mobile internet connection appears to be neglected in favour of the wifi connection, which has no internet access. Therefore, I am unable to use the internet whilst using the wifi-based mounted drive and vice versa.



How can I "prioritise" the mobile internet network connection for internet access related tasks when both network types are in use?


More From » wireless

 Answers
5

If I understand your question correctly, you have a local-only WiFi connection (or at least you want to use it for local connections only) and an internet-connected mobile broadband connection. Is that correct?



Background



Here's some background. Both your WiFi and mobile broadband connection are claiming the "default route" as in, the route to all the addresses I am not otherwise aware of, i.e. the Internet. As there's just one routing table and your applications aren't (and shouldn't be) aware of those two connections, the kernel just follows the routing table.



$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.11.254 0.0.0.0 UG 0 0 0 eth0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0


In the example above, the local network addresses are available directly on the interface and all other ones are routed via 192.168.11.254. This is the gateway and this address is usually announced by the DHCP server. It's telling the computer requesting for an IP address not just an available host address to use, but also the gateway, DNS servers, NTP time server, etc.



Now, what you would want, is to disable your DHCP client on your PC to ignore the announcement "this is the default gateway: 192.168.11.254", yet still listen to the rest to be able to keep the ability to talk in the local network. Below is how to do that.



Network Manager settings



Try disabling the default route to be assigned to your WiFi adapter when connected. Assuming you're running the default NetworkManager, you should be able to change the behaviour of how routes are assigned.



Below is how it looks like in KDE, but it should be similar in other Desktop Environments. It's important to find the two settings in the "Routes" section of the "IPv4 Address" tab in the settings window of the specific network.




  • Ignore automatically obtained routes (tick it)

  • Use only for resources on this connection (tick it)



Both on the bottom of this window:



enter image description here



You might also want to ignore the information about the DNS servers for the WiFi connection if you don't rely on it for local addresses. This can be done in the "Basic settings" section of the "IPv4 Address" tab by selecting the "Automatic (DHCP) addresses only".


[#33255] Monday, July 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
barted

Total Points: 424
Total Questions: 103
Total Answers: 101

Location: Djibouti
Member since Sun, Feb 27, 2022
2 Years ago
barted questions
;