Unlocking the Secrets of DNS: A Guide to Root Servers

TechSavvyProductions
171 followers
9 Video Views·Nov 3, 2024
We explore root servers, TLD servers, and authoritative servers in the DNS system. We will focus on how resolving name servers work with authoritative name servers. Understanding DNS resolvers, recursive query, and iterative query. The role of IANA and ICANN plays in maintaining the DNS system. Explore DNS root server operators and how they monitor the health of DNS. What is a zone file and much more?
Cloudflare's DNS IP is: 1.1.1.1 Quad9 https://www.quad9.net/ owns 9.9.9.9
We're going to look at a lecture on DNS.
We're going to do a quick review of the basics
so that we kind of get a refresher.
And then we're going to plunge into a review of a topic of DNS
that most people don't get a chance to deep dive into.
And that's the DNS root servers themselves.
Most of us have seen a DNS hierarchical chart
showing the root DNS server.
Below it we see the top level domain DNS servers.
Below that is our authoritative servers.
Most of us have seen this.
What I want to do is I do want to focus on the root server
in this presentation.
But a quick review of how all of this works.
For me, I have learned that a big picture overview
of any topic helps me incredibly
when I start digging into the details.
If I don't have that big picture of any technology,
I really struggle to understand it.
Let's take a look at this diagram
because it really helps us understand DNS.
And let's start with the user.
The user, let's say, is going to go amazon.com.
But we know we can't get anywhere with just a name
such as amazon.com.
What the user really needs is an IP address.
And so we're going to depend on the next entity in DNS,
which is the resolving name server,
to help us get that IP address.
For me, in my case,
I have Time Warner or Spectrum as my ISP.
And they also provide my home PCs with DNS services.
So they're going to be my resolving name server.
They're going to go out and try to find
the IP address of amazon.com.
Their goal, remember,
their goal is to find the authoritative name servers
for amazon.com.
Hopefully, we can get to Amazon Web Services,
which probably hosts the DNS system for Amazon.
And once we've reached those authoritative name servers,
we're going to ask for the IP address of amazon.com.
Once we've pulled that record out of the Amazon DNS system,
it's going to be sent back to my browser
and I'll get to surf the website.
All right, we're going to drill into some of the details,
but this will really help you understand what's going on.
Notice the arrows between the user browser,
the resolving name server,
and the authoritative name servers.
All of those arrows represent DNS queries.
There's two basic types,
non-recursive DNS queries
and recursive DNS queries.
The packets that contain DNS queries
are very small, 600 bytes in size.
This is a captured DNS packet.
The size of this packet is the beauty of DNS.
It makes this whole system efficient.
Now let's take a look at the authoritative name servers.
In the DNS architecture, this is the key.
Our browser wants accurate information about amazon.com.
I don't want to go to Walmart for information about Amazon.
Or if I want to go to CVS Health Corporation,
I don't want to go to AT&T.
So every company will own and manage
its own authorized DNS name server
so that we can go to their website
and get accurate information about that company.
Now, authorized name servers,
managing and hosting these authorized name servers
is very expensive.
If you're a big company, you can afford to do that.
But a lot of smaller companies
use enterprise DNS hosting companies.
So when we talk about a lot of smaller companies,
they need that authoritative domain server,
but they can't afford it.
They're very expensive to manage,
very expensive to secure.
So they may go to something like CloudFlare,
or you may go to Azure.
Azure has their own DNS public service that they provide.
It's pricey, it's expensive,
but you get very, very good, reliable DNS.
Another provider of that would be Google.
Google has their own cloud DNS system.
You can purchase that,
and you can host your authoritative name server with Google.
Another one is GoDaddy.
They have a very well-known,
very respected DNS system that you can also use.
And of course, Amazon.
Amazon has their Amazon Route 53.
You can provide,
they provide you with authoritative DNS services
through the Amazon Web Service System.
Now, these are only just a few.
There's a lot of people will take your money
and host your DNS services.
All right, what about people that are cheap or poor,
but they need an authoritative name server?
Well, there are some companies that host for free
authoritative name servers for various entities.
So if you're a nonprofit or you're an individual,
there is free DNS hosting out there
for your authoritative name server.
All right, our last concept,
as we look at this diagram in our review of DNS,
and that's the actual record in the DNS server.
We see things like the IP address,
the IP version four of a domain name.
We see the IP version six of the domain name.
We see information like the mail server.
So the record information in the DNS server
is a critical part of DNS.
Now, everything we've shown you just before,
is a simplified view and a review of DNS.
But none of that will work
when you're talking about a worldwide network
as big as what we have on our planet.
Let's start with 1.8 billion websites.
And when we start talking about 3.9 billion users,
we've got to have a serious and a complex DNS system.
Let's look at a DNS query again.
This time I'm going to bring in the root servers,
the top level domain DNS servers,
and let's take a look at how this operates.
So we're back to John.
He's going to go to Lowes.com.
He needs to find a local DNS resolver
that will get this process started
because he can't do anything with a name.
He needs an IP address.
So in my case, I'm going to use Spectrum's DNS server
to begin the process.
Now I'm going to start with the root server.
The root server is going to be contacted.
It's going to give me the information
of who owns the top level domain for .com.
And in this case, that's VeriSign.
VeriSign hosts the entire .com top level domain DNS system.
Once that information is passed back,
it's going to tell me the authoritative name servers,
DNS servers, for Lowes.com.
And I've got that information below.
That information is going to send me
the IP address of Lowes.com.
That's going to be sent to my browser.
And if all goes well,
I'm going to connect to Lowes.com
and actually be able to buy something online.
So I'm on Lowe's homepage,
and I'm going to use a Chrome extension by DNSlytics.
It's a very cool tool,
and it allows me to see some very interesting information.
First of all, I can see the IP address of Lowes.com.
And I can see that the website is hosted in the Netherlands.
If I go to domain,
I can scroll down and see,
yep, I'm in the Lowes.com domain.
And if I keep scrolling down,
I can see the authoritative name servers for Lowes.com.
So how in the world can Lowe's be hosted in the Netherlands,
and yet I have this fast traffic back and forth?
Well, that all magic is a whole other subject.
But since we're here, let's take a look.
This has been the magic of this website being in Netherlands,
and yet I'm able to see it and interact with it
with incredible speed
is because it's using a content delivery network, a CDN.
In this case, Alchemy.
All right, let's get back to what we came here for.
Let's take a look at DNS root servers.
So who in the world is responsible for root servers?
Well, the overarching organization is ICANN.
This is a global policymaking organization.
It has members all over the world,
companies, governments,
and they are the oversight to root servers.
ICANN then pushes this responsibility
to a sub-organization called IANA,
the Internet Assigned Numbers Authority.
They're responsible for the root zone.
They're also responsible for the database
of the top-level domains.
They have a lot of other responsibilities,
but we're going to focus on root servers.
The DNS root infrastructure is made up of 13 name root servers.
They are operated by 12 independent organizations.
In the early days of the Internet,
most of the root servers resided within the United States.
That has radically changed.
There are now over 750 instances
of these 13 root servers all across the globe.
When it comes to DNS root servers,
not everybody is equal here.
When it comes to managing and operating root servers,
we can see that the operators really vary.
Some of the root server operators
manage up to 200 plus root servers.
Some of them maybe only manage six root servers.
So it's not always equal
in these operators that manage root servers.
We can see the University of Maryland,
NASA, ISC, VeriSign,
ICANN are the biggest root server operators.
Right now, as we speak,
there's over 750 root server instances.
Remember, just because you host a root server
doesn't mean you can manage.
The only person in the world
that can modify or log in or control or administer
a root server is those operators.
On any given day, just one root server,
and I looked up the statistics for the A root server,
up to 8 billion queries a day on just one root server.
Because root servers are so critical in DNS,
there is intense interest in the data,
the statistics, the metrics of every root server.
In the world of root servers,
monitoring is serious business.
IANA requires all root servers
to establish probes,
pieces of equipment that can monitor metrics and data
so they can collect serious data
on every single root server on the planet.
This was an interesting photo
from an island between the mainland of Norway
and the North Pole.
It's one of the world's most northern,
most inhabited areas.
And you can see their rack of routers,
and they actually have a root server probe
monitoring the performance of root servers way up there.
Root servers' IP address are very, very important.
And in the last few years,
there have been IP address changes.
They are very monitored, rolled out very carefully,
so there's very little disruption on DNS.
All right, Mr. Vanderbilt, this is really cool.
Root servers have a database, a DNS database.
Just how big is this database?
So exactly what is in a root server?
Well, it contains over 1,500 generic
top-level domain IP addresses
as to where to find the top-level domain servers
for .com, .net, .org.
It also contains the country code top-level domains
such as China, Indonesia.
It also contains the IDS,
the Internationalized Domain Name.
All of that is in the root zone database.
So if I wanted to host a root server for DNS,
what kind of hardware would I need?
Well, believe it or not,
what you're seeing is the recommended hardware,
basically a 1U rack with X amount of CPU capability,
storage, et cetera,
and that's typically all you need to handle a root server.
All right, wait a minute, Mr. Vanderbilt.
That little server is not going to handle 8 billion queries.
That's correct.
Remember, we distribute root servers all over the world.
Just in case you're interested,
the .com is the largest top-level domain DNS service.
It has over 139 million records for the .com.
The next largest record is going to be for China.
We also see .net, UK, .org.
VeriSign hosts some of the largest
top-level domain DNS servers in the world.
They host the entire .com, .net, .tv, .cc, and .name.
So what is the software that makes the DNS server work?
The software that runs DNS is typically BIND version 9.
BIND is a very, very popular open-source DNS software.
It runs on Linux and Windows.
There's another one called NDS,
and it's called Name Service Daemon,
and another one called KnotsDNS,
and this is done by the Czech Republic.
All three of these different software packages
are running root server.
Running root servers is serious business.
If you've had 750 instances,
you've got to have a lot of people.
When it comes to managing root servers,
this is a conference held for root server operators.
You can tell they're geeks.
They've got their laptops, their phones.
None of them are paying attention to the presentation.
Typical geeks.
All right, we've looked at a lot of things about DNS.
Let's get out of the slide deck,
and let's go drive around a little bit.
This is the root server's official web page
for the operators,
and you can see they have a map showing you
the location of all the instances of the root servers.
If we scroll down, you can see
the root servers are listed as A,
and I can choose B, choose C,
and you can see where they're located
and who is the operator.
So here on the website,
you can see I'm looking at root server D.
It's hosted by the University of Maryland.
You can see over 154 sites.
That's the IP address,
IP version 4 address for that root server.
It also has an IP version 6.
Let's go traceroute.
To traceroute a root server,
I'm going to use some really cool web tools.
NuSTAR has some great tools.
Let me show you.
This particular company has just a ton
of great, great tools.
Let's start with UltraTools,
and we're going to go to Tracing Tools,
and I'm going to do a traceroute,
and I'm going to simply click in
the IP address of a root server,
and I'm going to choose up to 64 hops and go.
As we look at the traceroute
that this tool gives us,
we can see geolocation
as we're going from router to router
from this website to the root server.
We can see we jumped to the United States,
and then we jumped to Germany,
and then here we jumped to Ireland,
and then back to the United States.
Normally, in traceroute,
you don't get to see that.
Here at the end of the traceroute,
we see that it was eight hops
from this web server that hosted our tool
to our DROOT server.
It was eight hops.
Here's another cool tool.
It's called the DNS Speed Test,
and it's a DNS hosting speed tool.
It gives you valuable information
about DNS performance for each level
in the DNS tree.
I'm going to go ahead and put in lows.com,
so let's go take a look.
Let's remember everything we learned.
To get to lows.com,
I first need a resolving server.
That is going to try to locate a root server.
I'm going to scroll down here,
and we can see as a resolving server
tries to find froot, mroot, iroot,
you can see the different speeds
that each of these root servers perform at.
Next, we have the top-level domain for .com,
and you can see each of those vary in speed.
And then last,
we look at our authoritative DNS servers
for lows.com.
We can see all of them listed
and the speeds that they perform at
as it pertains to queries.
Now let's take a look
at our authoritative servers for lows.com,
and we can see if you're trying
to get an IP version 6 address,
it's actually faster than over here
where you're trying to get an IP version 4.
All of this metrics helps give you,
an administrator of a website,
some idea of how your DNS is performing.
You can even run a domain health report
on your website,
and it gives you a lot of information
about your DNS authoritative server.
So again,
if you don't understand those basics,
then when I go and deep dive,
you're lost.
This is all about your authoritative name server.
Now there is some really odd stuff out there
concerning DNS root servers.
Let's take a look.
And it's called the Yeti DNS project.
It's live.
It's IP version 6 only root DNS server.
You can take a look at the website.
Let's take a look.
You can go to the Yeti DNS project
and take a look.
It's pretty cool.
Let's talk quickly about DNS privacy,
and we'll look at DNS cyber attacks
and security.
Remember our diagram.
So here is you at home
or at your company
or on your phone.
This first DNS resolver
knows everywhere you want to go.
Every website,
every domain you travel to,
the owner of this DNS resolver
knows about you.
So if you have an ISP
like Comcast,
ATT,
Verizon,
or for your mobile phone,
Verizon,
T-Mobile,
they're resolving your DNS queries.
They know all about you.
If you're on a company's network,
they know all about where you're going
on the Internet.
And honestly,
most of them have legal rights to do so.
But what if it was a government?
They could find out everything you do.
Your DNS traffic can be sniffed,
collected,
and analyzed,
and then used or sold.
Wouldn't it be nice
to have somebody you could trust
that would do your DNS resolving,
know everywhere you go,
but not care and promise you
privacy, reliability, and speed.
So cloudflare.com
offers two public DNS servers.
The first one is 1.1.1.
The other one is 9.9.9.9.
These DNS servers
provide you free public DNS service.
They guarantee your privacy.
They're highly reliable,
and they're fast.
You can also get cloudflare
on your mobile phone.
So you can take T-Mobile
out of the picture.
You can take Verizon
out of the picture.
You can download the 1.1 app
and install it,
and you'll have a new DNS resolver.
There are other companies
that host public DNS systems,
but cloudflare.com promises privacy.
They guarantee privacy.
They don't care.
They don't want your data.
They don't want to target you with ads.
They're also very, very fast
in comparison to Google's public DNS
or Cisco's open DNS.
They're very, very fast.
You can set it up on iPhone,
Android, Mac, Windows,
Linux, or your home router.
And no, cloudflare.com
doesn't sponsor anything I do.
They probably don't know I exist,
but I do like their service.
There are serious DNS attacks going on.
Talos, FireEye,
the Department of Homeland Security,
CrowdStrike,
the SANS Institute
have all released
many, many white papers
on serious attacks on DNS
as of 2019.
Because root servers are monitored
so intensely,
the real attacks on DNS
are at top-level domains.
This year,
through cyber espionage,
over 50 Middle East records
were altered in the top-level domain.
This allowed DNS hijacking,
record manipulation,
DNS fronting.
Some of it was done
through credential theft
of accounts on domain registrars
and some stealing SSL certificates
on DNS vendors.
Altering a few records
on a top-level domain DNS server
could easily put the bad guys
in a man-in-the-middle attack.
Think of any country's
national security agency.
If you put a man in the middle,
it would put that agency
in severe compromise.
I hope you enjoyed this lecture.
Feel free to contact me.
If you'd like notes or slides,
just send me an email.
