I have edited /etc/netplan/01-network-manager-all.yaml to get a static ip address:
network: version: 2 renderer: networkd ethernets: wlp0s20f3: dhcp4: no addresses: - 10.1.10.23/24 routes: - to: default via: 10.1.10.1 nameservers: addresses: [10.1.1.10]After netplan apply everything is fine, the interface is configured according to the config, but after reboot, the interface gets some additional automatic dhcp configuration:
2: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether cc:15:31:5e:bf:41 brd ff:ff:ff:ff:ff:ff inet 10.1.10.101/24 brd 10.1.10.255 scope global dynamic noprefixroute wlp0s20f3 valid_lft 5652sec preferred_lft 5652sec inet 10.1.10.23/24 brd 10.1.10.255 scope global secondary noprefixroute wlp0s20f3 valid_lft forever preferred_lft forever inet6 fe80::d6f7:2c10:8bf1:af66/64 scope link noprefixroute valid_lft forever preferred_lft foreverIt is even somehow assigned an ipv6 address despite
net.ipv6.conf.all.disable_ipv6=1being set in /etc/sysctl.conf
It seems like some service is changing the configuration, it didn't happen on 20.04.
How to disable this automatic configuration?
101 Answer
The DHCP address is provided by Network Manager. In order to use a scipt and therefore netplan, disable NM like this: How do I disable network manager permanently?
Next, your netplan file fails to provide the SSID and WPA2 password. I suggest that you amend it:
network: version: 2 renderer: networkd wifis: wlp0s20f3: dhcp4: no dhcp6: no addresses: [10.1.10.23/24] nameservers: addresses: [10.1.1.10] access-points: "network_ssid_name": password: "**********" routes: - to: default via: 10.1.10.1Note that the SSID and password are enclosed in quotation marks ". Netplan is very specific about indentation, spacing, etc., so proofread carefully twice. Follow with:
sudo netplan generate
sudo netplan applyPlease note that in a deployment of several laptops in a network, wlp0s20f3 is very unlikely to be the same interface name for all. As @heynnema points out above, you will need to interrogate each laptop for its logical interface name.
2