the internet does not work

Go step by step from this machine out: its address, the router, the internet by number, then by name.

  • network

Steps

  1. ip -br addr

    the network interfaces and their addresses; one should be UP with an address (Linux)

  2. ip route

    the default route, through the router

  3. ping -c 3 1.1.1.1

    reach the internet by number

  4. ping -c 3 example.com

    reach it by name, which needs DNS

  5. resolvectl status

    the DNS servers in use (systemd; else read /etc/resolv.conf)

  6. curl -I https://example.com

    a whole web request, with the answer's headers

  7. tracepath 1.1.1.1

    where on the way the packets stop

Notes

  • Numbers work but names do not: DNS is the problem.
  • No default route, or no address: the problem is the cable, the Wi-Fi or DHCP, before the internet.
  • macOS: ifconfig, netstat -rn for the route, scutil --dns for DNS, and traceroute.

Commands used

  • ip
  • ping
  • curl
  • tracepath

Each has a page in lore: lore ip opens it.