Live data from Hacker News

Implement DNS in a Weekend

implement-dns.wizardzines.com

71–77 of 77 posts

Re: Implement DNS in a Weekend

#71
post #44

To be clear it's a DNS resolver, i.e. the client.

A DNS resolver is both a client and a server -- for example Google's 8.8.8.8 (which this is a toy version of) is a server (you can query it with `dig @8.8.8.8 example.com`), but also a client of the various authoritative DNS servers that it fetches and caches records from. I implemented this as a command line tool because that's much easier to do in a Jupyter notebook environment, but you can also pretty easily trans…

Nope, Google’s quad eights is “recursive DNS server”.

Resolver is usually a part of operating system (sometimes) implementing DNS client functionality and serving as a link between a userland library providing, say, getaddrinfo(), and DNS implementation.

This one is even less than a resolver, it does not implement a library link. It’s a toy DNS client, implementing minimal functionality.

Re: Implement DNS in a Weekend

#72

I love this. DNS is something that, if you're online and visiting websites or even sshing into boxes a lot of the time, you're using, unless of course you carry around a list of IP addresses like the olden times. It is one of the many things that underpin the modern web and we take it for granted.

I still have one IP address lodged in my memory from 25+ years ago - sable, the university's key Unix server for students, on which I learned so much about Unix and the 1990s Internet.

(I'm not sure if I'd faced DNS issues that meant I needed to know that - but it was a time when dialup ISPs told you what to manually configure for your DNS rather than it being automatically assigned, so it all seemed a bit chunkier.)

Re: Implement DNS in a Weekend

#73
post #12

I love all the series about writing your own X in 100 lines of code. It gives you the understanding of technology and removes a lot of unnecessary details. The great examples of this are 'A from-scratch tour of Bitcoin in Python' https://karpathy.github.io/2021/06/21/blockchain/ and 'Let's build GPT: from scratch, in code, spelled out' https://youtu.be/kCc8FmEb1nY from Andrej Karpathy I wonder if anybody tried to col…

Check out the book "500 Lines or Less: Experienced programmers solve interesting problems"

I especially like the chapter "A Python Interpreter Written in Python": https://aosabook.org/en/500L/a-python-interpreter-written-in...

Re: Implement DNS in a Weekend

#75
post #71
post #44

Earlier quoted context omitted.

A DNS resolver is both a client and a server -- for example Google's 8.8.8.8 (which this is a toy version of) is a server (you can query it with `dig @8.8.8.8 example.com`), but also a client of the various authoritative DNS servers that it fetches and caches records from. I implemented this as a command line tool because that's much easier to do in a Jupyter notebook environment, but you can also pretty easily trans…

Nope, Google’s quad eights is “recursive DNS server”. Resolver is usually a part of operating system (sometimes) implementing DNS client functionality and serving as a link between a userland library providing, say, getaddrinfo(), and DNS implementation. This one is even less than a resolver, it does not implement a library link. It’s a toy DNS client, implementing minimal functionality.

Quad8 is a recursive resolver.

You are referring to a system's local resolver (which is obviously also a resolver, so you are right on this regard).

But still, this project is _also_ a resolver (although obviously not a complete one, it's a learning project).

Re: Implement DNS in a Weekend

#76
post #44

To be clear it's a DNS resolver, i.e. the client.

A DNS resolver is both a client and a server -- for example Google's 8.8.8.8 (which this is a toy version of) is a server (you can query it with `dig @8.8.8.8 example.com`), but also a client of the various authoritative DNS servers that it fetches and caches records from. I implemented this as a command line tool because that's much easier to do in a Jupyter notebook environment, but you can also pretty easily trans…

Just wanted to thank you for this great project, it was a lot of fun :)

Re: Implement DNS in a Weekend

#77
post #18

Earlier quoted context omitted.

What about a Pi that connects to Tailscale and have your TV work via that? https://tailscale.com/kb/1019/subnets/

That would mean getting a Pi, which I don't have...

You don't need a Pi to run pihole, it runs great on a low spec VM.
Post reply on HN