Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Could not find an answer, really. So I have a server running having one ip address assigned. The server is hosting www, dns and mail.

This is how I tried to configure it (excerpt):

               IN    NS     ns1.domain.com
               IN    MX     mail.domain.com
   mail        IN    A      ip.ip.ip.ip
   ns1         IN    A      ip.ip.ip.ip
   www         IN    CNAME  mail

This is not allowed I think, since only one A record is possible per ip.

I tried to fix this with this config:

               IN    NS     ns1.domain.com
               IN    MX     mail.domain.com
   mail        IN    A      ip.ip.ip.ip
   ns1         IN    CNAME  mail
   www         IN    CNAME  mail

But then I get the error, that a CNAME for a nameserver is illegal.

How can I fix this? I only have one IP!

share|improve this question
2  
What exactly isn't working? Show the output from dig for a lookup that's wrong. Also, you are missing trailing dots from the fully qualified domains on the right hand side. (The MX and NS records above.) –  Ladadadada Feb 13 '13 at 10:18

2 Answers 2

up vote 7 down vote accepted

Why do you think you can only have one A record per IP? You can have as many as you like. The first example is correct and fine.

What you can't have is mutliple IP's for the reverse lookup. I think you may of confused the two.

share|improve this answer
1  
Ah, all right! Phew. Thanks! –  Rainer Feb 13 '13 at 11:00

You can have multiple RRs pointing to the same IP address. Using CNAME records can be useful in many circumstances but NS and MX records are not one of them. Make sure that you NS and MX RRs point to an A record.

RFC2181 section 10.3 says

10.3. MX and NS records

The domain name used as the value of a NS resource record, or part of the value of a MX resource record must not be an alias. Not only is the specification clear on this point, but using an alias in either of these positions neither works as well as might be hoped, nor well fulfills the ambition that may have led to this approach. This domain name must have as its value one or more address records. Currently those will be A records, however in the future other record types giving addressing information may be acceptable. It can also have other RRs, but never a CNAME RR...

share|improve this answer
    
Thanks lain! Helped. –  Rainer Feb 13 '13 at 11:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.