zlacker

[return to "Understanding DNS Resolution on Linux and Kubernetes"]
1. zokier+xB7[view] [source] 2025-03-26 11:39:39
>>fanf2+(OP)
It's bit curious that traditionally UNIX systems did not run local DNS resolver daemons and instead the resolv.conf (and nsswitch.conf) persisted for so long. In addition to potentially simplifying configuration, having a daemon would allow system-wide dns caching, something I'd imagine would have been especially valuable back in the days of slow networks. Unix has daemons for everything else so that's why it feels odd that name resolution got baked into libc
◧◩
2. cduzz+bS7[view] [source] 2025-03-26 13:35:25
>>zokier+xB7
Unix predates DNS; the nsswitch.conf tells the c libraries how to convert names to IP addresses. This behavior is actually dependent on which libc you're using...

To resolve names, you can ask /etc/hosts for the name / IP conversion; you can also ask DNS, or ldap or NIS; probably there are many I've forgotten about.

solaris: https://docs.oracle.com/cd/E19683-01/806-4077/6jd6blbbe/inde...

glibc: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html

musl appears to not have an nsswitch.conf or a way to configure name to number resolution behavior?

[go to top]