Using The IP Name-Server Command
I'll have a couple of exclusive Cisco tutorials up later today, along with the free questions of the day - and an exclusive subnetting review as well.
When I started studying for the CCNA, it just seemed like there were a hundred different ways to configure DNS options on a Cisco router. Use broadcasts to find the DNS server, don't use a DNS server at all, use a local table, etc.... so today, to help you keep the DNS stuff straight, here's a tutorial on the ip name-server command.
And there really aren't a hundred different DNS options - it just seems that way! ;)
When a command is mistyped on a Cisco router - and we all do that, don't we? - the default behavior of the router is to attempt to resolve it via DNS. First, the router looks for an IP Host table on the local router to perform this resolution – that’s what the “translating” word in the output is referring to. If there’s no IP Host table or the IP Host table doesn’t contain an entry for what you typed, the router will send a broadcast in an attempt to resolve this name through a remote DNS server. To prevent this broadcast, enter the global command no ip domain-lookup. Of course, to use DNS to resolve hostnames, ip domain-lookup would have to be reenabled if it’s been turned off.
I'll just enter a few random letters so you can see what's going on.
R2#contin
Translating "contin"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
A command is mistyped as “contin”. The Cisco router’s default behavior is to resolve this entry locally via an IP Host table, which isn't present on the router. (See where the router output says Translating "contin"? That's the router looking for a matching entry in an IP Host table.)
In this case, there is no IP Host table, so a broadcast is then sent out to find a DNS server to perform the name resolution. The DNS lookup attempt must time out before the configuration can continue.
R2#conf t
R2(config)#no ip domain-lookup
R2#contin
Translating "contin"
% Unknown command or computer name, or unable to find computer address
With “no ip domain-lookup” configured, the router doesn’t attempt to find a remote DNS server. It sees there is no local resolution configured and almost immediately sends a message to the console that the name can’t be resolved.
R2#conf t
R2(config)#ip domain-lookup
R2(config)#ip name-server 10.1.1.1
R2#contin
Translating "contin"...domain server (10.1.1.1)
A DNS server is installed on the network with the IP address 10.1.1.1. DNS lookup is reenabled with the command ip domain-lookup, and the IP address of the DNS server is specified with the ip name-server command.
I'll have a couple of exclusive Cisco tutorials up later today, along with the free questions of the day - and an exclusive subnetting review as well.
When I started studying for the CCNA, it just seemed like there were a hundred different ways to configure DNS options on a Cisco router. Use broadcasts to find the DNS server, don't use a DNS server at all, use a local table, etc.... so today, to help you keep the DNS stuff straight, here's a tutorial on the ip name-server command.
And there really aren't a hundred different DNS options - it just seems that way! ;)
When a command is mistyped on a Cisco router - and we all do that, don't we? - the default behavior of the router is to attempt to resolve it via DNS. First, the router looks for an IP Host table on the local router to perform this resolution – that’s what the “translating” word in the output is referring to. If there’s no IP Host table or the IP Host table doesn’t contain an entry for what you typed, the router will send a broadcast in an attempt to resolve this name through a remote DNS server. To prevent this broadcast, enter the global command no ip domain-lookup. Of course, to use DNS to resolve hostnames, ip domain-lookup would have to be reenabled if it’s been turned off.
I'll just enter a few random letters so you can see what's going on.
R2#contin
Translating "contin"...domain server (255.255.255.255)
% Unknown command or computer name, or unable to find computer address
A command is mistyped as “contin”. The Cisco router’s default behavior is to resolve this entry locally via an IP Host table, which isn't present on the router. (See where the router output says Translating "contin"? That's the router looking for a matching entry in an IP Host table.)
In this case, there is no IP Host table, so a broadcast is then sent out to find a DNS server to perform the name resolution. The DNS lookup attempt must time out before the configuration can continue.
R2#conf t
R2(config)#no ip domain-lookup
R2#contin
Translating "contin"
% Unknown command or computer name, or unable to find computer address
With “no ip domain-lookup” configured, the router doesn’t attempt to find a remote DNS server. It sees there is no local resolution configured and almost immediately sends a message to the console that the name can’t be resolved.
R2#conf t
R2(config)#ip domain-lookup
R2(config)#ip name-server 10.1.1.1
R2#contin
Translating "contin"...domain server (10.1.1.1)
A DNS server is installed on the network with the IP address 10.1.1.1. DNS lookup is reenabled with the command ip domain-lookup, and the IP address of the DNS server is specified with the ip name-server command.
Comments