Long story. When I started living in Mysuru, I ditched my old BSNL connection (which did not even work because apparently there was some wiring problem in my house, which is complete BS). I would love to 💩 on BSNL and all the problems they created for me, but let’s leave that for another day.

There are some network devices which I connect through the local home network because I want to access them from my computer which is also on the same network. In the future, there might be scope to give tailscale a try. From what I gather, it allows you to connect devices over any network (can also be over the internet) and gives them a constant hostname. Which makes it feel a lot like they are present on the local network even if they are not.

My new provider got me a router which could be configured from the router admin page. Given that I don’t use tailscale yet, I wanted to configure my router to give me a constant hostname/IP for my devices on my LAN. There’s a straightforward way to achieve that, as a matter of fact. Many of you readers might already know this. You just have to reserve an IP for your device’s MAC in the DHCP settings. However, my router was not tested correctly and it did not allow adding any such entries. I was not the only one facing this issue.

Unless I found a way to resolve this problem, it was going to become a pain in the ass to connect to my local devices. I’d have to look up their IP first then enter it, and configure client-side preferences again for apps which didn’t store them on the server-end. An absolute royal pain in the buttocks.

Thankfully, a saviour presented itself before my plight. I recently discovered a way to find devices on your local network. But it only works on Macs (and maybe Windows too?). Basically, it uses Bonjour (which internally uses mDNS) to map a device’s hostname to its local IP. The URL you can use to connect to the device is in the following format <hostname>.local. For instance, if your phone has the hostname galaxy, then its URL becomes galaxy.local.

That’s it. That’s the simple and easy magic which was present right in front of me all this time that I didn’t know about. But glad I found out sooner than later.

P.S: this magic won’t work on Android unless you use something like this. God bless Android 🤖