On Thu, 19 Oct 2017 11:33:42 +0100, you wrote: > We have met a problem when we move VM from one subnet to a different > subnet, and the DHCP remembers the previous lease and continues to > provide the same IP address to the VM, even though it is now on a > different subnet. > > We have a simple set up where we define two NatNetworks with separate IP > address (10.0.2.0/24 and 10.0.3.0/24) we study behaviour of a router > between these networks. We place an Ubuntu guest on each subnet. > > If we place a guest on the first network it is allocated IP address (eg) > 10.0.2.4. If we then move it to the second network it continues to > receive an IP address from DHCP of 10.0.2.4, and so cannot function on > the second network.
Does the guest release the lease before it is moved? I agree networks should have independent DHCP leases. Did you define a separate dhcpserver for each netowrk? > The workaround is to delete the lease file when VB is not running. We > would prefer the DHCP to properly recognise the subnet of a device and > allocate IP address accordingly. Another workaround might be to change the MAC address of the guest when it moves to the other subnet. You could even spoof the MAC from within the guest, if the OS allows that. Or perhaps define as many network interfaces in the guest as you have networks, and disconnect/connect to move it to another network. Not easy thoughm, and pretty ugly. -- Regards, Kees Nuyt ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ VBox-users-community mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/vbox-users-community _______________________________________________ Unsubscribe: mailto:[email protected]?subject=unsubscribe
