Yannick Weiss

Testing DHCP Behaviour of Network Devices

IKEA Gateway

  • Advertises MDNS with link-local address: ✅
  • Does switch from link-local to DHCP if a DHCP server is available: ✅
  • Does it update its internal time (NTP) when DHCP server becomes available: ❎

The Apple HomeKit certification requires devices to implement link-local, mDNS and DHCP correctly.

Raspbian - Raspberry Pi

  • Fresh install gets a link-local address: ✅
  • Fresh install advertises MDNS with link-local address: ✅
  • Does switch from link-local to DHCP if a DHCP server is available: ✅

Raspbian uses avahi-daemon for advertisement and dhcpcd for network configuration. To find in your network use: ping raspberrypi.local

Armbian - Nanopi Neo 2

  • Fresh install gets a link-local address: ❎
  • Fresh install advertises MDNS with link-local address: ❎
  • Does switch from link-local to DHCP if a DHCP server is available: ❎

Armbian uses dhclient and a python script in networkd-dispatcher for network configuration. It seems that the distro expects the user to configure static IP.

Lesson

Not every device switches from link-local to DHCP if the DHCP server comes online late. If possible configure static IP for these devices.

You can test this at home by simulating a power outage,

Bonus: Installing mDNS and advertise SSH on Raspberry Pi

sudo apt-get install avahi-daemon -y
sudo nano /etc/avahi/services/ssh.service
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name replace-wildcards="yes">%h</name>
  <service>
     <type>_ssh._tcp</type>
     <port>22</port>
  </service>
</service-group>