Tuesday, October 9, 2007

Configure DNS or Disable DNS lookup

If you mistype a command in the Privileged Mode on Cisco router, by default, the router thinks you're trying to connect to a remote host through Telnet. So it performs a DNS lookup on the information you entered.

If you haven't configured DNS on the router, the command prompt will hang until the DNS lookup timeouts. This is one of the thing that really bothers me so to resolve it, I have two options:

The first option is to disable DNS using the "domain-lookup" command as in:

Router(config)# no ip domain-lookup

The second option is to properly configure DNS and point it to a valid DNS server. Here's an example:

Router(config)# ip name-server

By configure the router using one of the two options above it will save you a bit of time and cut a bit of frustration out of your daily routines.


Anonymous said...

brilliant post. i was wondering why some labs in CCNA request disabling lookup but give no reason... thanks for clearing that up.

xonicman said...

I can give 3rd solution, which is more effective than previous in my opinion.

Ex. Your DNS server is OK. If you misstype command name you also have to wait some time because IOS want to connect via telnet. The solution is not to disable DNS lookup completely but prevent from trying to connect via telnet for misstyped commands.

X(config)#line console 0
X(config-line)#transport preferred none
X(config)#line vty 0 15
X(config-line)#transport preferred none


You can connect via telnet through "telnet IP_OR_DNSNAME" command of course.

Best regards,

Jason said...

Nice post Brian, thx. I'm a chess expert (national master at blitz) trying to learn IT. About half way through my ccna course and loving the material. If you ever want to trade your IT knowledge for chess information let me know.

student said...

For configure DNS


Anonymous said...

very interesting, thanks