Example 6-5 Router Doing a Name Lookup on a Mistyped Command

   

Enabling and Disabling DNS Lookup

IP domain name lookups or DNS resolution is enabled by default. To disable DNS resolution, use the following command:

 Router(config)#  no ip domain-lookup  

When DNS has been disabled, you can enable DNS lookups with the following command:

 Router(config)#  ip domain-lookup  

This command is executed from global configuration mode. DNS resolution is useful on a network because it enables you to Telnet between routers by name instead of by IP address. In large networks, DNS resolution is not only useful, but also necessary. Without it, it would be similar to surfing the Internet using only the IP address as the URL instead of typing the domain name of the web site.

NOTE

The no ip domain-lookup command disables only DNS packets generated by Cisco IOS software. IP packets carrying DNS requests /responses for end users are not affected and will be routed correctly.


The lab in this book does not have a configured DNS server in the network, so you need to disable DNS resolution. In addition, when DNS is not in use on the network, it is recommended that you disable IP domain lookup. This is because when a router cannot distinguish between a mistyped command and a possible host name, it tries to resolve the host through DNS. Often this might take several seconds as the router tries to translate the name to an IP address before the request times out and you are returned to a command prompt. Example 6-5 demonstrates what happens when you erroneously type sxow instead of show and hit the Enter key. The router responds by trying to do a name lookup on the network for the host sxow.

  R1#    sxow    Translating "sxow"...domain server (255.255.255.255)  % Unknown command or computer name, or unable to find computer address R1# 

Disabling DNS resolution prevents the router from doing name lookups on mistyped commands. Example 6-6 demonstrates disabling DNS resolution on R1.

Example 6-6 Disabling IP Domain Lookup on R1
 R1#  configure terminal  Enter configuration commands, one per line.  End with CNTL/Z. R1(config)#  no ip domain-lookup  R1(config)# 

In Example 6-7, enter the same erroneously typed command sxow, as done in Example 6-5.

Example 6-7 Typing an Erroneous Command with IP Domain Lookup Disabled
 R1#  sxow   Translating "sxow"  % Unknown command or computer name, or unable to find computer address R1# 

Notice that, this time, a DNS request is not sent out as before in Example 6-5. The result is that you are immediately returned to the command prompt. You have now successfully disabled IP domain lookup on R1.


   
Top


CCNA Practical Studies
CCNA Practical Studies (Cisco Certification & Training)
ISBN: 1587200465
EAN: 2147483647
Year: 2005
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net