[ih] Why is MAXNS set to 3

Kevin Dunlap kevin at dunlap.org
Sun Feb 28 09:07:37 PST 2021


Someone pointed out to me that I did the code check-in to the source code 
repository for UC Berkeley CSRG (BSD) in October 1985.
Code change set MAXNS to 3.  Now someone over 35 years is questions why.
I would say setting it to 3 has stood the test of time.

MAXNS is in the resolver code, designed to be fairly light weight since it 
lives in libC.
If you wanted DNS caching you put a recursive caching only name server on 
the local system that would do all the real resolution work and cache the 
results for other DNS resolutions.
Back in 1985 named, name server, would occasionally crash. So by setting 
MAXNS to three would give the resolver the opportunity to try the localhost 
name server and two backups.  Hopefully, you set the two backup nameservers 
to ones in you LAN. Setting to nameservers across the internet would not 
result in speedy name resolution.

-Kevin
Formally, kjd at monet.Berkeley.EDU
On February 27, 2021 1:33:44 PM Sevan Janiyan via Internet-history 
<internet-history at elists.isoc.org> wrote:

> Hello,
> Long time lurker but this is my first post to the list. :)
> I was wondering if there was a technical reason why MAXNS is set to 3
> for the libc resolver in resolv.h (inherited from BIND and others
> followed suit (like glibc)). Everyone states MAXNS is set to 3 in
> documentation but no one says why it is 3 (if it's not arbitrary) by
> default.  :)
>
>
> Sevan
> --
> Internet-history mailing list
> Internet-history at elists.isoc.org
> https://elists.isoc.org/mailman/listinfo/internet-history



More information about the Internet-history mailing list