This is a continuation of Our CCNA Labs on GNS3 series. Last we configured SSH and Telnet Access Lab. The topologies shown here can be implemented on Cisco Packet Tracer as well.

Domain Name Service is what resolve hostnames to IP addresses. When you have DNS server running on your network, you don’t have to type the IP address of the host you want to connect to or ping as long as a hostname is set. You just type the hostname, Internet name or Fully qualified domain name(fqdn) and DNS server work out the rest for you.
DNS Server listens on UDP port 53.

We’ll use topology shown below to setup DNS server. R1 will use R2 as DNS server to make DNS resolutions.


First, let’s begin with R1. We’ll setup hostname and IP related information.
R1 ip Configurations:

configure terminal
hostname R1
interface e0/0
ip address
no shut
do wr 

R2 IP and Hostname Configurations

config t
hostaname R2
int e0/0
ip address
no shut
do wr

Setting up R2 as DNS Server

config t
ip dns server
ip host

We mapped to ip address Currently, we don’t have, we could create loopback interface on R2 and assign ip

interface loopback 1
ip address

Let’s verify that loopback interface we just created is working.This will show us that the hostname correctly setup locally on R2.


Now it’s time to setup R1 to resolve hostnames using R2.On R1 type;

config terminal 
ip domain lookup
ip name-server

Set R1 to use R2 as the default gateway to get to the loopback interface on R2. So that after R1 resolve, it can reach through its default route (R2).
on R1 type:

config t
ip route

This tells our router that to get to any network not in its routing table, it’s next hop is which is our router R2.
We can turn on DNS udp port debug command so that we can see what’s going on on R1.

debug ip udp

Now on R1, do a ping to and you should get a success message.

ping repeat 3

If you captured the traffic, you’ll see DNS query and Answer as shown in Wireshark capture screenshot below.

dns server gns3 capture

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here