Live data from Hacker News

Why is DNS still hard to learn?

jvns.ca

61–70 of 261 posts

Re: Why is DNS still hard to learn?

#61
post #30

I don't agree with this article. I think DNS is something few people take the time to learn, but it's not actually hard to learn. One of the great things about DNS is that the system itself will tell you about it's internal state in response to queries. It's very easy to inspect a DNS server for a known zone and understand how it works, and there's very good tooling that's free and widely available to do this (like d…

I think it is hard to learn... using the tools people used to learn DNS with. BIND is great at what it does, but its configuration files suck and its manual is long, terse, and unnecessarily complex sometimes. Dig is powerful, but abbreviates everything like we're on an 80 column terminal. At times Wireshark was a better tool debugging DNS issues than Dig was. Give someone PowerDNS or another modern DNS server and I…

BIND expose (almost) every details of DNS. That's why learning their config would teach you 90% of the DNS system.

dig output make sense after reading the RFC. It exposes every bit flag in the protocol level

Re: Why is DNS still hard to learn?

#62
post #27

Earlier quoted context omitted.

I just wanted to add on to what you're saying: > I think partly DNS and the core protocols may seem confusing to younger people in the industry because so much stuff “just works” now. I've noticed it's become much worse since universities have been teaching Python to start with and with the whole aggressive comodization of developers. To some extent the social justice polices inacted in our communities to exclude peo…

I don't know, I would be curious to meet out of school dev from 20 years ago. Those I meet at my current job are... young. The lack of experience shows. I guess at the time I was not better. Different, because using C I could still destroy hardware. Hard to program a CGA card from Python :D Maybe with MicroPython on an arduino now?

> I don't know, I would be curious to meet out of school dev from 20 years ago. Those I meet at my current job are... young. The lack of experience shows.

I was a stil-at-school dev/sysadmin/multi-purpose nerd 23 years ago, if that works, nice to meet you!

I had more experience than average on some tasks because I was lucky enough that, against my own will, when I was a little kid my parents bought a computer and not a videogame console. I still spent most of my time in front of it playing games, of course, but I also learned to program a little bit, and by the time we had our first PC at home, I also learned troubleshooting because every time I broke it I had to get it working before one of my parents needed it.

Other than that, I think school prepared me well in terms of foundations (perhaps better than what some kids see today, at least I'm surprised how few people who went through formal CS/SWE university training recently know enough about the reasons the relational model was introduced, or how operating systems work).

On the other hand, practical skills taught at school were not immediately useful to me. In particular, the software stack most used at school (Pascal, then Delphi, we did have some courses using C, Prolog, ASM, COBOL, and SQL, but most of my programming hours in school were spent in Pascal/Delphi) was not used in any of the jobs I've had, with the exception of COBOL), so I did a lot of learning on the job.

I make a living working on databases now, and I sometimes like to tell the story of how I got into them: while working at a bank, the web banking application had an SQL Server backend database for its frontend (actual banking happened in another network, on a mainframe, I don't know which DB it used but it was some IBM thing and it was not DB/2). There was a settings table that was basically a key/value store controlling different config options of the app. One of them was a maintenance flag which, if set to whatever the value for true was, would show a "we're under maintenance" page when serving any user request. One day they asked me to go put the site on maintenance ("go put the site" because I had to go walk upstairs and enter the datacenter to do this back then), so I went to the console, opened the query editor, and entered something like:

update settings set value = 1;

Notice the lack of a where clause. When I saw the number of rows affected, I panicked, ran downstairs, explained what I had done, and a colleague (who was also young but I think at his second job after school, and way more experienced than me) calmed me down, walked up with me again, showed me where the backups where, and helped me restore one.

I've been hooked on databases since that day!

Re: Why is DNS still hard to learn?

#63

sometimes it's hard to even know WHERE to change the settings. Last week a friend was trying to setup heroku with api.foo.com and he needed to add a CNAME to the domain so heroku would make the cert and turn it on. I used dig, i used host, I used whois, I got invited to their aws route 53 and saw all sorts of stuff in there but each change had no affect. Finally I noticed from whois that the name servers weren't even…

This. The protocol isn't hard, but the protocol isn't the service.

The service of DNS is a decentralized, distributed, held-together-by-spit-bailing-wire-and-an-unprecedented-post-WWII-era-of-international-peace-and-collaboration hash-job of individually configurable nodes kind of agreeing on a shared worldview of the information the service contains, unless your local government hates piracy or pictures of Winnie the Pooh, YMMV.

It's like saying "I don't know why people struggle with databases; SQL isn't hard" and then the database contains ten thousand tables, a thousand indices, a hundred functions and triggers, and all of it was documented by someone who built it and never had a neophyte review the docs.

Oh, and the database operates on eventual-consistency guarantees out to 24 hours of "eventually."

Re: Why is DNS still hard to learn?

#64
post #30

I don't agree with this article. I think DNS is something few people take the time to learn, but it's not actually hard to learn. One of the great things about DNS is that the system itself will tell you about it's internal state in response to queries. It's very easy to inspect a DNS server for a known zone and understand how it works, and there's very good tooling that's free and widely available to do this (like d…

I think it is hard to learn... using the tools people used to learn DNS with. BIND is great at what it does, but its configuration files suck and its manual is long, terse, and unnecessarily complex sometimes. Dig is powerful, but abbreviates everything like we're on an 80 column terminal. At times Wireshark was a better tool debugging DNS issues than Dig was. Give someone PowerDNS or another modern DNS server and I…

rcvd, qr, rd, ra

are defined in the RFC. It need the abbreviation to fit in the ASCII art in RFC text.

back in those days, dig users are those who read rfc

Re: Why is DNS still hard to learn?

#65
post #30

I don't agree with this article. I think DNS is something few people take the time to learn, but it's not actually hard to learn. One of the great things about DNS is that the system itself will tell you about it's internal state in response to queries. It's very easy to inspect a DNS server for a known zone and understand how it works, and there's very good tooling that's free and widely available to do this (like d…

> I think DNS is something few people take the time to learn

I kinda agree and think DNS one of those technologies where you can go an entire career without picking up more than bits and peices here and there. Those things gains a sense of mystique in industry as more complicated than it otherwise would if more people had to tackle it full on.

Re: Why is DNS still hard to learn?

#66
post #52

Earlier quoted context omitted.

How did you learn DNS? And when?

> How did you learn DNS? And when? I wrote one of the world's first dynamic DNS servers for our dialup modem customers in the early 90s, so when connected to our Livingston Portmasters with an assigned IP address you could be username.isp.com while online. Later updated this so you could also be http://www.username.isp.com all the time just by dropping an index.html file in your ~username/site directory. I learned bo…

Same here.

I implemented some dynamic dns system. I still remember how to handcraft a RRUPDATE request.

After reading the RFC, every bit in dig output makes sense

Re: Why is DNS still hard to learn?

#67
post #2

It’s not. It’s one of the few things that hasn’t changed much and it’s operation is fairly straightforward. dig is a little confusing. It’s more capable but less straightforward than good old nslookup (which still works fine BTW). I think partly DNS and the core protocols may seem confusing to younger people in the industry because so much stuff “just works” now. For example, today wifi routers “just work” right out…

Linksys was making home routers which were about as easy to deploy as any home router today starting in 1999. Their earliest Wireless G router came out in like 2002. The beloved WRT54GS came out in 2003.

https://arstechnica.com/gadgets/2000/08/befsr41/

Re: Why is DNS still hard to learn?

#68
Because complexity is easy. It practically generates itself. It has a natural economic advantage.

Making sense of complexity, otoh, takes much diligent effort.

So complexity tends to win and everybody tends to befuddlement.

Re: Why is DNS still hard to learn?

#69
I went through this a few years ago, deciding that I had only a piecemeal understanding of DNS based on the specific things I had run into. I knew about `dig(1)` and BIND and a CS101 idea of how recursive DNS resolution works, etc. But I was missing the working knowledge needed for designing and implementing anything non-trivial or for debugging non-working systems. So I read "DNS and BIND" (not quite cover-to-cover, but close, skipping over the details on some of the more exotic features). I set up a real BIND server for some unimportant personal web sites. None of it was hard, but it did involve a bunch of (time) investment. To be clear, BIND is not the right thing for many use cases, but a lot of DNS ideas and terminology still come from BIND and I found that stuff very valuable.

I think books are underappreciated for learning stuff like this. Most resources you find on the web are high-level theory ("here's a block diagram of how recursive lookup works"), task-oriented ("how do I get `dig` to do a recursive lookup"), or otherwise low-level (e.g., reading the source of your local DNS client to understand its retry policy). To understand the pieces and how they fit together, from the theory (what they're trying to achieve) down to implementation (what caches exist where), I find there's no substitute for a holistic approach that you usually find in books, but rarely (not never) find on the web.

Re: Why is DNS still hard to learn?

#70
"(like, what if you could run dig +debug google.com and it gave you a bunch of extra debugging information?)"

The flag they're looking for is +trace and it provides exactly what they're looking for which is a path of how resolution occurs from root nameservers all the way down to the domain.

Post reply on HN