I have a desktop and a laptop each with a wireless and wired (eth0) network adapter running Arch Linux. The wireless network(s) that I am on prevents the laptop from seeing the desktop. What I would like to do is use the wired adapters such that I can ssh from the laptop to the desktop. The wired adapter on the desktop is not currently used for anything, but the laptop connects to a variety of wired networks via DHCP. I can manually setup the network at the desktop and laptop are connected via the network cable, but I am having problems automating the setup.

For the manual case, if I connect the desktop to the laptop with a network cable first everything works fine when I run:

# ip link set down dev eth0
# ip addr add dev eth0
# ip link set up dev eth0
# systemctl start dhcpd4@eth0.service

where the DHCP server setup and dhcpd4 service file comes from the Arch Wiki.

The issue is that things fall apart if the network cable is not plugged in when I try and assign the IP address and start the DHCP server. I thought maybe ifplugd might help, but I do not see how to use it to start a DHCP server.

1 Answer 1


Given that you A) don't use eth0 on the desktop except for this purpose and B) use eth0 on the laptop to connect to other networks, you should configure the dhcpd service on the desktop. You may already be doing this, but it's not clear in your question.

Beyond that, all you should need to do is set a static IP on the desktop's eth0 interface that is in the same subnet as the addresses provided to the laptop by dhcpd. See either netctl or systemd-networkd at https://wiki.archlinux.org/index.php/Network_configuration#Static_IP_address

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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