UPnP, SSDP, mDNS, LLMNR, etc. on the home network

Sometime in the distant past, I was aware of Universal Plug and Play (UPnP), but I didn’t know much about it. It’s a technology that allows devices in the home to talk to each other without prior configuration — it allows auto-discovery and configuration of printers and media servers, among other things.

The auto-discovery happens via SSDP (Simple Service Discovery Protocol). A device joins a network and announces “I’m here!”, and then other device can choose to respond. Even if the device gets a different IP address, it can still be uniquely identified by its unique identifier (UUID).

Here’s more information about UPnP and related protocols that run on the home network:

https://en.wikipedia.org/wiki/Zero-configuration_networking

UPnP:

UPnP protocol (no authentication):

  • Discovery (SSDP)
  • Description – HTTPU and HTTPMU
  • Control
  • Event notification
  • Presentation

UPnP has well defined device profiles for:

  • Audio & Video — DLNA, and
  • Routers:

    • Internet Gateway Device Protocol

    • Retrieve external IP addr

    • Enumerate port mappings
    • Add/Remove port mappings & port forwarding: firewall-hole-punching
  • Devices Profile for Web Services (DPWS)

Other protocols that help on the home network:

  • LLMNR: Link-local Multicast Name Resolution — implemented by Microsoft in Windows.
  • mDNS (multicast DNS) runs on port 5353. Uses .local hostnames.
  • DNS-SD: DNS service discovery. Can use DNS or mDNS.

Apple’s Bonjour uses mDNS and DNS-SD. Linux’s Avahi uses IPv4LL, mDNS, and DNS-SD. Linux’s systemd has “systemd-resolve”, a command-linetool to resolve hostnames on a network via DNS, mDNS, and LMMNR.