0

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

syalam
  • 155
  • 1
  • 5

2 Answers2

0

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.

MaQleod
  • 503
  • 2
  • 5
  • 17
0

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.

bagavadhar
  • 538
  • 4
  • 14