Why is the network configuration I set in /etc/network/interfaces ignored on Ubuntu 17.10?
Networking is handled by netplan by default in Ubuntu Server 17.10 and later. I suggest that you edit the /etc/netplan/01-netcfg.yaml
file to read:
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
wifis:
wlp2s0b1:
dhcp4: no
dhcp6: no
addresses: [192.168.0.21/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8,192.168.0.1]
access-points:
"******":
password: "**********"
Exit and save your changes by running the command:
sudo netplan generate
sudo netplan apply
Please note and follow the spacing and indentation. Also note that the SSID and password are in between quotes "
.
Comment out all the wlp2s0b1 stanzas in /etc/network/interfaces
and reboot.
Any improvement?
NOTE: The exact method to set a static IP address for a server with netplan and wifi is hard to find. We may need to tweak the settings a bit.
I suggest you to completely remove netplan package and use networkd by creating config(s) in /etc/systemd/network/ directory. Netplan exists only in Ubuntu and there are no one in any other distros.