Beginners guide for CISCO router configuration.

Isiwara Kumarage
5 min readJun 19, 2024

--

Router is a fundamental component of any network. They play a critical role in ensuring smooth communication between devices by making the traffic management more effective. Proper configuration makes the data flow more efficient, resulting increased performance and elimination of traffic bottlenecks within a network.

However, routers must be configured carefully. In this post I will discuss the basic router configuration and how you can add static routes in a cisco router.

step 1: Establish a connection to the router using a console cable.

step 2: Use a terminal emulator (Ex: PUTTY) to initiate a session with the router. Remember to set the appropriate parameters (i.e speed, connection type, ….)according to the router type you are about to configure. After setting all the parameters, just click “Open”.

step 3: Now you have established a connection with the router. you can now see the system configuration dialog. you can answer/type “no” and press enter/return, as we are going to configure it manually.

Would you like to enter the initial configuration dialog? [yes/no]: no
Press RETURN to get started!
Router>

The three primary modes of operation for Cisco Routers are: User EXEC Mode (Router >), Privileged EXEC Mode (Router #), Global Configuration Mode (Router(config) # ). As we have not done any configuration in the router we are in the user EXEC mode. So, to configure a router we must enter the global config mode.

step 4: Enter Global Configuration Mode of the router CLI.

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#

step 5: Provide a hostname and secure the router using passwords.

when providing a hostname, rather than giving random names of your own, use a proper methodology (an organization may have their own policies in naming the devices).

Ex: If the router is located at the ground floor, region c, rack 2, router 4.

(G -> rC -> R2 ->R4) → naming in this sequential manner will provide you a meaningful name for the router. It will be easy to identify the router in troubleshooting scenarios.

G-rC-R2-R4, we will use this as the hostname for our router.

Router(config)#hostname G-rC-R2-R4
G-rC-R2-R4(config)#
// you can see the router hostname has changed

Now we can configure the passwords for the router and make it secure.

// you can use both the following commands to set a password for the router

G-rC-R2-R4(config)#enable password nakedpassword
// this method of setting a password will display your password in plain text
// within the running configuration of the router

G-rC-R2-R4(config)#enable secret securepassword
// this method of setting a password will encrypt your password, hence secured.

It will be more clear to you if we execute the “show running-config” command in the privileged EXEC mode.

Then we can secure the router by setting passwords for the console and telnet connections using the following commands.

// setting up console password
G-rC-R2-R4(config)#line console 0
G-rC-R2-R4(config-line)#password consolepassword
G-rC-R2-R4(config-line)#login
G-rC-R2-R4(config-line)#exit

// setting up telnet password
G-rC-R2-R4(config)#line vty 0 4
G-rC-R2-R4(config-line)#password telnetpassword
G-rC-R2-R4(config-line)#login
G-rC-R2-R4(config-line)#exit

// encrypt all passwords
G-rC-R2-R4(config)#service password-encryption

Now the basic configurations of a router are done. Next we will be assigning IP addresses for the router interfaces and add static routes for routing.

step 6: Assigning IP address for the router interfaces.

Before assigning IP addresses we can view the current allocation of the interfaces by executing the following command:

G-rC-R2-R4#show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 unassigned YES unset administratively down down
GigabitEthernet0/1 unassigned YES unset administratively down down
Vlan1 unassigned YES unset administratively down down

so you can see that no IP address is assigned for both the interfaces GigabitEthernet0/0 and GigabitEthernet0/1 . To assign IP address for a respective interface we can use the following commands:

G-rC-R2-R4(config)#interface gigabitEthernet0/0
G-rC-R2-R4(config-if)#ip address 192.168.1.1 255.255.255.0
// syntax: ip address <desired_IP_address> <space> <subnet mask>
G-rC-R2-R4(config-if)#no shutdown // change the interface state to "UP"
G-rC-R2-R4(config-if)#exit

G-rC-R2-R4(config)#interface gigabitEthernet0/1
G-rC-R2-R4(config-if)#ip add 10.0.0.1 255.255.255.252
G-rC-R2-R4(config-if)#no shutdown
G-rC-R2-R4(config-if)#exit

Now, by running the “show ip interface brief” command again, we can verify the configuration we have recently done to the router interfaces.

G-rC-R2-R4#show ip interface brief 
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.1.1 YES manual up down
GigabitEthernet0/1 10.0.0.1 YES manual up down
Vlan1 unassigned YES unset administratively down down

step 7: Adding static routes in the routing table.

we will be adding the static routes for the above scenario, in which the two routers are connected to separate networks, 192.168.1.0/24 and 192.168.2.0/24 as shown in the diagram. The interfaces which will be connecting the two routers belongs to the network 10.0.0.0/30 network.

To add static routes for routing we can use the following command

“ip route <destination_ network> <subnet mask> <next hop address>”

G-rC-R2-R4(config)#ip route 192.168.2.0 255.255.255.0 10.0.0.2

you can now verify the added entries by using “show ip route” command in privileged exec mode.

     10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/30 is directly connected, GigabitEthernet0/1
L 10.0.0.1/32 is directly connected, GigabitEthernet0/1
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0
L 192.168.1.1/32 is directly connected, GigabitEthernet0/0
S 192.168.2.0/24 [1/0] via 10.0.0.2
// entry denoted by the letter 's' shows that the static entry has been added

Remember: you have to add static routes for both the routers for static routing to work.

Router1(config)#ip route 192.168.2.0 255.255.255.0 10.0.0.2
// add the following static route in the router1

If everything is properly configured, including the IP configuration of the PC’s & interfaces of the router1, you can use ping command to check the connectivity. The below diagram shows a successful ping from pc 192.168.1.10 (in the network of router 0–192.168.1.0/24) to pc 192.168.2.10 (in the network of router1–192.168.2.0/24)

--

--

Isiwara Kumarage

Computer Networking Undergraduate @ NSBM Green University.