cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

46379
Views
45
Helpful
3
Replies
Beginner

NO ip-domain lookup

Is it best practice to disable ip domain lookup on switches and routers.  I see the ip name server commands issued but should I also issue the no ip-domain lookup as well and why or why not?

Everyone's tags (4)
3 REPLIES 3
Hall of Fame Cisco Employee

Hi,

Hi,

The no ip domain lookup command is usually seen in configurations. By default, any single word entered on a command line that is not recognized as a valid command is considered as a hostname by the router, and the router will by default try to telnet to that hostname. This is extremely annoying, especially when you do a simple typo, as the router will try to translate that typo into an IP address. If you do not have a DNS server configured, the command line will stall for several seconds until the DNS request times out.

Quite frankly, it does not make much sense to have both ip name-server and no ip domain lookup configured. The no ip domain lookup tells the router to stop interacting with any DNS servers entirely. Having a DNS server configured is then a useless thing because it is not going to be used, anyway.

What could be considered a more proper way of doing things, however, is this: Have the DNS server configured using the ip name-server command, and at the same time, on all lines (con 0, aux 0, vty 0 15), deactivate the automatic action of telnetting into all "words" that look like hostnames:

line con 0
 transport preferred none
line aux 0
 transport preferred none
line vty 0 15
 transport preferred none

This way, you can have your cake, and eat it, too :)

Best regards,
Peter

Beginner

Re: Hi,

Great explanation, Peter! Thanks!
John Hobbs
Houston, TX USA
- a Friendly American
Beginner

Great explanation!

Thanks for explanation! Great for novice! Great for me!

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards