Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

I have an Arch Linux install in a VirtualBox VM, and as I'm working all of a sudden, it will lose its dynamic IP address.

When this happens, if I check on the status of the dhcpcd service, it says it's running.

$ systemctl status dhcpcd.service
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service: enabled)
   Active: active (running) since Sat 2013-09-28 20:10:32 EDT; 49min ago
 Main PID: 166 (dhcpcd)

I can try to restart the service, but it does not establish an IP.

$ sudo systemctl restart dhcpcd.service
**No output is returned from the command*

I can set an address manually, and it will work for a while, but then it'll drop again after a few minutes.

$ sudo ifconfig enp0s3 netmask up
$ sudo route add default gw

I can also run dhcpcd manually, and it will successfully get an IP address, but again it will drop after a few minutes.

$ sudo dhcpcd enp0s3
dhcpcd[2580]: sending commands to master dhcpcd process

I have tried disabling dhcpcd.service and using dhcpcd@enp0s3.service, but it has the same results. Any ideas?

share|improve this question
You don't have another network manager running, do you? – jasonwryan Sep 29 '13 at 1:28
@jasonwryan, no. – druciferre Sep 29 '13 at 1:32
I'd use dhclient instead. I experienced lots of problems with dhcpcd on Gentoo lately. Probably they appeared after update, however it didn't work well until I changed the client app. – webKnjaZ Oct 5 '13 at 0:47
dhcpcd on arch linux behaves a bit differently from other distros. For example, it spawns its own wpa_supplicant, and it probably does something similar for wired connections. I would look carefully at the source, I believe there is an argument you can pass to dhcpcd to make it behave normally – pepper Jun 13 '14 at 21:05
Can you post the dmesg | tail output when this happens? – Braiam Dec 26 '15 at 1:29

I just experienced the same problem and worked around it by installing an older version of dhcpcd. the latest version that seems to work is 5.6.8-1

Maybe try manually compiling the package? or disabling dhcpcd entirely and just configuring your vm ip statically.

share|improve this answer

if you want to have virtuliztion with virtualbox without DHCP, you should the following script for root and for username:

VBoxManage hostonlyif ipconfig vboxnet0 --ip --netmask
VBoxManage hostonlyif ipconfig vboxnet0 --ip --netmask
VBoxManage dhcpserver remove --ifname vboxnet0
VBoxManage dhcpserver remove --ifname vboxnet1

Of course , you should change thsese parameters manaulay, or add ineterface or remove interface, because i don't know you how many have interface.

share|improve this answer
I want to keep DCHP. The problem is it keeps losing its address every few minutes. – druciferre Sep 29 '13 at 3:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.