Showing results for 
Search instead for 
Did you mean: 
Join Customer Connection to register!

ip name-server

Can anybody give me the brief descrpition what is the use of the command ip name-server ?


Hi Sam

This is to tell the device ( be it a switch or router ) the IP address of the name server you want to use for DNS lookups.

Have you noticed when you mis type a command it says :-

Translating ...domain server (

If you specify a name server with that command, it will look up that entry in the name server you specified.

This can be useful if you have named your devices via DNS.

Say I have a router that I have a DNS entry for, I can just type that name at the command line and it will connect via telnet to that device.

Also, if I traceroute to an end point, each entry can be resovled if i use the ip name-server command.

As a little side note, you can stop that annoying feature of the device trying to translate a mistyped command by using the no domain lookup ( or ip domain lookup depending on IOS version ), but this will turn off ALL DNS lookups so don't use use ip name-server and then no ip domain lookup together ;-)

Hope that helps

Thank you I realy appreciate That information was quite useful and understandable

I want to ask you something,sometimes you know we put the command ip name-server with a public dns server such as ip name-server 212.117.*.* Acutally what is that and how it can resolve the names of device in a Private LAN

Hi Sam

Glad the info helped.

If your device can access the public IP, then you will be able to resolve what you need against that server or you can define an internal DNS server that you manage for DNS resolution. If you want to resolve internal hosts that do not have DNS entires you can use the ip host command as below : -

test(config)#ip host mybox

now I can telnet to just by typing mybox


Translating "mybox"...domain server (

( mybox ( Open

User Access Verification


Notice that it tried to resolve the name via DNS first which I could turn off with the no ip domain lookup command as below :-

test(config)#no ip domain lookup


Translating "mybox"

Trying mybox ( Open

User Access Verification


This is not as scalable as DNS but can be useful.