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?