Eth0 drops IP constantly in Host Only setup

Discussions about using Linux guests in VirtualBox.
Post Reply
highroller
Posts: 1
Joined: 19. Jan 2013, 02:02

Eth0 drops IP constantly in Host Only setup

Post by highroller »

Hi,
I have been trying to solve this problem for a long time, but no solution so far. I am using Virtualbox 4.2.6, Debian 6 guest vm, Windows 7 host. Guest has both host-only adapter and NAT adapter. I ssh from Windows host to linux guest using host-only adapter(eth0). For some reason, eth0 at debian guest loses IPv4 randomly, sometimes every 2 hours, sometimes longer. No such problem exists if I am using bridge adapter. There is one more guest vm, and host-only adapter allow all 3 to talk to each other. I have to use Host-only adapter, not bridge because the wifi router I am using is having some kind of wifi isolation setup, and I have no control over it. I just do "/etc/init.d/network-manager restart" to regain the ipv4, but it will drop again after 1 hour or so sometimes. It lasts longer if I reboot the guest vm.

Does anyone know how to fix this? or a work around?
Thanks.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Eth0 drops IP constantly in Host Only setup

Post by Perryg »

Make sure that you have set the power management to never. It also sounds like it could be a ttl issue since you say about 1 to 2 hours. Strange thing is I have a setup close to this and run for weeks without loosing the network for one of my clients, but it is a server (no gui). To turn off power save and screen blanking I issued the following

Code: Select all

setterm -powersave off -blank 0
If this helps and you want to make it permanent put this in the /etc/rc.local
Post Reply