Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

DHCP IP addr and Avahi/mDNS

Sun Oct 26, 2014 2:47 pm

I'm writing a setup guide for students at a school computer club, to set up their own Raspberry Pi headless with the possibility of bringing it in to school. For home use, a static ip has something to be said for it, but foolproof instructions for choosing an ip address aren't easy. Conversely, if I recommend dynamic ip address allocation by DHCP, instructions for discovering the ip address are hardly easier.

Messing around with Wireshark the other day for an unrelated investigation, I noticed mDNS packets and realised that this might be the solution. I installed avahi-daemon on my Pi with default config, and can now access it using PuTTy or VNC simply as raspberrypi.local.

This seems almost too good to be true. Are there any hidden snags I'm not aware of? (A Google search seems to indicate that Avahi can be a cpu hog - maybe I need to refine the default config?) Or is there a better way of doing it? I'm not sure how mDNS compares with SSDP.

Regards - Philip

User avatar
Posts: 38775
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: DHCP IP addr and Avahi/mDNS

Sun Oct 26, 2014 3:05 pm

That is precisely what Bonjour (aka mDNS) is supposed to do.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Raspberry Pi OS”