Google plane
Friday, January 26th, 2007Google flew a plane over my house today – they’re taking hi-res photos for Google Maps.

Google flew a plane over my house today – they’re taking hi-res photos for Google Maps.

The first Google Techtalk made available on Google Video was a talk on ‘Zero Configuration networking’ by Stuart Cheshire in 2005 – I just got around to watching it. Here’s a summary of the most interesting bits (long and very nerdy):
Zeroconf was developed at Apple, and has been marketed as Rendezvous, and subsequently Bonjour. It’s designed to allow networked devices to be plugged in just like you can plug a lamp into the wall. It’s largely inspired by AppleTalk. Here’s how it works, roughly, for a system connected to a new network with no infrastructure (so no DHCP, etc):
Now you have an IP address, but what about DNS names? First, we need a way to do DNS lookups (remember, we haven’t been told about any nameservers):
So now we can pick a unique name:
Service publishing/discovery (i.e. devices telling the network what then can do – “I’m a printer” etc) is implemented using obscure but apparently standard features of DNS, most interestingly SRV records. These are fascinating: They allow a given hostname to resolve to an IP address and a port, instead of just an IP address (for example: www.maebmij.org would point to 220.233.213.187:80). This is described as addressing an oversight in the original design of DNS – and he suggests that assuming a hard-coded port for each service is a hack resulting from it. (What are the implications here, outside of Zeroconf? You could replace webserver name-based virtualhosts with a range of ports, and corresponding DNS entries, for example. But it does increase reliance on DNS, since you could no longer (for example) ssh directly to an IP address.)
So, what steps are needed for service discovery for, say, finding IPP printers?
_ipp._tcp.local PTR ?
– in other words, please give me all PTR records (i.e. other names, or perhaps ‘aliases’ if that’s the right term) for this name
_ipp._tcp.local PTR My Laserjet._ipp._tcp.local _ipp._tcp.local PTR photoprinter._ipp._tcp.local _ipp._tcp.local PTR Fax printer._ipp._tcp.local
So we now have a list of the names of printers we can use.
photoprinter._ipp._tcp.local SRV 0 0 631 chewbacca.local photoprinter._ipp._tcp.local TXT pdl=application/postscript chewbacca.local A 192.168.1.60
In other words, “photoprinter is a service on port 631 of chewbacca”. Note that the last line wasn’t explicitly requested (we didn’t know about the hostname ‘chewbacca’ until after receiving the first line) but the system helpfully gave it to us anyway – again, standard DNS.