Basic setup of a Router

In this part, you will set a basic configuration for the router following these points:

  • Setup a hostname for the Router (Let it be "R1")

  • Setup a password for the Priviliged mode (Let it be "123")

  • Apply password encryption to secure stored passwords

  • Configure the console access (Login : yes, Password : "456", History : 10 commands, Timeout : 2 minutes 45 seconds)

Setup a new hostname for the Router :

First open the Terminal by Click on Laptop1 → Desktop → Terminal → OK

In order to change the hostname of the Router it is necessary to enter the "Global Configuration mode" passing by the "User Exec mode" and the "Privilaged Exec mode".

To go from the "User mode" to the "Privilaged mode" excute the "enable" command, then excute the "configure terminal" command to go from the "Privilaged mode" to the "Config mode".

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

The "(config)#" means that you entred the Global Configuration mode.

Now use the "hostname" command followed by the new hostname "R1"

1
Router(config)# hostname R1
2
R1(config)#

Notice that the hostname changed from "Router" to "R1"

Setup a password for the Privileged mode :

To set a password for accessing privileged exec mode (also known as enable mode) you should use the "enable secret" command followed by the password.

1
R1(config)#enable secret 123

Apply password encryption :

It is important to apply password encryption to ensure that stored passwords are not exposed to unauthorized parties. This can be easly activated by using the "service password-encryption" command.

1
R1(config)#service password-encryption

Configure the console access :

To configure the console access you need to enter the "Line mode" through the "Global Configuration mode" using the command "line console" followed by the port number (in our case it is 0)

1
R1(config)#line console
2
R1(config-line)#

The "(config-line)#" indicates that you entred the Line mode.

Now setup a password for this port by typing the "password" command followed by the password (in this case 456)

1
R1(config-line)#password 456

Activating the login option by typing the "login" command is necessary. If this option is not activated, the user will not be able to access the router system.

1
R1(config-line)#login

Setting a timer for the user to log-out will ensure better security for our system. This can be done by executing the "exec-timeout" command followed by the amount of time (in this case 2min 45sec).

1
R1(config-line)#exec-timeout 2 45

It is also possible to controle how much hestory commands can be kept in the memory.

1
R1(config-line)#hestory size 10
2
R1(config-line)#end
3
R1#

Save the congurartion :

Now let's save the configuration by typing the "copy running-config startup-config" command. You will receive a request of confirmation, by clicking "Enter" the saving will start.

1
R1#copy running-config startup-config
2
Destination filename [startup-config]?
3
Building configuration...
4
[OK]
5
R1#