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

How can I assign IP addresses dynamically to subdomains created on my domain?

share|improve this question

migrated from superuser.com Nov 23 '10 at 6:53

This question came from our site for computer enthusiasts and power users.

    
Which operating system is your server using ? –  Iain Nov 23 '10 at 8:19

2 Answers 2

A domain itself has no IP, it is associated with one via DNS records. You do the same with any subdomain. www.mydoamin.com can point to xxx.xxx.xxx.xxx while mail.mydomain.com can point to yyy.yyy.yyy.yyy and so on, just adding A records.

I only mention the above because DNS is something that tends to propagate slowly. If you were to continually change your DNS records, you would end up with DNS servers all over the place that are still catching up and could possible have people going to 2, 3, 4 or more addresses instead of the one you intend them to go, depending on how quickly you change those A records.

Can you possibly explain why you want to do this? there may be a better suggestion that can be offered if we knew more about what you were trying to do.

share|improve this answer

I don't understand what you are trying to achieve via dns. But for your question title assigning ip should be done via DHCP not via DNS. I don't understand how dns can assign ip. As far as i know, dns is for translating name to ip and vice versa. But setting the hostname and ip address is the done via dhcp. I think you are looking at the wrong place or can you explain better.

share|improve this answer

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.