Ubuntu - WiFi trouble

Thread Starter

panic mode

Joined Oct 10, 2011
1,783
Hello dear Linuxer...

I am working with someone else's Ubuntu 18.x machine.
There are both wired LAN and WiFi. Both work fine on their own.

Wired LAN is used to connect to some automation devices (my side)
WiFi is used for internet access (someone else's side).

Problem is that Internet access is only possible if WiFi is connected first. Actually internet is only needed for updates etc. but it bugs hell out of me that in order to get internet, one must unplug wired LAN network cable.

This is what i would REALLY like to avoid.

Any tips...?
 

wayneh

Joined Sep 9, 2010
16,114
I know zero about Linux but it seems to me the machine is making an "automatic" selection of network setup parameters when it detects an ethernet cable attached. You need to override that automatic behavior and force it to use your selected network. The downside is that you will have to manually suggest which configuration you want any time you want to switch. You cannot be on two networks at once.
 

Thread Starter

panic mode

Joined Oct 10, 2011
1,783
IYou cannot be on two networks at once.
Sure i can - in fact i do it all the time. Often i am connected to 3 or 4 networks at once.
Sometimes even single NIC may be connected to two or more different subnets (and used simultaneously).

Wired LAN is (supposed to be) always connected and usually this connections starts right away (less overhead to establish connection than that of WiFi).
WiFi is only needed occasionally.

Problem is:
If Wired connection is established first, there is no internet access regardless if WiFi is connected or not.
If WiFi is connected first, then internet works even after wired connection is established.

I am not familiar with linux so question is what can be done here...
 

wayneh

Joined Sep 9, 2010
16,114
Well hang on, even if multiple networks are possible, your browser and other network tools need to know which network to use for any task. Maybe you need a utility to handle this.

This thread touches on the issue. I don't know how useful it is but it was one of the first I found.
https://ubuntuforums.org/showthread.php?t=2045852

@joeyd999 might be able to help you with the Linux aspects of your plan.
 

joeyd999

Joined Jun 6, 2011
4,271
@joeyd999 might be able to help you with the Linux aspects of your plan.
In the old days, we'd just configure the /etc/network/interfaces to (very simply) arrange our network(s) and adapters anyway we wanted them. Easy peasy lemon squeezy.

Nowadays, NetworkManager is supposed to handle all your network connections automagically. For simple configurations, NetworkManager works well and seamlessly. For more complicated situations -- multiple adapters, networks, and routing tables -- NetworkManager sometimes becomes unpredictable.

I am sure you can remove NetworkManager and revert to a custom interfaces file. I have never done it, but a Google search should find the answer for you.
 

Thread Starter

panic mode

Joined Oct 10, 2011
1,783
thank you,

i see there is a plenty of workarounds. i am trying to find one that would not cause loss of connections on a wired adapter...
 
Top