I'm using Ubuntu 22.04 and recently tried to set a static IP for my Wi-Fi adapter. It seems to have worked, but now I'm facing issues where a bunch of websites are unreachable. I'm not sure what went wrong. Here's a look at my netplan configuration in /etc/netplan/01-network-manager-all.yaml:
```
network:
version: 2
renderer: NetworkManager
wifis:
wlp3s0:
dhcp4: no
addresses:
- 192.168.178.66/24
routes:
- to: default
via: 192.168.178.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
access-points:
"NAME":
password: "******************"
```
Can anyone help me figure out what might be the issue?
5 Answers
Have you tried running the commands `ip address` and `ip route`? They might give us a clue about how your network is configured and whether the static IP you set is conflicting with something else.
Switching back to DHCP didn’t help, but I did find that using networkd as the renderer seems to fix the issue.
Have you considered that systemd-resolved might be causing DNS issues? If it’s running, you could try restarting it with `systemctl restart systemd-resolved` to see if that resolves your connectivity problems.
It could be an IPv6 issue. Try pinging a website with the IPv6 flag, like `ping google.com -6`. Sometimes, browsers try to use IPv6 which might cause issues if your network isn't configured for it properly.
I tried `ping google.com -6`, and that worked too. I hadn't thought about IPv6 being the cause. Thanks for the tip!
Check if there's a possible IP conflict on your network. Also, ensure your DNS is set correctly. You can try pinging google.com to see if that connects. Switching to an alternate DNS server like 1.1.1.1 might help too.
Are you suggesting that multiple devices might be using the same IP? That would be odd since everything else is DHCP. I can ping google.com, but strangely, only some websites are loading.
Here's the output:
``` mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 mtu 1500 qdisc noqueue state UP group default qlen 1000
ip address
1: lo:
inet 127.0.0.1/8 scope host lo
2: wlp3s0:
inet 192.168.178.66/24 brd 192.168.178.255 scope global noprefixroute wlp3s0
```
And for `ip route`:
```
169.254.0.0/16 dev wlp3s0 scope link metric 1000
192.168.178.0/24 dev wlp3s0 proto kernel scope link src 192.168.178.66 metric 600
```