Home > Articles > Cisco > CCENT

Basic Initial Router Configuration

  • Print
  • + Share This
There are a number of basic things that need to be configured on a Cisco router before it can be used for its primary function (routing). These things include configuring Internet Protocol (IP) addresses, hostnames, passwords, interfaces and routing (static or dynamic) among other things. While this article cannot contain all of the possible configuration permutations, it will give you the general configuration steps used.
Like this article? We recommend

There are a number of basic things that need to be configured on a Cisco router before it can be used for its primary function—routing. These things include configuring Internet Protocol (IP) addresses, hostnames, passwords, interfaces, and routing (static or dynamic). While this article cannot contain all of the possible configuration permutations, it will provide the general configuration steps used.

Configuration Modes

Before starting the configuration of a Cisco IOS device, it is important that the person configuring the device has at least a general understanding of Cisco IOS configuration modes. Cisco IOS configuration modes are used to give context to the command being entered. For example, commands that are entered inside interface configuration mode are specific to the interface while commands entered in global configuration mode affect the whole Cisco IOS device. The following list shows some of the most commonly used Cisco IOS configuration modes:

  • Global configuration mode (configure terminal at the enable prompt)
  • Interface configuration mode (interface interface inside global configuration mode)
  • Router configuration mode (router protocol inside global configuration mode)
  • Line configuration mode (line line inside global configuration mode)

Global Configuration

There are a number of different commands that can be used that affect the whole Cisco IOS device; these commands are entered in global configuration mode. Examples include configuring the device hostname, domain-name, passwords, and static routing among many others. To configure the device hostname, the hostname hostname command is used; this allows the device to be easily identified when logging in and configuring the device. When a hostname without a domain name is referenced inside a command, the domain name configured with the ip domain name domain-name will be added as a suffix; this command is required for some other commands to complete, for example, to generate an RSA key pair for SSH both the hostname and domain-name must be configured first.

The passwords on a device can become quickly complicated, as there are a number of different passwords that can be configured depending on what is being accessed. In global configuration mode, there are two different commands that can be used to configure the password that is used to access enable mode, these include enable password password and enable secret password. The confusing part is that both of these commands are used to set the password that is used to access enable mode. So which one should be used? The enable password password command is a holdover for backward compatibility and does not provide a secure method of storing the configured password within the configuration. The enable secret password command is preferred and utilizes MD5 to store the password within the device’s configuration.

The most basic method of performing routing on a Cisco device is using static routes; static routes are entered in global configuration mode (unlike dynamic routing protocols that have their own configuration modes). The command used to configure a static route is ip route prefix prefix-mask {destination-ip-address | destination-interface}.

router#configure terminal
router(config)#hostname R1
R1(config)#ip domain name cisco.com
R1(config)#enable secret ciscopass
R1(config)#ip route 192.168.1.0 255.255.255.0 10.10.10.1

Interface Configuration

There are a number of different interface types that can be configured on Cisco routers depending on the requirements of the specific implementation and the device that is being implemented. Two of the most basic commands supported on all interfaces are shutdown/no shutdown and bandwidth; both of these would be entered in interface configuration mode. The shutdown/no shutdown command is used to disable and enable an interface; the shutdown command disables an interface and the no shutdown command is used to enable an interface. The bandwidth command is used to set the bandwidth of an interface; however, this command is commonly misunderstood, because it does not affect the physical bandwidth of an interface but rather is used for informational purposes only for higher level features and protocols. For example, some dynamic routing protocols use this value to calculate the bandwidth portion of their metrics.

Another very basic command that is configured on an interface is the IP address (or addresses). The command that is used to configure an IPv4 address on an interface is ip address address subnet-mask. It is possible to configure more than one IPv4 address on an interface, but the primary address is always used as the source address when sending packets.

router#configure terminal
router(config)#interface fastethernet 0/0
router(config-if)#ip address 192.168.1.1 255.255.255.0
router(config-if)#no shutdown

Line Configuration

There are a number of line types that exist on a Cisco device; the most common ones that are configured on almost all of these are the console line and the vty or terminal line. The console line is used to connect to a device via the console port and interact and configure the device; typically this is done locally via a laptop. The vty or terminal line is used when a device is being managed remotely either via telnet or SSH.

When configuring the console line, two of the most common commands that are used include the password password command to set the console password and the exec-timeout minutes seconds command to configure the amount of time before the console password must be reentered.

The first thing to be mentioned before configuring vty or terminal lines is that all Cisco IOS devices have a number of different total lines; typically on routers this number is five. When configuring the line configuration, the commands will be used to affect all of these lines. There are three commonly used commands used on vty or terminal lines including the password password, exec-timeout minutes seconds and login commands. The password password command is used to set the password that is required for access to the device via the vty or terminal line, the exec-timeout minutes seconds command is used to configure the amount of time before the device disconnects the vty or terminal session and the login command is used to enable password checking on the line.

router#configure terminal
router(config)#line con 0
router(config-line)#password ciscopress
router(config-line)#exec-timeout 5 0
router(config-line)#line vty 0 4
router(config-line)#password ciscopress
router(config-line)#login
router(config-line)#exec-timeout 5 0

Summary

There is certainly a large amount of material that is required to be learned by any Cisco certification candidate; the material contained within this article is some of the most basic. Hopefully this material can be used by those entering the field and in need of a review of these concepts before taking the exam or configuring a device.

  • + Share This
  • 🔖 Save To Your Account