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.
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;
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
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#