General Question about DNS/name servers and the HOSTS file

SaltBoy

Diamond Member
Aug 13, 2001
8,975
11
81
I've been doing a small bit of research on DNS concepts and had just a slight question (through an example) that y'all might be able to answer.

Let's suppose that microsoft.com is hosted on WindowsXP Professional -- makes sense of course. On XP there is a file called HOSTS that I'm sure y'all are familiar with.

Now, let's also suppose that a user wants to get to microsoft's support site, support.microsoft.com. The name server on microsoft.com looks up support.microsoft.com in the HOSTS file in order to determine which IP address to send the potential user to. Am I right? Or, is there some other name server/file elsewhere in the microsoft.com network that looks up the subdomain "support" and determines which IP address to go to?

Am I making sense?
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
First of all, the HOSTS file is for client lookups on that machine only. It does not make the machine a DNS server, since no other machine can connect and query its HOSTS file.

On an actual DNS server, what happens when a user queries an address on a subdomain depends on how the DNS is set up. The subdomain (support.microsoft.com) could be hosted on the same server as the parent domain (microsoft.com), in which case the client will query that server directly. Or, the subdomain could be delegated to another DNS server. In that case, there is a record on the DNS server hosting the parent domain that lists the DNS server that is authoritative for the subdomain. So a client queries (recursive query) his primary DNS server, which hosts the parent domain for an address on the subdomain. The primary DNS server looks through its records, doesnt find the subdomain IP, but does find an IP of the server that could answer that query and sends that to the client. The primary DNS server will then contact the DNS server hosting the subdomain (iterative query) and get the IP the client needs. When it gets it, it caches it, and sends it to the client, to finish the recursive (definite answer) query.
 

SaltBoy

Diamond Member
Aug 13, 2001
8,975
11
81
So, an actual DNS server has to be set up for this to happen? What's an example of a DNS server -- is it a server that has a specific application installed on it that has the sole responsibility to take of DNS requests?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: SaltBoy
So, an actual DNS server has to be set up for this to happen? What's an example of a DNS server -- is it a server that has a specific application installed on it that has the sole responsibility to take of DNS requests?
Yes and yes. In the MS world, DNS is a component of the server OS's. In the *nix world, DNS usually mean some version of BIND - the Berkeley Internet Name Daemon - though there are some variants out there as well.

 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
Yes a DNS server is needed. A DNS server is just that. A server that listens for requests for name queries. Windows 2000 Server and Windows Server 2003 can run the DNS service. Linux and Unix boxes typically run BIND, another version of DNS. DNS servers listen on port 53 (both TCP and UDP).
 

SaltBoy

Diamond Member
Aug 13, 2001
8,975
11
81
Final questions -- are there machines/servers out there in the Internet world that are dedicated solely for DNS listening? How about domain level servers dedicated solely for DNS listening for subdomains, or would that be impossible?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Originally posted by: SaltBoy
Final questions -- are there machines/servers out there in the Internet world that are dedicated solely for DNS listening?
Sure, plenty of them. First off, because DNS is often a good use for aging hardware. Second, because DNS is important for network security - and on important servers you run as little as is necessary.
How about domain level servers dedicated solely for DNS listening for subdomains, or would that be impossible?
I'm not sure what you mean, but I have a feeling the answer is still Yes. :)