Achievable logoAchievable logo
CCNA
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Introduction to networking
2. Administering Ethernet LANs
3. IP connectivity
4. Network services
4.1 Access Control Lists (ACLs)
4.2 Network Address Translation (NAT)
4.3 Dynamic Host Configuration Protocol (DHCP)
4.4 Domain Name Service (DNS)
4.5 Quality of Service (QoS)
4.6 Network Time Protocol (NTP)
5. IPv6
6. Wireless networking
7. Network management and administering network devices
8. Network security fundamentals
9. Network automation and programmability
Wrapping up
Achievable logoAchievable logo
4.4 Domain Name Service (DNS)
Achievable CCNA
4. Network services
Our CCNA course is currently in development and is a work-in-progress.

Domain Name Service (DNS)

4 min read
Font
Discuss
Share
Feedback

In today’s world, many people know how to open a web page in a browser: you type a Uniform Resource Locator (URL), and the page loads. Behind the scenes, your device sends an HTTP “GET” request to a web server asking for the page content, and the server responds with that content.

Here’s the key networking idea to keep in mind: on a TCP/IP network, most communication between devices is encapsulated in IP packets.

If application data is carried in an IP packet, that packet must include:

  • a source IP address
  • a destination IP address

That’s how devices know where to send traffic - using IP addresses.

So if you type a URL into your browser, how does your device learn the IP address of the web server hosting that site? Your computer or mobile device doesn’t know that IP address ahead of time. And if it can’t learn the destination IP address, it can’t send the HTTP request to the correct server - so the website won’t load.

Image 222

Image Title - PC A trying to reach www.example[.]com but does not know the IP address of the Web Server

Domain name service (DNS)

The protocol that lets a device learn the IP address associated with a particular URL (domain name) or host name is the Domain Name Service (DNS). DNS is a critical building block of the Internet.

DNS works by using DNS servers that store mappings between domain names and IP addresses.

This is similar to how ARP maps IP Addresses to MAC Addresses.

In practical terms, DNS servers maintain a database of domain-name-to-IP-address mappings. For many common lookups, the relevant entry is stored as an “A Record” (a record that maps a name to an IPv4 address). A system administrator maintains the DNS server’s data.

DNS is also distributed and hierarchical:

  • There are many DNS servers across the Internet.
  • DNS servers can query other DNS servers when they don’t already have the answer.
  • You can use public DNS servers, or you can run an internal DNS server that forwards (piggybacks) queries to a public DNS server when needed.

When you enter a URL in your browser, your device must first query a DNS server to retrieve the IP address of the web server hosting the site you’re trying to reach.

  • If the DNS server already has the mapping (the “A Record”) in its database, it replies with the associated IP address.
  • Only after your device learns that IP address can it communicate directly with the web server and request the web page via HTTP.

Image 223

Image Title - PC A querying its DNS Server and then reaching out to the Web Server

It is critical to understand that the IP address to one or more DNS Servers must be configured on the PC (or mobile device), in order for it to know where to send its DNS queries. The DNS Server can be configured on the device manually or, the device can learn the IP address of the DNS Server when it receives its information from a DHCP Server. The DHCP pool can be configured to include the IP address of a nearby DNS Server along with the IP address, Subnet Mask and Default Gateway.

Which brings up a key point about the 4 critical things that a host needs in order to access the Internet:

  • IP address
  • Subnet Mask
  • Default Gateway
  • DNS Server

It’s also accurate to say that if DNS isn’t working, you won’t be able to access the Internet (properly).

That is, if DNS isn’t working, you can still access the Internet using the Public IP address of a Web Server, but you would have to know what that IP address is. Which is not something that normal users will have handy. It’s much easier to just type in the URL to a web page, than it is to memorize a bunch of IP addresses! This is why DNS makes our lives much easier

HTTP requests and IP packets

  • Web browsing uses HTTP “GET” requests
  • Communication occurs via IP packets on TCP/IP networks
  • IP packets require source and destination IP addresses

IP address discovery

  • Devices need destination IP address to communicate
  • URLs must be translated to IP addresses before sending HTTP requests

Domain name service (DNS)

  • DNS translates domain names/URLs to IP addresses
  • Uses DNS servers storing domain-name-to-IP-address mappings
    • “A Record” maps domain name to IPv4 address
  • DNS is distributed and hierarchical
    • Multiple DNS servers can query each other
    • Supports public and internal DNS servers

DNS query process

  • Device queries DNS server for IP address when URL is entered
  • DNS server replies with IP if mapping exists
  • Device uses IP address to communicate with web server

DNS server configuration

  • Device must have IP address of DNS server configured
    • Set manually or learned via DHCP
  • DHCP can provide: IP address, Subnet Mask, Default Gateway, DNS Server

Importance of DNS

  • DNS is essential for normal Internet access
  • Without DNS, access by IP address only (impractical for most users)

Sign up for free to take 5 quiz questions on this topic

Previous
Next  | 4.5 Quality of Service (QoS)
All rights reserved ©2016 - 2026 Achievable, Inc.

Domain Name Service (DNS)

In today’s world, many people know how to open a web page in a browser: you type a Uniform Resource Locator (URL), and the page loads. Behind the scenes, your device sends an HTTP “GET” request to a web server asking for the page content, and the server responds with that content.

Here’s the key networking idea to keep in mind: on a TCP/IP network, most communication between devices is encapsulated in IP packets.

If application data is carried in an IP packet, that packet must include:

  • a source IP address
  • a destination IP address

That’s how devices know where to send traffic - using IP addresses.

So if you type a URL into your browser, how does your device learn the IP address of the web server hosting that site? Your computer or mobile device doesn’t know that IP address ahead of time. And if it can’t learn the destination IP address, it can’t send the HTTP request to the correct server - so the website won’t load.

Image 222

Image Title - PC A trying to reach www.example[.]com but does not know the IP address of the Web Server

Domain name service (DNS)

The protocol that lets a device learn the IP address associated with a particular URL (domain name) or host name is the Domain Name Service (DNS). DNS is a critical building block of the Internet.

DNS works by using DNS servers that store mappings between domain names and IP addresses.

This is similar to how ARP maps IP Addresses to MAC Addresses.

In practical terms, DNS servers maintain a database of domain-name-to-IP-address mappings. For many common lookups, the relevant entry is stored as an “A Record” (a record that maps a name to an IPv4 address). A system administrator maintains the DNS server’s data.

DNS is also distributed and hierarchical:

  • There are many DNS servers across the Internet.
  • DNS servers can query other DNS servers when they don’t already have the answer.
  • You can use public DNS servers, or you can run an internal DNS server that forwards (piggybacks) queries to a public DNS server when needed.

When you enter a URL in your browser, your device must first query a DNS server to retrieve the IP address of the web server hosting the site you’re trying to reach.

  • If the DNS server already has the mapping (the “A Record”) in its database, it replies with the associated IP address.
  • Only after your device learns that IP address can it communicate directly with the web server and request the web page via HTTP.

Image 223

Image Title - PC A querying its DNS Server and then reaching out to the Web Server

It is critical to understand that the IP address to one or more DNS Servers must be configured on the PC (or mobile device), in order for it to know where to send its DNS queries. The DNS Server can be configured on the device manually or, the device can learn the IP address of the DNS Server when it receives its information from a DHCP Server. The DHCP pool can be configured to include the IP address of a nearby DNS Server along with the IP address, Subnet Mask and Default Gateway.

Which brings up a key point about the 4 critical things that a host needs in order to access the Internet:

  • IP address
  • Subnet Mask
  • Default Gateway
  • DNS Server

It’s also accurate to say that if DNS isn’t working, you won’t be able to access the Internet (properly).

That is, if DNS isn’t working, you can still access the Internet using the Public IP address of a Web Server, but you would have to know what that IP address is. Which is not something that normal users will have handy. It’s much easier to just type in the URL to a web page, than it is to memorize a bunch of IP addresses! This is why DNS makes our lives much easier

Key points

HTTP requests and IP packets

  • Web browsing uses HTTP “GET” requests
  • Communication occurs via IP packets on TCP/IP networks
  • IP packets require source and destination IP addresses

IP address discovery

  • Devices need destination IP address to communicate
  • URLs must be translated to IP addresses before sending HTTP requests

Domain name service (DNS)

  • DNS translates domain names/URLs to IP addresses
  • Uses DNS servers storing domain-name-to-IP-address mappings
    • “A Record” maps domain name to IPv4 address
  • DNS is distributed and hierarchical
    • Multiple DNS servers can query each other
    • Supports public and internal DNS servers

DNS query process

  • Device queries DNS server for IP address when URL is entered
  • DNS server replies with IP if mapping exists
  • Device uses IP address to communicate with web server

DNS server configuration

  • Device must have IP address of DNS server configured
    • Set manually or learned via DHCP
  • DHCP can provide: IP address, Subnet Mask, Default Gateway, DNS Server

Importance of DNS

  • DNS is essential for normal Internet access
  • Without DNS, access by IP address only (impractical for most users)

More from Network services

  • Network Address Translation (NAT)
  • Dynamic Host Configuration Protocol (DHCP)
  • Quality of Service (QoS)
  • Network Time Protocol (NTP)