Showing posts with label stop. Show all posts
Showing posts with label stop. Show all posts

Wednesday, December 24, 2008

Cisco CCNA Certification Exam Tutorial: DNS And The IP Name-Server Command

DNS behaviors of a Cisco router are important topics for both the CCNA exam and real-world production networks, and you probably didn't know there were so many DNS details before you began studying for the exam! In this tutorial, we'll look at the ip name-server command and its proper usage.

When a command is mistyped on a Cisco router, 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.

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. 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.

It's just that easy to tell a Cisco router exactly where the DNS server is!

Cisco CCNA Certification: Five Key Combinations You Should Know

When you start studying for your CCNA and CCNP exams, many books will present you with a huge list of keystroke shortcuts for use on Cisco routers. While the 640-801, 811, and 821 exams may ask you about one or two of these, you really have to get hands-on experience with these commands to master them. Even better, there are some key combinations that Cisco routers mention, but then don't tell you what they are! Let's take a look at a few of the more helpful key combinations, and conclude with the "secret" way to stop a ping or traceroute.

The up arrow on your keyboard is great for repeating the last command you typed. Let's say you mis-enter an access-list. Instead of typing it from the beginning, just hit your up arrow to repeat it, then fix the problem.

CTRL-A takes the cursor to the beginning of a typed line. If you've written an extended ACL, you know that can be a very long command, and one you probably don't want to retype. If you get a carat indicating there is a problem with the line, use your up arrow to repeat the command. If you see the error is near the beginning, use CTRL-A to move the cursor immediately to the beginning of the line. CTRL-E takes the cursor to the end of a typed line.

To move the cursor through a typed line without erasing characters, you've got a couple of options. I personally like to use the left and right arrows, but you can also use CTRL-B to move back and CTRL-F to move forward.

Finally, there's the combination that Cisco mentions to you when you run ping or traceroute, but they don't tell you what it is! If you send an extended ping or a traceroute, you could be looking at asterisks for a long time if you don't know this one. In the following example, a traceroute is obviously failing:

R2#traceroute 10.1.1.1

Type escape sequence to abort.

Tracing the route to 10.1.1.1

1 * * *

2 *

The problem is that you're going to get 30 rows of those asterisks, which is frustrating and time-consuming at the same time. Note the router console message "Type escape sequence to abort". That's helpful - but what is it?

Here it is: Just type CTRL-SHIFT-6 twice, once right after the other. You won't see anything on the router console, but the traceroute will terminate.

R2#traceroute 10.1.1.1

Type escape sequence to abort.

Tracing the route to 10.1.1.1

1 * * *

2 * * *

3

R2#
The traceroute was successfully terminated. This combination works for pings as well, both extended and regular. Of all the keystrokes you can learn, this one is the most valuable!