How to Set Up a Cisco Router

How to Set Up a Cisco Router


#Set #Cisco #Router

The purpose of this article is to explain how to configure a Cisco router, as well as presenting the basic commands for its use. To understand the procedures in this article, you need to know about the function of a router and the routing protocols. The explanation uses a scheme of two computers – each representing a network. The tests were performed with the Packet Tracker.

  • How to Implement a Cisco Router

    • Required hardware

    • Basic assembly drawing

    • How to configure the computers IP

  • Network cabling, use of console cable

  • Router configuration with IOS commands

    • What is IOS

    • Different modes of operation of the router

    • How to put password in privileged mode

    • Configure the router’s Ethernet interfaces

    • Configure Telnet access on the router

  • Summary of basic IOS commands

    • Switching between user modes

    • Information commands

    • Interface commands

    • Commands for recording the current configuration

    • Cancel command

    • Canceling a command

    • How to change the router name

    • How to put password for the privileged user

How to Implement a Cisco Router

Required hardware

You will need a router Cisco, two computers (representing the networks) and the console cable, which is provided with the router.

Basic assembly drawing


How to configure the computers IP

Computer 1:

  • IP address / mask: 192.168.1.254/24.
  • Gateway: IP address of the router interface to which the PC is connected.

Computer 2:

  • IP address / mask: 10.0.0.254/8.
  • Gateway: IP address of the router interface to which the PC is connected.

Network cabling, use of console cable

The two networks are now connected to the router. However, you will find that they are not communicating. Start by connecting the console cable (blue cable) between the router and the computer to be used for configuration. Initially, we will use Microsoft’s HyperTerminal to perform the necessary operations. You can also use PuTTY.

Router configuration with IOS commands

What is IOS

IOS means Internetwork Operating System (Operating System for Network Interconnection, in Portuguese). This system is administered on command lines specific to Cisco Systems equipment.

Different modes of operation of the router

User: view all information related to the router without being able to change it. The shell is

Router

;

Privileged user: view the status of the router and import / export images from IOS. The shell is

Router #

;

Global configuration: use the router’s general configuration commands. The shell is

Router (config) #

;

Interface configuration: use the interface configuration commands (IP addresses, masks, etc.). The shell is

Router (config-if) #

;

Line configuration: configure a line (access to the router via Telnet) online. The shell is

Router (config-line) #

;

Special: maintenance mode that can be used mainly to reset the router’s passwords. The shell is

rommon>

.

How to put password in privileged mode

First of all, you need to connect in privileged way and then move on to the global configuration mode to perform the following manipulation:

Router> enable
Router # configure terminal
Router (config) # 

When in global configuration mode, just enter a single command to apply a password:

Router (config) # enable password

. Now, when a user tries to connect in privileged user mode, the password will be requested.

It is recommended to save the configuration regularly using the command (in privileged mode)

copy running-config startup-config

.

Configure the router’s Ethernet interfaces

Now, we will have to make the two networks connected to the router communicate. Let’s say the name of the interface connected to PC1 is fa0 / 0 and that of the interface connected to PC2, Fa0 / 1. Let’s also assume that we are in global configuration mode. See the commands to be entered.

Fa0 / 0 interface:

Router (config) # interface fa0/0
Router (config-if) # ip address 192.168.1.1 255.255.255.0
Router (config-if) # no shutdown
Router (config-if) # exit

Fa0 / 1 interface:

Router (config) # interface fa0/1
Router (config-if) # ip address 10.0.0.1 255.0.0.0
Router (config-if) no shutdown
Router (config-if) exit

The configuration of the interfaces is ready. Your two networks should be able to communicate now. Try pinging a PC from a network to another PC. Always remember to save your current configuration using the command provided for this.

Configure Telnet access on the router

Configuration with the console cable and HyperTerminal is not very practical. You have the option to authorize administrators to connect to the router through a Telnet session from any computer on the two networks.

First, switch to global configuration mode and then to VTY line configuration mode:

Router>enable
Password?:
Router # configure terminal
Router (config) # line vty 0 4

Configure the possibility of five simultaneous Telnet sessions on this router. We now arrive at the line configuration prompt. To activate Telnet, you only need to apply a password to the line:

Router (config-line) # senha
Router (config-line) # login
Router (config-line) # exit

Note: You must have already set a password and enabled authentication on the VTY lines, before connecting via a Telnet session. If not, the router will refuse the connection.

Save your configuration. This ends the basic configuration of the router. Next, check out a summary of the various commands used so far and others that you can use at other times.

Summary of basic IOS commands

Note: if several commands are given, one under the other, this means that they all have the same function and that they can all be used interchangeably.

Switching between user modes

Normal user: no command to be done, this is how a session starts;

Privileged user (carried out in normal mode):

Router > enable
Router > en

Global configuration mode (done in privileged mode):

Router # configure terminal
Router # conf t

Interface configuration mode (done in global configuration mode):

Router (config) # interface nome_da_interface
Router (config) # int nome_da_interface

Line configuration mode (done in global configuration mode):

Router (config) # line nome_da_linha

Information commands

The information commands show information about the router. They all start with the prefix show or sh. In most cases, they must be executed in the privileged way:

Show the running configuration file of the router:

show running-config
show run
sh run

Shows the material configuration information system and IOS:

show version
sh version

Shows the running processes:

show processes

Shows the configured protocols layer 3 of the OSI model:

show protocols

Shows the memory statistics of the router:

show memory

Shows the information and statistics of an interface:

show interfaces nome_da_interface
sh interfaces nome_da_interface
sh int nome_da_interface

Show the IP routing table:

sh ip route

.

Interface commands

These commands are related to the configuration of interfaces the router. They must be carried out mainly in interface configuration mode.

Assignment of IP adress to an interface:

ip address @IP máscara

Interface activation:

no shutdown

Commands for recording the current configuration

These commands allow save the current configuration to automatically reapply it in case the router reboots. They are executed in privileged mode.

Backup on request confirmation:

copy running-config startup-config
copy run start

Backup without order confirmation:

write

Cancel command

With this command you can return to the last saved setting, undoing all changes made so far. The following command must be run in privileged user mode:

copy startup-config running-config
copy start run

Canceling a command

To cancel a particular command, use the prefix at the before the command previously executed. For example, cancel the configuration of an interface:

<underline>no</underline> ip address

.

How to change the router name

The router name can be modified to allow it to be differentiated on networks. The command will be executed in global configuration mode:

host NovoNome

Specifically, a different name will appear at the command prompt for HyperTerminal or Telnet sessions.

How to put password for the privileged user

These commands must be carried out in global configuration.

Normal attribution:

enable password <underline>senha</underline>

Encrypted assignment:

enable secret <underline>senha</underline>

Photo: © timofeev – 123RF.com

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *