Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Debian Linux, how can I get a new IP assignment on boot up? I'm working with VMs and I am required that every machine gets a new unique IP after booting up.

share|improve this question
Do you have a DHCP server on the same network subnet as the VMs? – shufler Jul 9 '12 at 14:49
You should tag and rephrase the question to make it clear that you're on a VM – PPC Aug 1 '12 at 21:02
up vote 1 down vote accepted

It probably depends on your VM configuration, which in turn depends on the VM engine you are using. There are several ways to connect a VM to your network:

  • the NAT, which is probably the default behavior, will explicitly use the same IP address as the VM host
  • Host-only private network will not let you communicate with the external world, which is not very useful
  • Bridge can do the trick but may be complex to configure
  • Your best bet is probably "internal" network (VirtualBox terminology), which will look like another interface and can get a DHCP lease easily.

have a look at VirtualBox' documentation at

Also be sure that all your VM guests have different MAC addresses, or else you will go into big trouble. Especially true if you create your VMs by copying (VirtualBox has a very visible option when duplicating VMs).

share|improve this answer
Yes! You are very right in that it depends on the VM engine. Apparently the VM itself does get the new IP address. It's just the engine that does not update correctly. – drum Jul 9 '12 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .