• 8 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 5/15/23

Discover the Advantages of a DNS Server

 

Link a Name to an IP Address

You can identify devices by their IP addresses. But when you browse the internet, you don’t use IP addresses, even though each website has one.

For example, to use the search engine Qwant or Wikipedia, you don’t type the IP address into your web browser. Instead, you use a URL (Uniform Resource Locator), a web address that directs you to the server or servers hosting the website.

Why don’t you use the IP address?

Because a name is much easier to remember than an IP address. It wouldn’t be very practical to have to remember the web server’s IP address every time you want to browse the internet!

You can carry out the following test to prove that IP addresses are still configured alongside host names. Open command prompt, and enter the command:

ping www.qwant.com

You’ll get something that looks like this:

Ping request to Qwant and Name-IP association
Ping request to Qwant and Name-IP association

As you can see, the ping request works when we replace the IP address with a name. If you send a ping to a host name, you will get a response from an IP address—in this case, 194.187.168.100. This is the IP address of the web server or servers hosting the Qwant search engine.

But how does the translation between the name and the IP address happen?

It’s not enough to know the name of the destination device to send a message to another device. The source device has to include the IP address of the destination device in the packet it’s sending. To get the IP address from the device’s name, it has to ask a DNS server.

Set Multiple Names for a Device

DNS (Domain Name System) is a service that links names and IP addresses. Think of it like a phone directory. This service is based on a protocol, also called DNS.

There are two types of naming systems for devices:

  • Domain name 

  • Hostname 

The hostname is used to identify a device.

The domain name is used to identify a service or feature on a device, such as a website or file storage. 

DNS servers allow you to link an IP address to a hostname or a domain name, or to both at the same time. One device can also be linked to multiple hostnames or domain names.

One computer identified by different names
One computer identified by different names

In the example above, the computer with IP address 212.27.3.1 is identified by three different names:

  • One hostname: pc1.

  • Two domain names:: www.domainname.org and www.domainname.com.

To make sure messages sent to these three names arrive at their destination, whether it be the computer or a service hosted on the computer, we need to configure a DNS server. This will link the computer’s IP address to the three names, like in a phone book.

Name-IP correspondence
Name-IP correspondence

Each entry in the DNS directory is called a “Record”.

But why would I want to give several different names to the same device?

This comes in handy, particularly when one device is hosting several network services, for example, several websites. In general, a device will only have one hostname, but can have several domain names. For example, the first domain name will lead to website 1, and the second domain name to website 2.

DNS means that users don’t need to know what device a service is hosted on, just the domain name associated with the service.

Understand DNS in a Simple Architecture

Client-Server Configuration

Like the DHCP protocol, DNS servers are also based on the client-server model—clients send a request to a server, which provides them with a Name-IP resolution. To add this feature to a network, we need to configure the clients and the server.

The server must be configured to:

  • Respond to client requests for a Name-IP resolution.

  • Link names to IP addresses.

All the clients need to know is the IP address of the DNS server.

Client-server communication

Once configured, a simple architecture with a DNS server works as follows. In this example, we can see the stages of communication when PC0 wants to send a ping to PC1 without indicating PC1’s IP address.

Communication between clients and a DNS server
Communication between clients and a DNS server
  1. PC0 executes the command “ping PC1”.

  2. PC0 doesn’t know the IP address of the name “PC1”, so it sends a request to the DNS server to ask for a matching DNS record.

  3. The DNS server consults its DNS table to see if there is a record under the name “PC1”, and sends a response containing the IP address 192.168.0.2.

  4. PC0 receives PC1’s IP address, and can generate the ping packet with the destination address 192.168.0.2.

Check Your DNS Server Using the Command Prompt

You can check which DNS server your own device uses by opening the command prompt and typing:

ipconfig /all
DNS server used on a home network connected to the internet
DNS server used on a home network connected to the internet

When you’re at home, in most cases, you don’t need to specify which DNS server you want to use. A default one is automatically assigned to your device at the same time as an IP address.

But where does the IP address of this DNS server come from?

It comes from the DHCP server. If you remember, the DHCP server assigns IP addresses to devices and also provides them with configuration information such as:

  • The IP address of the default gateway to use on the network.

  • The IP address of an operational DNS server.

Let’s Recap!

  • The DNS service links device names and IP addresses, meaning that users don’t need to use IP addresses to connect to websites.

  • To add the DNS feature to a network, you need a DNS server with a list of all the network’s device names and the linked IP addresses. This server acts as a directory of names and matching IP addresses.

  • When a network device wants to communicate with another device but doesn’t know its name, it automatically asks the DNS server to provide it with the IP address linked to the name. It can then send its message using the IP address provided.

Now you know the benefits a DNS server provides. Next, let’s find out how to configure it in Packet Tracer in the last chapter of this course!

Example of certificate of achievement
Example of certificate of achievement