Without DNS, the Internet would collapse - it would be impossible for people and machines to access Internet servers via the friendly URLs they have come to know. Show
For example, the domain name www.ns1.com you are viewing now, translates to the IP address 104.20.48.182 (in the old IPv4 format) or 2002:6814:30b6:0:0:0:0:0 (in the newer IPv6 format). DNS PropagationUnlike a phone book, DNS records are commonly updated, meaning that a server’s IP address can change without affecting end users. Users continue to use the same domain name, and are automatically redirected to the new address. A DNS A or AAAA Record points a domain or subdomain to an IP, and a CNAME record points a domain or subdomain to another domain name. After you register a new domain name or when you update DNS servers on your domain name, it usually takes about 12-36 hours for the domain name servers world-wide to be updated and able to access the information. This period is referred to as propagation. With next-generation DNS technology propagation can be reduced to minutes or seconds. DNS allows for multiple hostnames to correspond to a single IP address - this can be used for virtual hosting, when many websites are served from a single host. A single hostname can also resolve to many IP addresses, in order to distribute load to multiple servers. DNS ResolutionTypically, when you connect to a local network, Internet service provider (ISP) or WiFi network, the modem or router sends network configuration information to your local device, including one or more DNS servers. These are the initial DNS servers your device will use to translate host names to IP addresses. A component called a DNS Resolver is responsible for checking if the host name is available in local cache, and if not, contacts a series of DNS Name Servers, until eventually it receives the IP of the website or service you are trying to reach. If everything is working well, this can take less than a second. The process is known as DNS resolution of a hostname to IP address. Uses of DNSThe classic use of DNS is to translate the domain name in a URL into a corresponding IP address. But DNS has many more uses - it underlies many other forms of Internet communication. What is DNS Used For?
If you use any of the above services, you will probably use DNS to communicate with it. If you own or manage any of the above - for example if you own a website or allow VPN access to your company’s network - you will need to setup DNS in order to allow users to access to your service. Next-Generation Uses of DNSDNS has evolved over the past 20 years. Next-generation DNS services such as NS1, which provide advanced traffic routing capabilities, have created new uses for DNS:
How DNS Works - Building Blocks of DNSThere are four main building blocks that enable DNS to function: DNS ResolverA DNS resolver, also called a recursive resolver, is a server designed to receive DNS queries from web browsers and other applications. The resolver receives a hostname - for example, www.example.com - and is responsible for tracking down the IP address for that hostname. The DNS resolver might be operated by the local network, an Internet Service Provider (IP), a mobile carrier, a WIFI network, or other third party. The resolver starts by looking in its local cache or that of the operating system on the local device - if the hostname is found, it is resolved immediately. If not found, the resolver contacts a DNS Root Server and receives details of a TLD Name Server. Via the TLD Name Server, it receives details of an Authoritative Name Server, and asks it for the IP that matches the requested hostname. When it receives the IP, the query is resolved. DNS Root ServerThe root server is the first step in translating human readable host names into IP addresses. The Top Level Domain (TLD) takes the TLD provided in the user’s query - for example, www.example.com - and provides details for the .com TLD Name Server. There are 13 logical root servers worldwide, indicated by the letters A through M, operated by organizations such as Verisign, Cogent, the University of Maryland and the U.S. Army Research Lab. TLD Name ServerThe TLD Name Server takes the domain name provided in the query - for example www.example.com - and provides the IP of an Authoritative Name Server. This is a DNS server that contains DNS records for the specific domain. There is a Name Server for each Top Level Domain (TLD) - there are currently over 1500 valid top level domains, including the original TLDs like .com and .org, country codes such as co.uk and co.fr, and new TLDs such as .biz. Authoritative Name ServerThe Authoritative Name Server is the last stop in the name server query. The Authoritative Name Server takes the domain name and subdomain, and if it has access to the DNS records, it returns the correct IP address to the DNS Resolver. As the Internet grows, the original IP address standard, IPv4 (which only allowed up to 4.3 billion IP addresses) is being replaced with IPv6 (which supports as many as 3.4×10^38 IP addresses). Increasingly, DNS servers return IPs using the IPv6 format. In some cases, the Authoritative Name Server will route the DNS Resolver to another Name Server that contains specific records for a subdomain, for example, support.example.com.
Summary of the DNS Process - a DNS Example
How DNS WorksIn this section we provide some more details about how DNS works behind the scenes. DNS Types - 3 Types of DNS Queries
DNS Caching and Time To LiveBecause of the scale of the Internet, it’s not enough to have a system of Authoritative Name Servers and refer each client to the correct Name Server. With only Authoritative Name Servers operating, each DNS query must start with a recursive query at the root of the DNS system, which would place enormous strain on the DNS Root Servers. To improve efficiency, reduce DNS traffic across the Internet, and improve performance, DNS Cache Servers are used. These servers store DNS query results in a cache, and can serve it immediately in response to a query, without requiring recursive DNS queries. The DNS records are stored in cache for a period of time called time to live, defined in the configuration of each DNS record. Time to live is very significant because it determines the “freshness” of DNS records. Caching will not be effective if users receive stale DNS data, while the IP of the hosts has already changed. DNS records can be cached at several layers:
At all levels of DNS caching, if a resolver does not have the A records for the query (in other words, the specific IPs), but it does have NS records for the Authoritative Name Servers, it queries the Name Servers directly, without performing a recursive query. This prevents lookups from the DNS Root Servers and TLD Name Servers, and helps the DNS query resolve much more quickly. DNS Record TypesDNS resource records (RR) are the basic information elements of the Domain Name System. They are entries in the DNS database which provide information about hosts. The records are physically stored in the Zone Files on the DNS server. The following are common DNS records:
The DNS ProtocolThe DNS protocol uses two types of DNS messages, queries and replies. Both queries and replies consist of a header and four sections: question, answer, authority, and an additional space:
Protocol TransportDNS primarily uses the User Datagram Protocol (UDP) on port number 53 to serve requests. DNS queries consist of a single UDP request from the client followed by a single UDP reply from the server. The Transmission Control Protocol (TCP) is used when the response data size exceeds 512 bytes, or for zone transfers. Some DNS resolvers use TCP for all communication. DNS Record FormatEach DNS resource record is comprised of the following fields: Field Description Length (octets) NAME Name of the node to which this record pertains Variable TYPE Type of RR in numeric form (e.g., 15 for MX RRs) 2 CLASS Class code 2 TTL Count of seconds that the RR stays valid (The maximum is 231−1, which is about 68 years) 4 RDLENGTH Length of RDATA field (specified in octets) 2 RDATA Additional RR-specific data. For example, in an A record this field contains the IP address of the host. Variable, as per RDLENGTH Next-Generation DNSDNS can be more than just a routing mechanism connecting hostnames with IPs. Advanced DNS solutions leverage the DNS infrastructure for new use cases. These capabilities are made possible by next-generation managed DNS servers that are able to intelligently route and filter traffic. Learn more about NS1’s intelligent DNS platform and what makes it stand out from other DNS providers. What is Domain Name System explain?DNS, or the Domain Name System, translates human readable domain names (for example, www.amazon.com) to machine readable IP addresses (for example, 192.0. 2.44).
What is a name server for a domain?A nameserver is a server in the DNS that translates domain names into IP addresses. Nameservers store and organize DNS records, each of which pairs a domain with one or more IP addresses. These servers act as the bridge between domain names, which we humans can remember, with IP addresses, which computers can process.
What is DNS and its type?DNS is a core internet technology that translates human-friendly domain names into machine-usable IP addresses, such as www.example.com into 192.0. 2.1. The DNS operates as a distributed database, where different types of DNS servers are responsible for different parts of the DNS name space.
What are the 3 types of DNS?There are three main kinds of DNS Servers — primary servers, secondary servers, and caching servers.
|