Basic Router Configuration

A router needs to be configured in order to operate within the network. Once it is configured, a network operator has to check the status of various components. There are several methods available for configuring Cisco router. This best method to configure is from command-line interface. In this lesson, you will learn configuration of router using command-line interface. If is very important to understand various prompts that you will find while configuring the router-which helps to know where you are at any time within the configuration mode. In this lesson, you will learn different command prompts that are used while configuring.

The first step in the configuration is assigning the name-name of the router is known as hostname. If the hostname is not set, then the default name will be Router. The next step is assigning passwords. Different passwords are used to secure a router like console, VTY, enable and enable secret password are used to secure privileged mode while the other two are used to configure passwords when the user mode is accessed through console or through Telnet. In this lesson, you will learn the commands used to set the passwords. In addition to this, you will also learn the configuration of router interface which is very important to enable communication with other devices.

Configuring a Router from Command-line Interface (CLI) 

Cisco uses CLI to refer to the terminal user command line interface to the IOS. The term CLI indicates that the user is typing the commands at the terminal. The Cisco IOS command-line interface is organized around the idea of modes. Each mode has a set of commands and some of these commands are only available in that particular mode. In any mode, by typing question mark helps to view list of commands which are available in that mode. For example: By typing Router>?, you can view list of commands in the user mode.

Overview of Router Modes
The first mode in which you can issue commands from the command-line interface is the EXEC mode. From this mode you can use show commands to obtain information about the system. You can also use commands like show version to display the version of the IOS the router is running. To configure router, you have to enter into privileged mode. This can be done by using command enable. When you type command enable and correct password (if password is set), you will enter into privileged mode.

The command-line prompt changes each time the user enters into different modes. When user change the mode from user to privileged mode, the prompt changes as shown below.
Router> enable
To
Router#
From the privileged mode, user can enter into global configuration mode by using configure terminal command. To configure any feature of the router, you must enter configuration mode.
Router#config t
Router(config)#
From global configuration, user have access to specific configuration mode which include following.

Interface
To configure settings for a specific interface such as configuring IP address, use interface configuration mode. To enter interface configuration mode, use interface command and provide name and number of an existing interface for example:
Router(config)# interface Ethernet 0
Router(config-if)#
Sub-interface
Sub-interface Command supports commands that configure multiple virtual interfaces on a single physical interface. The prompt in this mode is as follows
Router(config-subif)#
Line
You can use line command to configure user mode password. The prompt in this mode is as follows:
Router(config)#line console 0
Router(config-line)#
Router
To configure routing protocol such as IGRP and RIP, the prompt (config-router)#
Router#config t
Router(config)#router rip
Router(config-router)#
When you enter exit, the router will come back from one specific configuration mode to global configuration mode. To exit privileged mode and return to user mode use the following commands
Router#disbale
To exit privileged EXEC mode and quit the session with the command-line executive use one of the following commands
Router#logout
Or
Router#exit
Pressing Ctrl+Z key sequence or typing end enables to quit the configuration mode completely and returns to the privileged EXEC prompt.

The commands which affects entire router are called as global commands. For example hostname and enable password are global commands. Major commands are the commands which indicate a process or interface that will be configured. When major commands are entered, it causes CLI to enter specific configuration mode. Major commands have no affect unless it is followed by subcommand. For example: the major command interface serial 0 has no affect unless it is followed by subcommand which indicates what has to be that interface.
The following is the example of major command and subcommand
Router(config-if)#line console 0 ( major command )
Router(config-line)#password cisco ( subcommand )
Notice by entering major command, changes the configuration mode from one to another.

Setting the host name
Naming a router helps to manage network by uniquely identifying each router within the network. The name of the router is considered as the host name and it is displayed at the system prompt. If name is not configured then the default name is Router. The name of the router can be assigned in the global configuration mode which is as shown below.
Router (config) # hostname CCNA
CCNA(config)#

Setting the System Clock
The system clock runs from the moment the system start up and keeps track of the current data and time based on coordinated Universal Time (UTC). To manually set the system clock, use one of the formats of the clock set EXEC command.

Clock set hh:mm:ss day month yyyy
Clock set hh:mm:ss month day yyyy

In the following example, the system clock is manually set to 1:32 p.m. on Nov 12, 2005:
CCNA# clock set 13:32:00 12 Nov 2011

Show system Time
To display the system clock, use the show clock EXEC command. If time has not been set by the clock set command then this command will show the time lapsed since router is up
CCNA#show clock
Setting the Banner
Router can be identified by configuring message-of-the-day banner which will be displayed on all connected terminal. To specify a message-of-the-day (MOTD) banner, use the banner motd global configuration command. When you connect to the router, the MOTD banner appears before the login prompt. When you enter the banner motd command, it has to be followed by one or more spaces and delimiting character. For example:
CCNA(config)#banner motd #
Enter TEXT message. End with the character '#'.

Setting the Description for an Interface
You can also add description to an interface which helps to remember specific information about that interface. To add a description to an interface configuration, use the description interface configuration command. Use the no form of this command to remove the description. This description appears when you display configuration information which is stored in router memory and in a show interface command.
The following example shows how to add a description for a T1 interface:
CCNA(config)#interface Ethernet 0
CCNA(config-if)#description corporate office
The description “corporate office” appears in the output of the following EXEC commands: show startup-config shows interfaces, and shows running-config.

Setting the Line password
You can secure the router by assigning passwords which protects your from unauthorized access. Passwords can be set both on privileged line and to privileged EXEC mode. To specify a password on a line configuration command. Use the no form of this command to remove the password. Remember the first character cannot be a number. The string can contain any alphanumeric characters, including spaces, up to 80 characters.
Example: configuring router’s console password
CCNA(config)#line console 0
CCNA(config-line)#login
CCNA(config-line)#password ccna
In this example, you can see line console 0 command followed by login and password subcommands are used. This establishes login password for console terminal. The main purpose of this is to establish a need for the user to log in to the console before accessing the router. Console 0 is the router’s console connectivity and login asks the user password before connecting to console.
Vty lines password
Virtual terminal lines (Vty) are used to allow remote access to the router (by telneting through its interfaces). To set user mode password for Telnet access into the router, use live Vty command. Cisco IOS will have default five Vty lines, 0 through 4. The best way to know how many lines you have is by using question mark.
CCNA(config-if)#line vty 0?
<1-4> Last Line Number
CCNA(config)#line vty 0 4
CCNA(config-line)#login
CCNA(config-line)#password ccna
Setting privileged Access Password
To set a local password to control access to various privilege levels, use the enable password global configuration command. The encrypted form of enable password known as enable secret password can also be used. Enter enable secret password command with the desired password at the global configuration mode. If both enable password and enable password are configured then enable secret password is used instead of enable password. Use the no form of this command to remove the password requirement.
CCNA(config)#enable password ccna
CCNA(config)#enable secret cisco
Disabling password
CCNA(config-line)#no enable secret cisco
Configuring a Router Interface
Interface configuration is one of the most important router configurations, because without an interface, a router is a totally useless thing. Interface configurations must be exact to enable communication with other devices. Some of the configurations used to configure an interface are Network layer addresses, media type, bandwidth, and other administrator commands. When you get interface type number command at the router (config) # prompt, then you have to enter both interface type and number. The example of interface type and number is as shown below:
CCNA(config)#interface serial 0
CCNA(config)#interface Ethernet 0
Configure the router interface by following the steps given below
Step 1: Enter global configuration mode. Now configuring the interface from the terminal mode is as shown in the command below
Router>enable
Router#config t
Router(config)#
Step 2: configure the IP address on the selected serial interface and active the interface by using no shutdown command. And also provide clock rate to DCE end cable. The command lines of interface serial0 are as shown below:
Router(config)#interface Serial2/0
Router(config-if)#ip address 192.168.1.10 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shutdown
Configure the router Ethernet port by typing interface Ethernet 0 as seen here:
Router(config)#interface FastEthernet4/0
Router(config-if)#ip address 172.10.1.5 255.255.255.0
Router(config-if)#no shutdown
Step 3: For this interface, enter a specified bandwidth. The bandwidth command overrides the default bandwidth and it id used by some protocols for example IGRP. The bandwidth entered will not affect the actual aped of the line. The bandwidth for the router interface can be set by following the command lines as shown below
Router(config-if)# bandwidth 64
Router(config-if)#exit
Router(config) #exit
Router#
Note: Interface is usually attached to the CSU/DSU type of devices that provides clocking for line to the router. If you have back-to-back configuration, data communication equipment end of the cable must provide clocking. By default, Cisco routers are all data terminal equipment (DTE) devices, so you must tell an interface to provide clocking if you need it to act like a DCE device.

Verifying the Configuration
The show commands can be used to verify the configuration of router. The show interfaces command displays the following:
Router#show interfaces
FastEthernet0/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 00e0.f736.21c1 (bia 00e0.f736.21c1)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
FastEthernet1/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 0002.4a1e.46ac (bia 0002.4a1e.46ac)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Serial2/0 is down, line protocol is down (disabled)
Hardware is HD64570
Internet address is 192.168.1.10/24
MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/0/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 96 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=down DSR=down DTR=down RTS=down CTS=down
Serial3/0 is administratively down, line protocol is down (disabled)
Hardware is HD64570
MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/0/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 96 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=down DSR=down DTR=down RTS=down CTS=down
FastEthernet4/0 is down, line protocol is down (disabled)
Hardware is Lance, address is 00e0.a37e.8beb (bia 00e0.a37e.8beb)
Internet address is 172.10.1.5/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
FastEthernet5/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 00d0.976e.dd50 (bia 00d0.976e.dd50)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

The following is sample output from the Show Interfaces FastEthernet command for the FastEthernet 5/0 interface:
Router#show interface FastEthernet5/0
FastEthernet5/0 is administratively down, line protocol is down (disabled)
Hardware is Lance, address is 00d0.976e.dd50 (bia 00d0.976e.dd50)
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
ARP type: ARPA, ARP Timeout 04:00:00,
Last input 00:00:08, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0 (size/max/drops); Total output drops: 0
Queueing strategy: fifo
Output queue :0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

Saving your configuration
If the router is turned off and turned on then you have to start configuration over again. The running configuration will not be saved into any storage media. To save running configuration issue copy running-config startup-config command.
Router#copy running-config startup-config

This help to the configuration into NVRAM. Issue the command show startup-config.
Router#show startup-config.

0 comments:

Post a Comment