Free CCNA Workbook
  • Home
  • About
    • Donations
    • Free CCNA Workbook Staff
  • Blog
  • Workbooks
    • CCNA Routing & Switching
    • CCNA Security
    • CCNA Voice
    • CCNA Wireless
  • Stub Lab
    • Stub Lab Information
    • Stub Lab FAQ’s
    • Stub Lab Topology

Setting IOS DNS Servers

So if you want a Cisco device to resolve names to IP’s you must setup DNS Servers. This lab will discuss and demonstrate the configuration and verification of Cisco IOS DNS Servers.

Real World Application & Core Knowledge

If you’ve ever wondered how typing a URL in the web browser takes you to a specific website then you’re in for a treat, however if you already know how DNS works then this should be just review for you.

Domain Name System (DNS) is a type of service that translates names into IP addresses. When you visit a URL on the internet you’re going to the URL’s website however behind the scene the DNS servers translate that name to an IP Address so that way you would not have to remember 209.191.122.70 as yahoo.com

DNS has made the operation of the modern network so much easier as its obviously easier to remember www.companyname.com instead of some random sets of numbers. Most people have a hard time remembering telephone numbers. Could you imagine having to remember all the IP Addresses of all the popular websites? That could potentially cause chronic headaches.

In the Cisco world, you have the ability to configure multiple DNS Servers on a Cisco device running the Cisco Internetwork Operating System (Cisco IOS) to ease network management. To configure a DNS server on a Cisco Router and/or Switch you’ll use the ip name-server a.b.c.d command in global configuration mode. You can however specify multiple DNS servers by typing the next server’s IP Address following the first DNS server specified. Example; ip name-server 10.1.50.6 10.1.50.7

After specifying DNS servers you have the ability to ping named host such as yahoo.com or internal network host using the internal DNS servers. Cisco automatically attempts to resolve IP addresses to name when using the traceroute command when you have DNS servers specified.

In this lab you will configure R1 to use the DNS servers of 4.2.2.2 and 4.2.2.4 (Public DNS Servers hosted by Verizon/GTE) and then test the DNS name resolution by pinging Google.com from R1’s command line interface.

Familiarize yourself with the following new command(s) listed below;

Command Description
ip name-server a.b.c.d This command is executed in global configuration to specify DNS servers to be used by the Cisco device during name to ip resolution. You may have multiple servers by adding the next server IP Address following the first in this command.

The following logical topology shown below is to be used in this lab;

Lab Prerequisites

  • If you are using GNS3 than delete the link between R1’s FastEthernet0/0 and SW1’s FastEthernet0/1, than configure a NIO Cloud in GNS3 and bind it to your physical NIC than connect it to R1’s FastEthernet0/0 interface. Ensure that you have internet connectivity.
  • If you’re using real hardware than ensure that R1’s FastEthernet0/0 interface is plugged into a network with DHCP and internet access.
  • If you are using GNS3 than load the Free CCNA Workbook GNS3 topology than start device(s); R1.
  • Establish a console session with device(s) R1 than load the initial configurations provided below by copying the config from the textbox and pasting it into the respected routers console.

 

Lab Objectives

  • Ensure that R1 has obtained a DHCP address from your internet gateway and verify that R1 internet connectivity via the NIO cloud by pinging 4.2.2.2
  • Configure R1 to use the DNS Servers 4.2.2.2 and 4.2.2.4
  • Verify that R1 is properly resolving names to IP Addresses by pinging google.com

Lab Instruction

Objective 1. – Ensure that R1 has obtained a DHCP address from your internet gateway and verify that R1 internet connectivity via the NIO cloud by pinging 4.2.2.2

R1#show ip interface brief FastEthernet0/0
Interface                  IP-Address      OK? Method Status        Protocol
FastEthernet0/0            192.168.2.8     YES DHCP   up            up      
R1#ping 4.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/38/112 ms
R1#

Objective 2. – Configure R1 to use the DNS Servers 4.2.2.2 and 4.2.2.4

R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip name-server 4.2.2.2 4.2.2.4
R1(config)#end
R1#

Objective 3. – Verify that R1 is properly resolving names to IP Addresses by pinging google.com

Read Me

In the initial configuration for this Lab, R1’s FastEthernet0/0 interface is configured as DHCP. If the default gateway on your network is setup as a DNS proxy server then the R2 will use your default gateway for DNS resolution over the configured name-servers as shown below; However if FastEthernet0/0 is statically configured then R2 will use the specified name-servers.

R1#ping google.com

Translating "google.com"...domain server (192.168.2.1) [OK]

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 72.14.204.104, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/35/56 ms
R1#
◄ Previous Lab
Next Lab ►

About Free CCNA Workbook

In 2008 Free CCNA Workbook originally started as a sharable PDF but quickly evolved into the largest CCNA training lab website on the net!

 

The website was founded in late 2009 with the goal of providing FREE Cisco CCNA labs that can be completed using the GNS3 platform.

Latest Tweets

  • 9 years ago The @fccnawb website is not only available in HTTPS. We've done this of course to make Google happy lol.
  • 10 years ago Interested in following the Founder of the Free CCNA Workbook website? Check out @MattGeorgeCCIE

Useful Links

  • Stub Lab GNS3 Topology File Download
  • GNS3 - Cisco Device Emulator Download
  • Geek Fluent Blog by Dave Henry
  • Junos Workbook | Free Juniper JNCIA Training
  • Putty Terminal Emulator (Free Download)
  • Quiz Me! - CCNA R&S Practice Exam

© Copyright 2009-2017 Free CCNA Workbook All Rights Reserved.

Legal | Privacy Policy | Sitemap | Contact Us

sponsored