DNS in ISP networks and why you should care

If you are not familiar with how DNS works, please go and read this article and watch the accompanying video.

In this article we will talk about the different types of DNS servers an ISP will encounter and the design considerations of implementing them into your network. Let’s jump into the three types.

Cache servers
local DNS (LDNS) servers
authoritative DNS (ADNS) servers, of which the Root and Top Level Domain (gTLD) servers are special cases

Let’s go into detail on what each of these is.  We will start at the top and work our way down.

Authoritative Name Servers

An authoritative name server, just like the name says, is the authority on the website or resource it is responsible for. Without authoritative name servers, the DNS hierarchy would not function. You would have no way of telling an incorrect answer from a real answer.

A special kind of authoritative name server is the root nameservers, which are responsible for the Top Level Domains (TLD).  These are better known as .com,.net,.org, and so on.

Local DNS resolvers
These are servers run by Internet Service Providers (ISPs) and other entities such as Google (8.8.8.8) and Cloudflare (1.1.1.1). These are machines running BIND, Tiny DNS, or other software.  It is best practice to not run your authoritative name server on the same instance as your resolver.

Local DNS resolvers sit on the ISPs Internet backbone on fast connections to the Internet.

Caching servers
Caching servers are more typical in a larger ISP network with large concentrations of customers n certain geographic areas. .  Since DNS is such an important function, ISPs want their clients to have the quickest access to DNS lookups possible. In larger networks, this means putting caching servers as close to customers as possible. DNS lookups do not take up much bandwidth, but a slow DNS lookup can affect the user experience. If you have ever entered an address or clicked a link and experienced a “Looking up xyz.com” message for more than a second or two you are experiencing a slow DNS.

So why is this important in an ISP network?
As mentioned above the quicker you can get DNS lookups done and over with the better user experience your customers will have. You do not want your clients waiting 3-4 seconds for each lookup.  While you might have the fastest Internet on the planet, your customers will always be waiting on these requests, which will cause them to think things are slow.  And technically they would be right.

To speed up a large ISP network you will need to design DNS resolvers/caches into your design.  These can be at major traffic points on your network, or at each POP location. Part of this depends on your IP design, while some of it depends on the overall design of your infrastructure.  As networks flatten out due to things like VPLS and EVPN the need for lots of resolvers in an ISP network fades away. A general rule of thumb is to deploy DNS resolvers at each customer gateway.  This can be the wireless tower they receive their signal from, the local DSLAM, or a fiber node at the edge of your network.  By deploying resolvers at the customer gateway you are giving them fast access to cached DNS lookups. This can also lead to more complex troubleshooting should a cache server fail

What do I mean by cached?
A DNS resolver has two major functions in life.  It takes a request for a website, in our case j2sw.com, to look up the appropriate IP address and returns that information to the client.  The whole www stuff is for us, dumb humans. DNS translates www.j2sw.com to 209.209.44.4. This is what the computer and routers understand.

Secondly, a DNS resolver caches previous lookups.  This can be configured for minutes, hours, or days.  This speeds up any subsequent lookups because the resolver can serve it up locally without having to go clear across the internet to look it up and wait for the return. Once it has done one lookup, it will cache that lookup for any client who requests it after.

So, how does an ISP implement all of these?

Many modern routers have the ability to cache lookups and act as a DNS resolver.  Mikrotik, Cisco, and others all have this ability.   Even a Raspberry PI has enough horsepower to be a DNS resolver.  These can be deployed at each POP site and customers can point to them as their primary DNS servers.  This means their routers or PCs will look to the closest DNS resolver first.  If the resolver has the answer in its cache, it will serve it up right away.  If not, the resolver can go on to the next step up.

The next step is local resolvers the ISP typically runs.  There are lots of arguments for why an ISP should run their own instead of pointing to Google (8.8.8.8) or someone else. We won’t go into these here.  Let’s just say it is beneficial for the ISP to run their own resolvers with root hints.

It’s all about the trickle-down or trickle-up effect. The Local resolvers cache what they can for their subset of customers.  These resolvers then look to the name server resolvers, which have larger caches, and those name server resolvers finally look up the information directly.

 

j2networks family of sites
https://j2sw.com
https://startawisp.info
https://indycolo.net
#packetsdownrange #routethelight