Cisco Router
(Model 1841)
Laboratorio Reti di Telecomunicazioni
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
1 / 14
How to access a Cisco router via the console port (1)
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
2 / 14
How to access a Cisco router via the console port (2)
To access a Cisco router from one of the PCs, connect the ( /dev/ttyS0) of the PC ( router (
to establish a remote terminal connection to the router.
routerXX
) via a serial cable. Then, use the
pcXX
) to the
console port
serial port
command
of the Cisco
kermit
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
3 / 14
How to access a Cisco router via the console port (3)
On pcXX open a terminal window and execute the following steps: Start
kermit
by typing
rdclab@pcXX# kermit
This display the prompt:
(/home/rdclab/) C-kermit> Select the ttyS0 serial port by typing: (/home/rdclab/) C-kermit> set line /dev/ttyS0
Disable the carrier detection signal by typing:
(/home/rdclab/) C-kermit> set carrier-watch off
Connect to the router by typing:
(/home/rdclab/) C-kermit> connect
Laboratorio Reti di Telecomunicazioni () Cisco Router 4 / 14
How to access a Cisco router via the console port (4)
If the prompt does not appear, then press the Enter key a few times. If the connection is successful, you are asked for a login and password. Log in as user
root
with password
rdclab:
Username: root Password: rdclab
Now you should see the following prompt (
Privileged EXEC
prompt):
routerXX# You can now
type Cisco IOS commands.
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
5 / 14
Cisco command modes
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
6 / 14
How to switch between Cisco command modes (1)
?
To get (contextual) help type:
To view and change system parameter of a Cisco router, you must be in the
Privileged EXEC
mode:
routerXX#
To modify system wide conguration parameters, you must enter the
Global Configuration
mode by typing:
routerXX# configure terminal which return the following prompt: routerXX(config)#
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
7 / 14
How to switch between Cisco command modes (2)
To make changes to a network interface, you must enter the
Interface Configuration
mode by typing:
routerXX(config)# interface FastEthernet 0/0 which return the following prompt routerXX(config-if)#
The name of the interface is provided as an argument (in the example above FastEthernet 0/0)
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
8 / 14
How to switch between Cisco command modes (3)
To return from the
Interface Configuration mode to the Global Configuration mode or from the Global Configuration mode to the Privileged EXEC mode, use the exit command: routerXX(config-if)# exit routerXX(config)# exit routerXX# The exit command takes you one step up in the command hierarchy. To directly return to the Privileged EXEC mode from any configuration mode, use the command: routerXX(config-if)# end routerXX#
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
9 / 14
How to switch between Cisco command modes (4)
User EXEC
To go from the type
Privileged EXEC
mode to the
mode,
routerXX# disable routerXX>
To Terminate the console session type:
from the
User EXEC mode
routerXX> logout
form the Privileged EXEC mode
routerXX# logout (or exit)
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
10 / 14
How to congure IP interfaces on a Cisco router
Privileged EXEC
From the
mode type:
Router1# configure terminal Router1(config)# no ip routing Router1(config)# ip routing Router1(config)# interface FastEthernet 0/0 Router1(config-if)# ip address <ip_address> <netmask> Router1(config-if)# no shutdown Router1(config-if)# interface FastEthernet 0/1 Router1(config-if)# ip address <ip_address> <netmask> Router1(config-if)# no shutdown Router1(config-if)# end
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
11 / 14
How to set static routing table entries (1)
ip routing
Enable ip routing no ip routing Disable ip routing show ip route Display the contents of the routing table show ip cache Display the routing cache ip route-cache Enables route caching (Default is enabled) no ip route cache Disable route caching
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
12 / 14
How to set static routing table entries (2)
ip route <destination> <netmask> <gw_address> Adds a static route ip route <destination> <netmask> <interface> Adds a static route no ip route <destination> <netmask> <gw_address> Deletes a static route no ip route <destination> <netmask> <interface> Deletes a static route To set a default gateway you must use the command
ip route [Link] [Link] <gw_address>
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
13 / 14
Cisco IOS Reference
[Link] command/reference/fun_r.html
Laboratorio Reti di Telecomunicazioni ()
Cisco Router
14 / 14