In cases like this it helps to break the problem down – which in turn means knowing something about the pieces that need to line up for a network connection to succeed. Much of this information isn't specific to the Pi or it's OS, but it will be helpful to know the tools and foibles of the particular hardware and OS that you are using.
This question and its answers may help: How do I set up networking/WiFi/static IP address?.
Testing with other devices on the same network may also help pinpoint where the problem lies. Rebooting often works wonders.
In general you want to start close and expand as you test, so you might:
- Check that your network is up and basically working by trying to ping a machine on your local net by IP address (
- Check that you can talk to your router by attempting to ping the internal interface of your router by IP address (
- Check that your router is routing by doing a ping to the external interface of your router by IP address (
- Now try to reach your router's router by attempting to ping your router's default route by IP address (
ping 184.108.40.206). Success means that you can reach a remote machine – specifically the machine that your router will be forwarding all of your Internet traffic to
- Now verify that it is all working with a to ping something far away by IP address (
If those all work then you have a network connection that is working at the IP level. If any of them fail, then that is the spot to start investigating further.
Next test that DNS works. You could:
dig to check it DNS requests are getting resolved. Use a well known server by IP address (e.g., 220.127.116.11 or 18.104.22.168) –
dig google.com @22.214.171.124
- Then try the same thing using the DNS server that you have configured.
- Then try pinging a "new" host (one that you're confident isn't in your local resolver cache.
If you don't have
nslookup or a similar tool you can use