I just noticed that OpenWrt uses dsnmasq to provide DNS caching. This is all well and good, but extremely un-interesting. It does have a really cool feature though: it gives DHCP-configured clients (and anything in the router’s hosts file) dns names automagically. This means you don’t have to bother memorizing IP addresses or setting up static hostname configurations for local machines! By default, it uses the hostname that the client provides, in the .lan domain. Under Ubuntu, this is just the name that you gave the computer when setting it up. So, without doing anything special, I can shell to my desktop from my laptop by saying:
I changed the hostname for the router as well, so I can access that as router.lan. Fun!