Saturday, August 15, 2020

When VMs won't keep an IPv4 address

Today while troubleshooting Internet slowness on my laptop I noticed that a virtual machine I had running lacked an IPv4 address. It had an IPv6 address and could connect to some sites including the host machine. After some stumbling around I found this Ask Ubuntu answer which mentioned clock skew. Sure enough, my modem/router's time was an hour off, possibly due to automatic Daylight Savings Time adjustment being disabled? I fixed that and made the VM reattempt DHCP configuration. It got an IP address, but with a very short lease. A little while later I found that its IP became the same as the host's, which was concerning. I only got it to hold onto a unique IP by adding a DHCP reservation in the router settings.

No comments:

Post a Comment