Recently, I ran into an interesting situation that led me to enhance my home lab setup. As the saying goes, "necessity is the mother of invention." Let me share how I both created and solved a problem.
In my previous post about hardware transcoding and file shares, I talked about using my NAS (Network Attached Storage) as, well, a NAS. I mounted the NAS on a host computer, but instead of using the IP address, I used the DNS name. I prefer DNS names because they're easier for humans to understand.
However, this caused an issue. If my internal DNS server went down, the host couldn't mount the NAS share, and the system wouldn't come up. This happened because the router wouldn't have the IP address in its memory if it had been longer than the set time-to-live (TTL).
To fix this, I needed DNS failover. I wanted my router to use the internal DNS if it was available, but if not, I wanted it to use a public DNS service like Cloudflare.
Surprisingly, this was really easy to set up. After a quick Google search on a Sunday morning, I found a blog post that showed me how to do it with a single command on my MikroTik router. Gotta love simple solutions!
Now, my system always has some form of DNS resolution, with the internal DNS taking priority when it's up. In the future, I may add something like AdGuard Home to improve the DNS resolution further, but that's a task for another day.
This was a fun little project that helped enhance the reliability of my home lab setup. It's always satisfying when you can both create and solve a problem, don't you think?