Chapter 11. Configuring a Cisco Router

This chapter provides information and commands concerning the following topics:

Image Router modes

Image Entering global configuration mode

Image Configuring a router, specifically

Image Device Name

Image Passwords

Image Password encryption

Image Interface name

Image Moving between interfaces

Image Configuring a serial interface

Image Configuring a Fast Ethernet interface

Image Configuring a Gigabit Ethernet interface

Image Assigning IPv6 addresses to interfaces

Image Creating a message-of-the-day (MOTD) banner

Image Creating a login banner

Image Setting the clock time zone

Image Mapping a local hostname to a remote IP address

Image The no ip domain-lookup command

Image The logging synchronous command

Image The exec-timeout command

Image Saving configurations

Image Erasing configurations

Image show commands to verify the router configurations

Image EXEC commands in configuration mode: the do command

Image Configuration Example: Basic Router Configuration

Router Modes

Image

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.


Entering Global Configuration Mode

Image

Configuring a Router Name

This command works on both routers and switches.

Image

Configuring Passwords

These commands work on both routers and switches.

Image

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.


Password Encryption

Image

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.


Interface Names

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

Image
Image
Image
Image

Moving Between Interfaces

What happens in Column 1 is the same thing occurring in Column 3.

Image

Configuring a Serial Interface

Image

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.


Configuring a Fast Ethernet Interface

Image

Configuring a Gigabit Ethernet Interface

Image

Assigning IPv6 Addresses to Interfaces

Image

Creating a Message-of-the-Day Banner

Image

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.


Creating a Login Banner

Image

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.


Setting the Clock Time Zone

Image

Mapping a Local Hostname to a Remote IP Address

Image

Tip

When in user EXEC or privilege EXEC modes, commands that do not match a valid command default to Telnet. Therefore, you can use a hostname mapping to telnet to a remote device:

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


The no ip domain-lookup Command

Image

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


The logging synchronous Command

Image

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.


The exec-timeout Command

Image

Tip

The command exec-timeout 0 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.


Saving Configurations

Image

Erasing Configurations

Image

Tip

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


show Commands

Image
Image

EXEC Commands in Configuration Mode: The do Command

Image

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.


Configuration Example: Basic Router Configuration

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

Image

Figure 11-1 Network Topology for Basic Router Configuration

Boston Router

Image
Image
Image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.178.207