dns service discovery

who reads RFCs...

SEAN K.H. LIAO

dns service discovery

who reads RFCs...

dns service discovery

Globally available key-value store, let's use it for service discovery!

iana service name and port directory

SRV

Basic: a single instance per service. (can have multiple records, but each host is expected to serve the same data)

1_service._protocol.zone. SRV "priority weight port instance1.zone"

DNS-SD

Turns the _service._protocol into a listing of instances.

1_service._protocol.zone. PTR instance1._service.protocol.zone.
2_service._protocol.zone. PTR instance2._service.protocol.zone.

and each instance gets an extra TXT to store additional data needed per protocol.

1instance1._service.protocol.zone. SRV "priority weight port instance1.zone"
2instance1._service.protocol.zone. TXT "key1=value1,key2=value2"
3
4instance2._service.protocol.zone. SRV "priority weight port instance2.zone"
5instance2._service.protocol.zone. TXT "key1=value1,key2=value2"

how can i use this

Totally not tested. On DNS server

1_wireguard._udp.example.com. PTR base32pubkey1._wireguard._udp.example.com.
2
3base32pubkey1._wireguard._udp.example.com. SRV "10 0 41630 mylaptop.local"
4base32pubkey1._wireguard._udp.example.com. SRV "20 0 ????? mylaptop.wgsd.example.com."
5base32pubkey1._wireguard._udp.example.com. TXT ""

and have mylaptop respond to mDNS for local lookup, falling back to something like wgsd.