SunQuest
           DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old December 31st, 2003, 08:30 AM
kubicon's Avatar
kubicon kubicon is offline
pogremar
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: At Work
Posts: 945 kubicon User rank is Corporal (100 - 500 Reputation Level)kubicon User rank is Corporal (100 - 500 Reputation Level)kubicon User rank is Corporal (100 - 500 Reputation Level)kubicon User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 14 h 50 m 47 sec
Reputation Power: 7
in the abstract

I've been reading posts, but I can't seem to find my answer.
To me, it's important to understand how things work in the abstract, otherwise i have a hard time understanding the rest. I'm having a little bit of trouble understanding the following concept.

I set up a dns server on my network. I set the computers to make use of that server. No problem. What I don't understand is how do computers from the outside world know that the ip address of 207.68.xxx.xxx maps to the name foobar.com, which is my domain residing on the server which is on my network.
I'm know that when you go to your registrar and point the dns settings to your ip address that has the dns server on it. This will do something to make other people know about the dns server. But how does this information get's spread around. "if you want to read foobar.com go to this ip address".
__________________
Some day I'll create a smart quote to put here.

Reply With Quote
  #2  
Old December 31st, 2003, 09:55 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,193 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 14 h 27 m 56 sec
Reputation Power: 77
I'm just like you. I have to understand the fundamental things to truly understand the surface things. That is the main way I learn things. I won't remember surface things without understanding why they work. But anyway... here's the core of it...

THE CLIENT

1) "User" enters the domain "www.yahoo.com" into "Internet Explorer" and presses enter. "Internet Explorer" asks the "OS" for information on "www.yahoo.com".
2) "OS" attempts to find a matching IP in its hosts file (this fails)
3) "OS" sees that it is configured to use 2 DNS servers. These IP addresses are DNS caching servers setup by their ISP so that you can resolve domain names quickly, these addresses are "127.0.0.1" and "127.0.0.2". "OS" creates a UDP DNS query packet for the domain "www.yahoo.com" and sends it to "127.0.0.1" on port 53. It also set a flag in the DNS packet to ask the server to completely resolve the request before sending back a response. This may take several requests on the resolver's part.

THE RESOLVER

4) "127.0.0.1" recieves the UDP request for "www.yahoo.com".
5) "127.0.0.1" checks to see if they are hosting the domains "www.yahoo.com" and "yahoo.com" and "com". It is not, so therefor the server is "not authoritative" for this domain. It must resolve it. This should always be the case for resolver or "caching" dns servers.
6) "127.0.0.1" then checks to see if it is configured to forward requests to other caching servers. It is not, so the server must resolve the request itself.

Notice the following steps be performed by my script:
http://www.dollardns.org/cgi-bin/DN...&lr=4&submit=DS

7) "127.0.0.1" consults its list of root servers. It then constructs a UDP request packet for "www.yahoo.com" and sends it to "a.root-servers.net".
8) "127.0.0.1" recieves a response from "a.root-servers.net" with a list of DNS servers the resolver should query next. This is essentially saying "I have no clue, but these guys might". "127.0.0.1" resends the request to one of them; A.GTLD-SERVERS.NET.
9) "127.0.0.1" recieves a response from "A.GTLD-SERVERS.NET" with a list of DNS servers the resolver should query next. In this case, it just so happens that it is a list of the host servers for yahoo.com. "127.0.0.1" resends the request to one of them; ns1.yahoo.com.
10) "127.0.0.1" recieves a response from "ns1.yahoo.com" with a CNAME or redirect to "www.yahoo.akadns.net".

The following step is shown by clicking on "www.yahoo.akadns.net" in the DNS Crawler.

11) "127.0.0.1" starts the entire process all over again for the domain "www.yahoo.akadns.net". This is why CNAME should be avoided. It costs more time, bandwidth, and resources to process them. Anyway, it gets the IPs for www.yahoo.akadns.net.

The response looks something like this:
http://www.dollardns.org/cgi-bin/DN...s=256&submit=DS

12) "127.0.0.1" finally returns a response to the "OS" that sent the request with both the CNAME and IP's.

THE CLIENT

13) "OS" recieves a response from the resolver, so it does not attempt to query "127.0.0.2".
14) "OS" passes the response information back to "Internet Explorer".
15) "Internet Explorer" then asks the "OS" to connect to the first IP in the list on port 80.

And that's where I'll stop since that's the end of how DNS involves itself.
__________________
Send me a private message if you would like me to setup your DNS for you for a price of your choosing. This is the preferred method if your DNS needs to be fixed/setup fast and you don't have the time to bounce messages back and forth on a forum. Also, check out these links:

Whois Direct | DNS Crawler | NS Trace | Compare Free DNS Hosts

Last edited by SilentRage : December 31st, 2003 at 09:58 AM.

Reply With Quote
  #3  
Old December 31st, 2003, 10:24 AM
kubicon's Avatar
kubicon kubicon is offline
pogremar
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jul 2003
Location: At Work
Posts: 945 kubicon User rank is Corporal (100 - 500 Reputation Level)kubicon User rank is Corporal (100 - 500 Reputation Level)kubicon User rank is Corporal (100 - 500 Reputation Level)kubicon User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 3 Days 14 h 50 m 47 sec
Reputation Power: 7
Thank you. This is of great help. You are very knowledgeable.
At the beginning I didn't realize that you were using 127.0.0.1 as a fictitious remote address. I was like "ok, so the OS sends a dns query to 127.0.01, or in other words to itself". That confused me a little. I read it again and replaced the loopback address with a real address it made total sense.

question:
Since the server is a caching server, after step 5 if the server has already cached the address for the requested www.yahoo.com, will return it and and forget about the other steps?

Reply With Quote
  #4  
Old December 31st, 2003, 10:42 AM
SilentRage's Avatar
SilentRage SilentRage is offline
DNS/BIND Guru
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jun 2003
Location: OH, USA
Posts: 4,193 SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level)SilentRage User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 5 Days 14 h 27 m 56 sec
Reputation Power: 77
Darnit, I forgot to include that.

IF NOT CACHED

...
5) "127.0.0.1" checks to see if they are hosting the domains "www.yahoo.com" and "yahoo.com" and "com". It is not, so therefor the server is "not authoritative" for this domain. This should always be the case for resolver or "caching" dns servers.
6) "127.0.0.1" checks its cache for information reguarding "www.yahoo.com". No cached information exists.
7) "127.0.0.1" checks to see if it is allowed to provide recursion. it does, so it must resolve the request.
8) (previously step 6) "127.0.0.1" then checks to see if it is configured to forward requests to other caching servers. It is not, so the server must resolve the request itself.
...

IF CACHED

...
5) "127.0.0.1" checks to see if they are hosting the domains "www.yahoo.com" and "yahoo.com" and "com". It is not, so therefor the server is "not authoritative" for this domain. This should always be the case for resolver or "caching" dns servers.
6) "127.0.0.1" checks its cache for information reguarding "www.yahoo.com". Cached information is found! (notice that whether it supports recursion or not is never checked)
7) "127.0.0.1" checks to make sure the relevent cached information has not expired. It hasn't.
8) (previously step 12) "127.0.0.1" returns a response to the "OS" that sent the request with all relevent information.
...

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > in the abstract


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway