web hekata.blog.hr

Cogito ergo hm...

ponedjeljak, 11.12.2006.

How Does DNS Works With A Website

The Domain Name System or Service (DNS) is a process that maps hostnames (how humans address servers) to IP addresses (how computers address servers).When you visted www.dyndns.org, your computer resolved that hostname as 63.208.196.100. This translation happens every time you access a website, FTP server, or your e-mail.

Here is an example of how DNS works when accessing a website. There are three parts necessary for someone to access a remote service on a server: domain registration, DNS service, and the actual service such as a website:

Domain registration
The virtual real estate - Purchasing a domain gives you a lease to a domain name from a domain registry like .com, .net, or .org. The domain registrar allows you to specify nameservers for that domain.
DNS
The glue - When someone types in a domain name like 'dyndns.com', a process called the domain name system (DNS) works to turn that name into a number called an IP address. Only with the number can you access a website.
Service (eg. web site, email, FTP)
The content - After the DNS is resolved, the client will access the service at the given IP address and return a webpage in this case.

DNS is a required "glue" for any Internet application or service where you use a hostname or domain name. DynDNS provides domain registration and DNS service in addition to mail services and network monitoring.

There seems to be a lot of confusion on the Internet at large as to how DNS works. This is a quick (somewhat technical) run-down of how a DNS query works. Most of these servers/hostnames do exist, but these delegations aren't necessarily valid, and we know some of this is short-circuited in some configurations. This is explained the longest way possible to convey the most information possible.

So, you want to resolve the IP address of www.dyndns.org. How does your computer talk to ours? Well, that name really doesn't mean anything in and of itself; traffic on the Internet is routed using IP Addresses, which are sets of four numbers, each between 1 and 255, something like 63.208.196.100. DNS simply provides a mapping from www.dyndns.org-style names to 63.208.196.100-style IP addresses. Pretty simple so far, right?

Well, now it starts getting more complex. You're sitting at your computer, and you try to access www.dyndns.org. What happens first? Your computer probably asks your ISP's nameserver, which was configured when you dialed in or got your DHCP lease. It will be doing the rest of the work for you, because it operates recursively.

How does your ISP's nameserver find the answer for you? We'll assume that it doesn't have any information cached - that is, stored from things it's already looked up in the past. Caching can short-circuit some of this process, but we want to go through the whole process to understand it better. At each stage of this process, your ISP's nameserver will be asking for information about www.dyndns.org. Unlike your first query, though, none of these servers will be recursive, so they'll only give a more limited set of information based on what they already know. First, the server will send a query to the root-servers. These are a group of very high-powered servers that know about all the Top Level Domains, such as com, net, org, and all the country domains. So, your ISP's server will ask one of them, say, e.root-servers.net (they're named a through m) what it knows about www.dyndns.org. It'll respond that it only knows one bit of information - org is served by a bunch of other nameservers, the GTLD-servers.

This is a referral; the root server your ISP's server queried will give you the names and IP addresses of the GTLD servers for .org, including, for example, tld1.ultradns.net. Your ISP's server will then follow the delegation and ask one of those servers what it knows about www.dyndns.org. The answer will come back that this server knows a little bit more - dyndns.org is served by ns1.dyndns.org, ns2.dyndns.org, ns3.dyndns.org, ns4.dyndns.org and ns5.dyndns.org.

Your ISP's nameserver will continue diligently following the delegation, and ask ns.dyndns.org what it knows about www.dyndns.org. Lo and behold, it gives you an actual IP address (or an authoritative "that host doesn't exist" answer), which your ISP's nameserver will then return to you, the client. You can then use that IP address to talk to our server!

At each step of this process, your ISP's nameserver will be caching the answers it gets - when you ask it for members.dyndns.org, it will be smart enough to go back to ns.dyndns.org, the server that it knows is authoritative for dyndns.org hostnames. That information is cached for a length of time specified by the TTL of the DNS records, which is part of the information it got in reply to every query it was making earlier in the process.
- 08:15 - Annotation? (0) -

Creative Commons License
Ovaj blog je ustupljen pod Creative Commons licencom Imenovanje-Dijeli pod istim uvjetima.

Moto

Better to write for yourself and have no public, than to write for the public and have no self.
New Statesman 1933

Vezovlje

  prosinac, 2006 >
P U S Č P S N
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Travanj 2007 (2)
Ožujak 2007 (1)
Veljača 2007 (1)
Siječanj 2007 (2)
Prosinac 2006 (6)

Dnevnik.hr
Gol.hr
Zadovoljna.hr
Novaplus.hr
NovaTV.hr
DomaTV.hr
Mojamini.tv

Komentari On/Off

Navodi

One day Alice came to a fork in the road and saw a Cheshire cat in a tree. Which road do I take? she asked. Where do you want to go? was his response. I don't know, Alice answered. Then, said the cat, it doesn't matter.yes
Lewis Carroll

An intellectual is a person who has discovered something more interesting than sexyes.
Aldous Huxley

When I was a kid I used to pray every night for a new bicycle. Then I realized that the Lord doesn't work that way, so I stole one and asked for forgiveness.yes
Emo Philips