Why Are Some Websites Not Loading After Setting My Static IP?
Asked by
reusable stencils
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?
Answers
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.
Reply to this answer
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.
reusable stencils: I tried `ping google.com -6`, and that worked too. I hadn't thought about IPv6 being the cause. Thanks for the tip!
Reply to this answer
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.
Reply to this answer
Switching back to DHCP didnโt help, but I did find that using networkd as the renderer seems to fix the issue.
Reply to this answer
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.
reusable stencils: Here's the output: ``` ip address 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 inet 127.0.0.1/8 scope host lo 2: wlp3s0: mtu 1500 qdisc noqueue state UP group default qlen 1000 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 ```
Reply to this answer
Add your answer
Answers are reviewed before publication.
reusable stencils: 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.