This is something that has been bothering me for the last months. I tried it in several different ways but none of them solved my problem. No matter the changes I made, after rebooting the Pi it always got both and static and dynamic IPs…
After all these months I finally found the solution, yay! 😀
This magic was hidden in the comments section of this blog. (kudos to Tchelovek)
As of today (23/03/2015) installing Archlinux on a Raspberry Pi (B+ / 2) does not use dhcpcd at all, instead systemd-networkd is used.To change from DHCP to static IP editing /etc/systemd/network/eth0.network is required. By default it contains [Match]
Name=eth0
[Network]
DHCP=bothOne needs to modify it to[Match]
Name=eth0
[Network]
#DHCP=both
DNS=192.168.178.1
Address=192.168.178.22
Gateway=192.168.178.1(change IPs as required)Review at https://wiki.archlinux.org/index.php/Systemd-networkd#Basic_DHCP_network Tchelovek
Turns out the newest versions of Arch use systemd-network, so in order to set up a static IP for eth0 you need to edit this file…
# vi /etc/systemd/network/eth0.network
… and add something like…
[Match] Name=eth0 [Network] DNS=192.168.1.1 Address=192.168.1.XXX Gateway=192.168.1.1
Before finishing don’t forget to disable dhcp and netctl services. You won’t need them anymore.
# systemctl disable dhcpcd@eth0.service
# systemctl disable netctl
After rebooting, the Pi should get the IP specified on eth0.network
Cheers!
Daniel.