Perhaps something went haywire with your dns settings? If it happens
again, you might check the contents of /etc/resolv.conf to make sure it
hasn't been nuked or replaced with something silly.
It's useful to determine whether the problem is name resolution, or
actual connectivity. Pinging your default gateway or other known hosts
by IP address can provide helpful clues, as can doing some host lookups.