I'm running a Ubuntu 10.10 guest on a Windows 7 host with a bridged network adapter (WiFi). The router I'm using is a 2Wire 2701HG-G with DHCP enabled.
At first, I used to let the VM get its IP address from the router using DHCP. The problem with this was that after a while, the VM started using the host's IP address instead of the one it was originally assigned, thereby disconnecting the host from the network. I fixed this by modifying the guest's /etc/network/interfaces file and forcing it to use a static IP instead.
Although it's working just fine at the moment, it still isn't perfect. The problem now is that when I start the VM, it shows up on the router's list of active devices for an instant, after which it disappears even though it's still up. When the router sees it as inactive for more than a couple of hours, it reassigns the VM's IP back to the pool, even though the VM is still connected and accessible. As a result, it'll run just fine until another device connects to the network and is assigned the VM's IP address, which the router thinks is no longer in use.
Why does the VM only appear on the list for a brief moment after startup? Also, I'm guessing there's no way I can allow the guest to use DHCP without running into the same problem of it snatching the host's IP after a while.
VM won't show up on router
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: VM won't show up on router
Why not give the vm a static config? If you have seen the config which DHCP supplies you know what settings to use. Use an IP which is reserved in DHCP or use an IP from the high end of the scope (so that DHCP will not issue a duplicate).
Bill
-
dc200
- Posts: 14
- Joined: 23. Jan 2011, 22:41
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Ubuntu 10.10
Re: VM won't show up on router
I'm already using a static config for the VM and have given it the very last IP in the scope. The scope however is a very small one, and I'd like to keep it that way for certain reasons.
The issue is that the VM only shows up on the router's active device list for a brief moment after the VM starts up. The rest of the time, it shows up as inactive/offline for some reason, even though it's still up and accessible throughout the network. Once this happens, the router assigns its IP back to the pool. What I need is to figure out how to keep the VM on the router's active devices list, and therefore prevent its IP from being assigned back to the pool.
The issue is that the VM only shows up on the router's active device list for a brief moment after the VM starts up. The rest of the time, it shows up as inactive/offline for some reason, even though it's still up and accessible throughout the network. Once this happens, the router assigns its IP back to the pool. What I need is to figure out how to keep the VM on the router's active devices list, and therefore prevent its IP from being assigned back to the pool.