Jump to content

trying to understand DNS


michaellunsford

Recommended Posts

Slowly, I'm getting my head around DNS. There are two things, though, that I just don't get. Any clarification would be greatly appreciated.

1. Email. Okay, I'm totally confused. dnsstuff recommends that you have a primary and a secondary mail server. Soooo, lets say I have two mail servers: which one do I setup in the email client? And, If the primary server is down, how does the secondary server act in its stead? Does it receive email and update the primary when it comes back online?

2. Name servers. dnsstuff recommends two different name servers that are separate from the server hosting the website. Question: if the website server is down, what's the difference how many name servers you have and where they're located?

Thanks!
Link to comment
Share on other sites

Both of these are just recommendations.

For question #1 - having multiple mail servers, in the context of your DNS setup, refers to receiving mail servers and their MX records. Each MX record has a priority number. Sending mail servers get all the MX records and attempt to make contact with the receiving mail servers in the order of their priority (I think the lower the number, the higher the priority.) The MX record is not used when connecting using a mail client (you enter the mail server host name/IP address directly in the settings in the client.) If you did have more than one mail server (primary/backup), the backup would typically only cache mail and forward it to the primary whenever the primary is online. If you needed to connect to the second mail server using a client program, you would need to setup a second account in the client with the settings for that mail server.

For question #2 - this is just a recommendation from a reliability/single-point failure standpoint.
Link to comment
Share on other sites

Well written, but I'll try and clarify those points a little bit.

Point #1: Say, for example, you send an email to user@example.com. The email client asks its DNS server for an MX record for "example.com", so it knows the IP address to send the mail to. (This all happens in the blink of an eye.) When the DNS server gets the request for an MX record, it checks to see if the host in the primary MX record is available. If so, it returns that machine's IP address. If not, then it checks to see if there are any other MX records belonging to example.com, and if so, it returns the highest available record. Once the mail client has the IP address, then it sends the email to that IP address and it's all up to the other server from that point.

And point #2: If the website server is down, there's nothing that you can do. Any number of name servers won't do anything if the website server is down. The extra name servers come in handy in case one of the NAME servers goes down. If the primary name server goes down, then there's another server to fall back on.
Link to comment
Share on other sites

The email stuff is still fuzzy. I guess I'd have to understand how to setup an independent email server and how to set up communication between the primary and secondary.

Now, as for the multiple name servers, why not have the name server and the hosting server be one in the same?
Link to comment
Share on other sites

[quote author=michaellunsford link=topic=120542.msg495040#msg495040 date=1167708186]
Now, as for the multiple name servers, why not have the name server and the hosting server be one in the same?
[/quote]

You could do that, but it would be impractical in a large-scale situation. A big hosting company will usually have one or three nameservers that keep track of dozens/hundreds of servers. If you had a small network, though, and only one web server, then it would be perfectly acceptable to have it handle DNS as well.
Link to comment
Share on other sites

[quote]Plesk is very cost prohibitive for such things.[/quote]
Plesk merely provides a gui front end to bind9.

bind9 is the best and easiest to install (my subjective thoughts :-) )
[code]apt-get install bind9[/code]

Here is my how-to on bind9: http://wiki.kartbuilding.net/index.php/DNS_-_Bind9

Rgds,
Steve
Link to comment
Share on other sites

Off hand - I dont know a decent nameserver web gui. A quick google reveals:
http://www.debianadmin.com/bind-dns-server-web-interfacefrontend-or-gui-tools.html

As you said - bind9 configs are very simple and as a result most companies would develop their own front ends.
Each domain has a zone file where all associated details are kept.

-steve
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.