Once all the necessary configuration for ArchLinux ARM is up and running, it’s time to access it over the network. Since I’m on an DHCP network, its best if I can access the Pi without needing to know the IP in advance. This is where mDNS comes in useful.
mDNS in short allows you to resolve the name of your machine without needing a nameserver or extra domain. Just by appending
.local to a computer name, you will be able to see the machine on your network. On Raspbian, this is up and running by default but on ArchLinux, you need to do some work to get it working. Below are the steps to get it working.
pacman -Syu avahi nss-mdns
/etc/nsswitchnsswitch.confto allow resolution of mDNs hosts. This is for the ArchLinux host to resolve other
.localdomains which I use quite regularly so I set it up as well. Make sure the
hostsline looks like the following
hosts: files mymachines mdns4_minimal [NOTFOUND=return] mdns4 myhostname resolve [!UNAVAIL=return] dns
Save and quit this file.
Now we want to start Avahi however DBus needs to be informed about the changes otherwise Avahi will fail.
systemctl restart dbus
Finally we start and enable avahi
systemctl start avahi-daemon systemctl enable avahi-daemon