New Perspectives On Web Design

(C. Jardin) #1

CHAPTER 8 How to Fix The Web: Obscure Back-End Techniques and Terminal Secrets


database. You are probably aware that there is no single computer
which knows all the translations and which everybody else consults.
Rather, it is a huge network of computers each of which know a few
translations, and know who else to ask if they don’t.

YouR loCal DnS SeRveR
Every computer knows about a local DNS server. It is one of the crucial bits
of information your broadband router provides via DHCP: your IP address;
your default gateway’s IP address; and your local DNS server’s IP address.
When you type a website address into your browser, your computer
first asks its local DNS server to translate it into an IP address. To find
out your DNS server, run the command cat /etc/resolv.conf on Mac
and Linux^11 , or ipconfig /all on Windows. On Mac and Linux, the cat
command displays a file, and the file /etc/resolv.conf contains your
domain name servers. The file looks like:
$ cat /etc/resolv.conf
nameserver 194.168.4.100
nameserver 194.168.8.100

nSlooKuP
To diagnose DNS problems, first check that your local DNS server is alive
with ping. If it is, then you can use the nslookup command to see if it’s
responding correctly. nslookup stands for name server lookup and is used
like this:
$ nslookup http://www.smashingmagazine.com
Server: 194.168.4.100
Address: 194.168.4.100#53
Non-authoritative answer:
Name: http://www.smashingmagazine.com
Address: 80.72.139.101

11 Some versions of Mac OS X (Mountain Lion) do not use /etc/resolv.conf but you should be able to
find the information within System Preferences from the Apple menu.
Free download pdf