1

After looking at several threads like this one or this one.

Here is my /etc/netplan/01-network-manager-all.yaml content:

network:
  version: 2
  renderer: NetworkManager
  ethernets:
    wlxa0f3c123eaf8:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.0.150/24]
      gateway4: 192.168.0.1
      nameservers:
        addresses: [127.0.0.53]

I choose these parameters with ip route show

default via 192.168.0.1 dev wlxa0f3c123eaf8 proto static metric 600 
169.254.0.0/16 dev wlxa0f3c123eaf8 scope link metric 1000 
192.168.0.0/24 dev wlxa0f3c123eaf8 proto kernel scope link src 192.168.0.100 metric 600

and nslookup google.com

Server:     127.0.0.53
Address:    127.0.0.53#53

Non-authoritative answer:
Name:   google.com
Address: 172.217.10.14

Wifi is working but it always goes with the dhcp. Where should I look to resolve this ?

1 Answers1

1

I think the answer is in the file you just amended:

renderer: NetworkManager

That implies that Network Manager will do all the configuration and not netplan. No doubt, NM is still set to DHCP which is why you are still getting an IP address by DHCP.

I suggest that you revert the yaml file to its default:

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Then, set the static IP address in Network Manager like this:

enter image description here

Restart NM:

sudo service network-manager restart

Check:

ip addr show
chili555
  • 61,330