New Perspectives On Web Design

(C. Jardin) #1

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


Compare this to the nslookup on your local DNS server. It no longer
says “non-authoritative”. This is now the authoritative reply. It’s the same
IP address, so we know that http://www.smashingmagazine.com didn’t suddenly
move last night.
On Mac and Linux, you can use the dig command to find out exactly
how long your local DNS server has cached this translation for. It stands
for domain information groper. Windows users will need to search for an
online dig tool as Windows doesn’t natively support this command:
$ dig http://www.smashingmagzine.com
...
;; ANSWER SECTION:
http://www.smashingmagzine.com. 246 IN A 80.72.139.101...

The 246 is the number of seconds before the local DNS server’s cache
expires and it has to rediscover the IP address for smashingmagazine.com.

YouR bRoaDbanD RouTeR ReviSiTeD
Now that DNS is working, you can find out what the world thinks of you.
You have already discovered your computer’s own IP address above. But
that may not be the one that it uses on the Internet. If it starts with 192.168
or 10 , then it is definitely not a public address. Those IP address ranges
signify local IP addresses for use within your internal network only.
When your computer sends a request to the Internet, it first goes
to your default gateway (your broadband router), which also has a local
internal IP address such as 192.168.0.1. But your router has another
public IP address as well. Your router wraps up your request and resends it
from this public IP address instead.
Therefore, your broadband router’s public IP address is basically your
public IP address. This is how the rest of the Internet sees you as you browse.
This is the IP address that will show up in log files in any of the websites
you visit. Consequently, anybody else using the same broadband router
will have the same public IP address as you. Your router handles all of this
Free download pdf