Welcome to WebmasterWorld Guest from 107.21.16.70

Forum Moderators: buckworks & webwork

Message Too Old, No Replies

What do primary and secondary DNS actually do?

     
12:32 pm on Jul 18, 2002 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 21, 2001
posts:1281
votes: 0


What do primary and secondary DNS (domain name servers) actually do?

Do they simply hold a record of the name and direct traffic to the actual server that a website is on?

Am I correct in thinking that a site is usually not hosted on the DNS?

12:59 pm on July 18, 2002 (gmt 0)

New User

10+ Year Member

joined:July 15, 2002
posts:9
votes: 0


A DNS server or Domain Name Server has nothing to do with the WEB. It predates the invention of the web by quite a few years. Basically you can think of it as distributed phone-book that can work in both ways. It can get you the IP address (phone-number) of a given hostname and it can do the reverse and give you the name (person name) of a given IP address. It was invented a long time ago, because it became too difficult to manage hosts via the hosts file, which up to that point had been the normal practice. The internet became too dynamic for that to be a viable option any longer. As an aside; I can remember when we got our monthly update to the hosts file and quicky scanning through it to see what new entries there were for this month. Last one I saw was about 500K hosts (in one file).

When you use a DNS server, for either IP address or hostname, that is what it gives you. It does not direct you towards any web server, that is not its purpose.

When a browser wants to connect to a web server what it does first of all, is to ask someone for its IP address. That someone is usually a DNS server. The DNS server replies and the browser then happily goes on to connect to the web server.

Secondary DNS servers are there mostly as backup for the primary, since most function on the Internet is so dependent on these servers being available.

Another thing you should know about DNS is that it is built using a distributed hierachy of global to local information. So when a server changes IP address it will take some time for that to propagate around the world.

In most circumstances it is not a good idea to have both a web server and a DNS server on the same machine. There isn't anything that will stop you from doing so, but it is not smart seen from a security point of view.

Alf

1:39 pm on July 18, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 5, 2002
posts:1510
votes: 0


Nice round up. I can't fault anying arefsum said.

Chris

3:29 pm on July 21, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 27, 2001
posts:762
votes: 0


it will take some time for that to propagate around the world

My experience it is can take up to about a week. My ISP requires 5 days, earthlink seems to be about a day, my own DNS servers expire domain names after a week.

So if you are moving a site from one host to another (and I've done it a dozen times in the last year), be sure you take this into account. Also, if something breaks in your DNS (say you tried to change the MX to bigmailbox and it was messed up) then several days will be required for the screw up to propogate, then the fix.

In most circumstances it is not a good idea to have both a web server and a DNS server on the same machine

I've been doing this for some time with no issues, although it is true that it's generally not considered wise to mix any two servers on the same machine. You normally do not want to put, for example, your email server on the same machine as your web server. It just makes the machine more complex to manage and allows for multiple forms of attack to the same machine.

Basically you can think of it as distributed phone-book that can work in both ways.

See RFC 1912, 1537, 821, 822 and others for more information. I have all of the RFC's on my site and they are on numerous other sites as well. They are very interesting reading and contain the source data about how it all works.

RIchard Lowe

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members