Basic Cisco Router Setup
- select the contributor at the end of the page -
The Basics of Cisco Router Configuration
As mentioned in the overview, there are only a few configuration items that need to be completed to get a Cisco router up and working. Of course from this point the configuration can be as simple or as complex as is needed by the specific situation.
When a new Cisco router boots up for the first time (or every time the configuration is completely cleared) it asks the user if they want to run through a list of prompts to configure the router; most Cisco engineers tend to ignore this initial setup wizard (for lack of a better word) and just configure the router manually. The initial setup screen is shown in Figure 1:
Figure 1 - Cisco setup wizard
When a Cisco router is initially booted there are no passwords configured, the only thing that is needed to configure the router is a serial rollover cable or USB cable (newer devices). Once a connection is established the basic configuration of the device can be done, this will be covered next.
The first prompt (if the user says ‘no' to the initial configuration prompt) that the user will see is a user exec mode prompt; this is shown in Figure 2:
Figure 2 - user exec mode prompt (represented by the ‘>')
To configure a Cisco router (and mode other Cisco platforms) the user needs to be in the privileged exec mode, to gain access to this prompt enter the ‘enable' command.
Figure 3 - privileged exec mode (represented by the ‘#')
Now that the user is in privileged exec mode they are able to access all of the commands on the router including the ability to alter the configuration. To alter the configuration from this prompt the user must enter the ‘configuration terminal' command (often notated by its shortened form – ‘conf t').
Figure 4 - Configuration mode
The initial configuration mode that is accessed is referred to as Global configuration mode; all configuration commands at this level affect the whole system. It is at this prompt where the hostname, domain name and passwords are configured. To configure the hostname of the router the 'hostname hostname' command is used; this is shown in Figure 5.
Figure 5 - Configuring the router hostname
As is seen in Figure 5, once the device hostname is configured, the prefix of the prompt will change to reflect the change.
The second thing that is being configured is the router's domain name. To configure the domain name of the router the ‘ip domain-name domain-name' command is used; this is shown in Figure 6.
Figure 6 - Router Domain Name Configuration
The last thing that will be shown configured in global configuration mode is typically the most important part of any networked devices configuration: the password. There are two methods of configuring the enable password on a Cisco router; the first utilizes an easily reversible encryption technique that has long been depreciated (which will not be covered) and the second uses MD5 to hash the password in the configuration (which is much more secure). It is important to note here that the enable password will not prevent local users from accessing the user exec mode, but will prevent them from getting into privileged exec mode without a password. To configure an enable password using this second technique the ‘enable secret password' command is used; this is shown in Figure 7.
Figure 7 - Router Password Configuration
The next thing that will be configured is an IPv4 address on an interface. To perform this the user must know the identifier of the configured interface. On some platforms this is marked on the port on others it will be shown as a number value and the specific name will depend on the location of the interface module (in modular chassis). For the purposes of this article the interface is the first available FastEthernet interface which is labeled ‘0/0'. This interface will be configured with an IPv4 address of 10.10.10.1 with a subnet mask of 255.255.255.0 (/24). This is shown in Figure 8.
Figure 8 - Basic Interface Configuration
One commonly forgotten configuration task is the enabling of the interface. The command that is used to perform this is ‘no shutdown'; this is shown in Figure 9.
Figure 9 - Enabling an Interface
Configuration on a Cisco Router
This article will now pivot to the configuration of the lines on a Cisco router. The most commonly used line types used on a Cisco router are console and VTY. The console line (a total of 1) allows a local user to access the router when physically connected to the console port. By default, there is no password configured on this port so any user with physical access can, at least, access user exec mode. To alter this, a password can be configured on the console line; to do this the user must access the console line configuration mode using the ‘line console 0' command and issue the ‘password password' command, this is shown in Figure 10.
Figure 10 - Console Password Configuration
The last thing that will be covered in this article is the configuration that is required to enable Telnet access to the router. This configuration is completed through the VTY terminal configuration mode. On most Cisco routers the VTY lines that are used for Telnet (and SSH) connections are labeled from 0 through 4 (For a total of 5). Typically, all of these lines are configured at the same time. To gain access to this mode the ‘line vty 0 4' command is used; once the user has access to VTY terminal configuration mode then they need to perform two commands: ‘login' and 'password password'. The first command is used to enable a login prompt when accessing the router via the terminal lines; the second is used to set the password that is used to ensure authorized access via the terminal lines.
Figure 11 - Terminal (VTY) line Configuration
The intention of this series of articles is to give those with no Cisco experience a quick reference as to how to set up the device to work in a rather short period of time. For those looking for further knowledge please check out the other articles available on this site as well as the training that is available. Hopefully the content of this article will allow the reader to quickly set up a router and obtain some of the most basic skills for future implementations.