Score:2

How to configure Ubuntu to use separate wired and wireless interfaces?

br flag

System Info:

$ uname -a
Linux larrycotton-Latitude-E7440 5.13.0-27-generic #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/*-rel*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
   
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

root@larrycotton-Latitude-E7440:~# pwd
/root

root@larrycotton-Latitude-E7440:~# cat /etc/*rel*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

I would like to connect my wired ethernet interface to a local device that is separate from my wireless network and as such would like to configure a static IP address for my wired interface whilst still being connected to the internet on the wireless interface.

When I try to do this via the GUI (either by clicking on the little triangle at the top right of the screen and clicking on settings or using nmtui) I can get the wired interface as the ip address I require. However when I plug in the cable, the wireless connection always disappears - I only seem to be able to use one of the interfaces at a time.

Historically I have configured wireless using WPA supplicant and wired interfaces by configuration files in /etc/network/interfaces (or /etc/sysconfig/network-scripts on centos), but doing some searches it looks like ubuntu 20.04 uses netplan. I have tried playing with network configurations, but do not seem to be getting very far with it.

In /etc/netplan I have a file called 01-network-manager-all.yaml which looks like:

$ cat 01-network-manager-all.yaml
 # Let NetworkManager manage all devices on this system
    network:
      version: 2
      renderer: NetworkManager

This is using network manager, so I tried a config which would use networkd that looks like:

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      optional: true
      dhcp4: no
      dhcp6: no
      addresses:
        - 192.168.3.3/24
  wifis:
    wlp2s0:
      optional: true
      dhcp4: yes
      dhcp6: yes
      access-points:
        "lcwire2.4G":
          password: "<password>"

If I stop NetwworkManager (and also I have to kill the running process of wpa_supplicant), then run the following:

$ netplan generate
$ netplan apply

There does not seem to be any errors reported in the logs and indeed I can ping using IP addresses (ping 172.217..169.35, ping 212.58.233.251 both work). However I cannot ping using DNS (ping www.google.co.uk does not work), so for wireless, there is something wrong with DNS.

[ Note: Looking at resolv.conf I see:

nameserver 127.0.0.53
options edns0 trust-ad

No idea what that means - normally I would just chuck the names of the nameservers I wish to use here, but there is something else going on. I did try explicitly specifying the nameservers in the netplan config, but though netplan did not complain about the config it did not work. I guess that is a question for a separate post. ]

Again when I plug in the wired interface the wireless gets automatically disabled - so there is probably something other than networkd and NetworkManager (unless they both do it by default) that is forcing only a single interface at a time.

Does anyone know what it is (or what may be) that is disabling my wireless when I try to use the wired interface? Is this netplan itself or something else?

Does anyone know how I can configure things (maybe by using a different tool?) such that my wireless connects dynamically via my router and I can separately plug in the wired interface to a local network at the same time?

If I should be able to do this any tips on how I can go find out what is disabling my wireless when I plug ion my wired interface and why?

waltinator avatar
it flag
Read `man ip ip-route`
Terrance avatar
id flag
It's BIOS controlled. See:https://www.dell.com/support/kbdoc/en-us/000140094/how-to-setup-both-wired-and-wireless-networks-to-work-at-same-time-on-a-latitude-system and https://cdn.cnetcontent.com/63/a3/63a3b7d0-4230-4e85-8f66-110bb651fecb.pdf From what I am reading is that you need to go into your BIOS and diabled both WLAN and WWAN from Wireless Radio Control under Power Management.
Shaggy1 avatar
br flag
Thank you Terrance for that comment and link! It was indeed the BIOS settings that caused the wireless to be disabled. I can now use both wired and wireless.
Score:2
br flag

As mentioned in the comment by Terrance the interfaces are controlled by the BIOS.

As mentioned in the links he provided the 'Wireless Radio Control' setting under 'Power Management' needs to be unchecked in order to prevent wireless being disabled when using the wired interface.

To flesh out my original answer:

In some DELL latitude systems it seems the default BIOS settings mean the wireless adapter is automatically shuts off whenever a network cable is connected.

In my case this meant I was unable to connect via a wired connection to a local device while still being connected to the internet (via wireless).

To stop this from happening I did the following:

Restart the system and press F2 to get to the BIOS settings screen

In the settings list on the left Navigate to 'Power Management' press return

Navigate to 'Wireless Radio Control'

Uncheck the 'Control WLAN radio' check box that appears on the right side

Click Apply

Save and Exit

The following link:

https://www.dell.com/support/kbdoc/en-uk/000140094/how-to-setup-both-wired-and-wireless-networks-to-work-at-same-time-on-a-latitude-system

Provides more details. Or simply searching for E/3/E4 wireless brings up a set of results with details of this setting.

Note: Though the link above states:

Latitude E3 / E4 system WIFI / 3G turns off automatically when LAN cables connected

My laptop is an E7400 so possibly this setting is also a default for other DELL 'E' systems.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.