Configuring a Cisco Router: first basic settings

Configuring a Cisco Router

This article provides information and commands concerning the following topics:


Tip

There are other modes than these. Not all commands work in all modes. Be careful. If you type in a command that you know is correct—show running-config, for example—and you get an error, make sure that you are in the correct mode.

This command works on both routers and switches

These commands work on both routers and switches.

Caution

The enable secret password is encrypted by default. The enable password is not. For this reason, recommended practice is that you never use the enable password command. Use only the enable secret password command in a router or a switch configuration. You cannot set both enable secret password and enable password to the same password. Doing so defeats the use of encryption.

Caution

If you have turned on service password-encryption, used it, and then turned it off, any passwords that you have encrypted stay encrypted. New passwords remain unencrypted.

One of the biggest problems that new administrators face is the interface names on the different models of routers. With all the different Cisco devices in production networks today, some administrators are becoming confused about the names of their interfaces. Using Cisco devices that are no longer in production but are still valuable in a lab or classroom setting can also complicate matters. Older devices are still a great (and inexpensive) way to learn the basics (and in some cases the more advanced methods) of router configuration.

The following chart is a sample of some of the different interface names for various routers. This is by no means a complete list. Refer to the hardware guide of the specific router that you are working on to see the various combinations, or use the following command to see which interfaces are installed on your particular router:

router# show ip interface brief

Note

An “on-board” port is a fixed port that is built directly into the motherboard. A “slot” is used to expand port density of a device by inserting a module that plugs into the motherboard. A module may contain several ports. Depending on the router, you may have no slots or many.

When moving between interfaces, you have two options. The first option, shown on the left side of the following table, exits out of interface mode back to global configuration mode, and then enters into a new interface mode. In this scenario, the prompt changes and you see the movement. The second option, shown on the right side of the table, moves directly from one interface mode to the second interface mode. In this case, the prompt does not change, even though you are in a new interface mode.

Caution

You do not want to put the configuration for one interface on a different interface.

Tip

The clock rate command is used only on a serial interface that has a DCE cable plugged into it. There must be a clock rate on every serial link between routers. It does not matter which router has the DCE cable plugged into it or which interface the cable is plugged into. Serial 0/0/0 on one router can be plugged into Serial 0/0/1 on another router.

Note

Serial connections are rapidly being removed from networks because Ethernet connections are faster and not reliant on clocking rates. In this book, serial interfaces are used to distinguish between WAN connections and LAN connections (which are shown using Ethernet interfaces).

Tip

The message-of-the-day (MOTD) banner is displayed on all terminals and is useful for sending messages that affect all users. Use the no banner motd command to disable the MOTD banner. The MOTD banner displays before the login prompt and the login banner, if one has been created, if you are connected via the console or through Telnet. If you are connecting using SSH, the MOTD banner appears after the SSH connection.

Tip

The login banner displays before the username and password login prompts. Use the no banner login command to disable the login banner. The MOTD banner displays before the login banner.

Tip

When in user EXEC or privileged EXEC mode, commands that do not match a valid command default to Telnet. Therefore, you can use a host name mapping to Telnet to a remote device:

Click here to view code image

Router# london = Router# telnet london = Router# telnet 172.16.1.3

Tip

Ever type in a command incorrectly and end up having to wait for what seems to be a minute or two as the router tries to translate your command to a domain server of 255.255.255.255? When in user EXEC or privileged EXEC modes, commands that do not match a valid command default to Telnet. Also, the router is set by default to try to resolve any word that is not a command to a Domain Name System (DNS) server at address 255.255.255.255. If you are not going to set up DNS, turn off this feature to save you time as you type, especially if you are a poor typist.

Note

In some newer versions of the IOS, this command might not have a hyphen in it: the command is no ip domain lookup.

The reason I created the CCNA Portable Command Guide is because I am a poor typist and I was always waiting for my spelling mistakes to be resolved through a DNS lookup. If you do not have a DNS server configured, all of those spelling mistakes take time to be resolved. This is why I was so happy to discover the no ip domain-lookup command!

But what happens if you have a DNS server configured (using the ip name-server command) and no ip domain-lookup configured? Your DNS server is now useless because it will not be used.

A more proper way of doing things would be to configure your DNS server using the ip name-server command, and then go to all of your lines (con 0, aux 0, vty 0 15), and deactivate the automatic action of telnetting into all “words” that look like host names. The Cisco IOS Software accepts a host name entry at the EXEC prompt as a Telnet command. If you enter the host name incorrectly, the Cisco IOS Software interprets the entry as an incorrect Telnet command and provides an error message indicating that the host does not exist. The transport preferred none command disables this option so that if you enter a command incorrectly at the EXEC prompt, the Cisco IOS Software does not attempt to make a Telnet connection.

Now if you make a spelling mistake at the command prompt, you will be given an error, as opposed to waiting for your mistake to be resolved through a DNS lookup.

Tip

Ever try to type in a command and an informational line appears in the middle of what you were typing? Lose your place? Do not know where you are in the command, so you just press Enter and start all over? The logging synchronous command tells the router that if any informational items get displayed on the screen, your prompt and command line should be moved to a new line, so as not to confuse you. The informational line does not get inserted into the middle of the command you are trying to type. If you were to continue typing, the command would execute properly, even though it looks wrong on the screen.

Tip

If you do not set the logging synchronous command and you are in a situation where your command being entered is interrupted by informational items being displayed on the screen, you can use the keyboard shortcut of Imageto bring your command to the next line without the message interfering with the command.

Tip

The command exec-timeout 0 is great for a lab environment because the console never logs out, regardless of how long the connection remains idle. This is considered to be bad security and is dangerous in the real world. The default for the exec-timeout command is 10 minutes and zero (0) seconds (exec-timeout 10 0) of idle connection time.

Tip

The running configuration is still in dynamic memory. Reload the router to clear the running configuration.

Note

The write command existed before the copy running-config startup-config and erase startup-config commands. Although the write command was officially deprecated some time ago, it still works in many versions of the Cisco IOS Software. However, it does not work on all devices and platforms—for example, it does not work with the Nexus platform.

Tip

The do command is useful when you want to execute EXEC commands, such as show, clear, or debug, while remaining in global configuration mode or in any configuration submode. You cannot use the do command to execute the configure terminal command because it is the configure terminal command that changes the mode to global configuration mode.

Figure 14-1 illustrates the network topology for the configuration that follows, which shows a basic router configuration using the commands covered in this post.

Вас заинтересует / Intresting for you:

Cisco: Resetting Switch Config...
Cisco: Resetting Switch Config... 1717 views Андрей Волков Mon, 15 Feb 2021, 19:13:09
Cisco Switch Configuration: st...
Cisco Switch Configuration: st... 1926 views Валерий Павлюков Sun, 06 Feb 2022, 16:39:35
Cisco Discovery Protocol (CDP)...
Cisco Discovery Protocol (CDP)... 1010 views Валерий Павлюков Sat, 05 Feb 2022, 17:35:12
Cisco: Shortcuts for Entering ...
Cisco: Shortcuts for Entering ... 1651 views Андрей Волков Wed, 17 Feb 2021, 15:59:18
Comments (1)
This comment was minimized by the moderator on the site

Excellent guide! for Cisco basic configuring! Tnx!

apv
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Suggested Locations