You are on page 1of 38

Akre Technical College

Dept. of Information Technology


2nd stage

Router (computing)
Mr. Saleem & Mr. Rzgar

Subject: Internet Technology (Pr)


Date: 11/11/2015
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
fb.com/groups/IT.ATC

Router has operating system IOS


Internetworking Operating System and it's extension is
(.bin)

Router types :
1- Fixed port : cannot add Interface
2- Modular : can add interface
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
2
fb.com/groups/IT.ATC

Router internal components: CPU, RAM, FLASH,


.ROM, BUSES, NVRAM, INTERFACES, POWER SUPPLY

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
3
fb.com/groups/IT.ATC

Router external components :


Two Fast Ethernet ports ( connecting to switch and router)
Console port ( connecting to router for configuration , router connector
is RJ-45 and PC connector is DB-9).
Auxiliary port ( connect to FAX modem, router connector is RJ-45 and PC
connector is DB-25
power switch , power connection .
to connect to router from Console port you must have a program
( Hyper terminal ( XP) , SecureCRT ,TeraTerm )

4 01
ID.

IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
5
fb.com/groups/IT.ATC

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
6
fb.com/groups/IT.ATC

: Router internal configuration


RAM: random access memory: temp config
file, ARP cashe, Packet buffering
NVRAM: non volatile RAM: storing backup
copy of config file
Flash: Saving os image (command based)
IOS comprised
ROM: read only memory: Power-On SelfTest (POST), bootstrap program

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
7
fb.com/groups/IT.ATC

: Router startup sequence


Step1 = checking the hardware ---- POST --bootstrap program that check the
functionality of hardware (ROM)
Step2 = Find the ios --- flash, TFTP, ROM
. Step3 = Load it
Step4 = Find the configuration file NVRAM,
TFTP
. Step5 = Load it
Step6 = setup mode ------ creating the config
file
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
8
fb.com/groups/IT.ATC

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
9
fb.com/groups/IT.ATC

Router Modes
setup mode- 1
User execute mode- 2
<Router
Privilege execute mode- 3
# Router
Router>enable // login privilege mode
Global configuration mode- 4
Router(config #)
Router#configuration terminal or config t
Interface configuration- 5
#Router(config-if)
Router(config)#interface fastethernet 0/0
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
10
fb.com/groups/IT.ATC

.Router configuration must be saved into NVRAM


Router configuration is on running config file and to
save it into NVRAM you must copy it to startup-config
file
Copy run start Or Copy running config startupconfig
Some Router show command
Show version
show flash
show interface
Show startup-config or show start
Show history
show ip interface brief
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
11
fb.com/groups/IT.ATC

Change Router Name and setup Router user mode


password
Router>ena
Router#config t
Router(config)#hostname IT Router
ITRouter(config)#enable password 123
------1
ITRouter(config)#^Z
ITRouter#copy run start
To remove ena password
ITRouter(config)#no enable password
#copy run start T Router
ITRouter#config t
ITRouter(config)#enable secret 1234
---------------- 2
ITRouter(config)#copy run start
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
12
fb.com/groups/IT.ATC

Setup Router console password


#IT Router
ITRouter#config t
ITRouter(config)#line console 0
ITRouter(config-line)#password 333
ITRouter(config-line)#login
ITRouter(config-line)#^Z
ITRouter#copy run start
? Destination filename [startup-config]
#IT Router
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
13
fb.com/groups/IT.ATC

Setup Banner
ITRouter#config t
#ITRouter(config)#banner MOTD #IT Router
ITRouter(config)#^Z
IT Router#
ITRouter#copy run start
? Destination filename [startup-config]
#IT Router
Sets the local time on the Router
ITRouter#clock set 20:05:00 11 december
2014
ITRouter#copy run start
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
14
fb.com/groups/IT.ATC

Setup Router Interface IP Address


ITRouter(config)#interface fastethernet 0/0
ITRouter(config-if)#ip address 192.168.1.1 255.255.255.0
ITRouter(config-if)#no shut
ITRouter(config-if)#no shutdown
#ITRouter(config-if)
LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%

ITRouter(config-if)#^Z
#IT Router
ITRouter#copy run start
? Destination filename [startup-config]
#IT Router
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
15
fb.com/groups/IT.ATC

Assigning a Local Host Name to an IP


Address
ITRouter#config t
Enter configuration commands, one per
.line. End with CNTL/Z
ITRouter(config)#ip host Akre 192.168.1.1
ITRouter(config)#^Z
#ITRouter
ITRouter#copy run start
? Destination filename [startup-config]
...Building configuration
[OK]
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
16
fb.com/groups/IT.ATC

Setup telnet password


ITRouter#config t
?ITRouter(config)#line vty 0
Last Line number< 1-15>
<cr>
ITRouter(config)#line vty 0 4
ITRouter(config-line)#password 12345
ITRouter(config-line)#login
ITRouter(config-line)#^Z
#IT Router
SYS-5-CONFIG_I: Configured from console by console %
ITRouter#copy run start
? Destination filename [startup-config]
...Building configuration
[OK]
ITRouter#RT1#
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
17
fb.com/groups/IT.ATC

Encryption all Router password


ITRouter#config t
ITRouter(config)#service passwordencryption
ITRouter(config)#^Z
ITRouter#copy run start
#ITRouter
Router(config)#do show running-config
Executes the privileged-level show
running-config
command while in global configuration
.mode
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
18
fb.com/groups/IT.ATC

Recovering router passwords


The Cisco IOS provides a mechanism to recover
passwords, in case you lost them or you do not
.remember them
You need to have physical access to the router to
.connect to its console port
The key point of the password recovery process is to
boot up the Cisco router ignoring its current startup
configuration, which contains the current passwords.
To boot up the Cisco router ignoring its current
startup configuration you need to change the value in
the configuration register. You can set bit 6 in the
configuration register to instruct the bootstrap
program
to avoid reading the startup configuration from
NVRAM.
By doing this,
you boot up the router
as if it
ID. 01
IT-ATC.blogspot.com
:: fb.com/ATC.Information.Technology
::
19
fb.com/groups/IT.ATC
had no startup configuration as if the router were

Password recovery process


:Follow these steps to recover passwords on a Cisco router

.Change the configuration register to 0x2142 . 1


.Reboot the router. 2
.Upon reboot, exit from setup mode. 3
The router ignores the startup configuration in NVRAM, so it automatically
starts in setup mode. You need to exit setup mode because your
router is already set up. You just want to reset the passwords in the current
.startup configuration, not to reset the whole configuration

.Enable privileged EXEC mode. 4


Load the startup configuration manually from NVRAM to . 5
.RAM
.Enable global configuration mode. 6
.Change the passwords. 7
Save the running configuration over the startup configuration in . 8
.NVRAM
Change the configuration register back to the default value of . 9
.0x2102

.Reboot the router. 10

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
20
fb.com/groups/IT.ATC

The normal router configuration#


register value is 0x2102 and its size is 2
.bytes (16 bits )
The router configuration register value
that let router to ignore its startupconfiguration file is 0x2142
to change router configuration register#
value to 0x2142 you must boot router
from Rommon
by ( ctrl + Break )
Config register calculator application#
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
21
fb.com/groups/IT.ATC

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
22
fb.com/groups/IT.ATC

Rommon 1> ?
Show commands that are using in
Rommon
rommon 2 > confreg 0x2142
rommon 3 > reset
no
Router>ena
Router#copy start run
? Destination filename [running-config]
#ITRouter
ITRouter#config t
ITRouter(config)#no ena
ITRouter(config)#no enable pass
ITRouter(config)#no enable password // to remove enable
password

#ITRouter(config)

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
23
fb.com/groups/IT.ATC

Router(config)#no ena
Router(config)#no enable secret

//to remove enable secret

password

Router(config)#exit
#Router
Router#config t
ITRouter(config)#line console 0
ITRouter(config-line)#no pass
ITRouter(config-line)#no password //to remove console
password

ITRouter(config-line)#exit
ITRouter(config)#line vty 0 4
ITRouter(config-line)#no pass
ITRouter(config-line)#no password /to remove telnet password
ITRouter(config-line)#exit
ID.
01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
24
fb.com/groups/IT.ATC

ITRouter(config)#config-register 0x2102
ITRouter(config)#do copy run start
? Destination filename [startup-config]
ITRouter(config)# exit
Router#reload
There is not any passwords and Enjoy
------------------

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
25
fb.com/groups/IT.ATC

Creating DHCP on Router interface


Router(config)#ip dhcp pool net1
Router(dhcp-config)#network 192.168.1.0
255.255.255.0
Router(dhcp-config)#def
Router(dhcp-config)#default-router
192.168.1.1
Router(dhcp-config)#dns
Router(dhcp-config)#dns-server 192.168.1.10
Router(dhcp-config)#^Z
Router#Router# copy run start
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
26
fb.com/groups/IT.ATC

Define DNS server to Router


Router#config t
Router(config)#ip name
Router(config)#ip name-server 192.168.1.10
Router(config)#^Z
Router#copy run start
[OK]
Router#ping pc1
Akre(config)#ip dhcp excluded-address 192.168.1.1
192.168.1.10
to exlude ip address or dhcp should not asign this range//
to client
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
27
fb.com/groups/IT.ATC

Router interface obtain ip from dhcp server


Router(config)#interface fastethernet 0/1
or Router(config)# int fa 0/1
Router(config-if)#no shut
Router(config-if)#ip
Router(config-if)#ip add
Router(config-if)#ip address dhcp
Router(config-if)#^Z
Router#copy run start
? Destination filename [startup-config]
...Building configuration
[OK]
#Router
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
28
fb.com/groups/IT.ATC

Router IOS or Start file backup and restore


Copy flash tftp // to copy a file from flash to tftp
server
Like ios file, this to backup ios to tftp server
Copy tftp flash // to restore a file from tftp server
Copy start tftp // to copy or backup start file to tftp server
Copy tftp start // to restore start file from tftp server
Akre#delete flash // to delete a file from flash
Delete filename []?c2800nm-advipservicesk9-mz.12415.T1.bin

IOS file name


Akre#erase start // to remove satrt file
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
29
fb.com/groups/IT.ATC

?Router(config-if)#clock rate
Are you meaning in LAB environment?, if so,
you can do it, but if you are meaning on a real
connection then you should set the exact
.clock rate supplied by your ISP

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
30
fb.com/groups/IT.ATC

A network route is a data transmission path


through one or more networks between two
.end nodes
More than one route can exist between two
end nodes. The main purpose of a router is to
find the best route to reach a destination
.node
:network routes types
Static routes
Default routes
Dynamic routes
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
31
fb.com/groups/IT.ATC

Static routes
You define static routes manually on a router.
Static routes are best suited for small
networks, such as LANs, where routes rarely
change. If routes change, you need to update
your routes to reflect the new data
.transmission paths
:Configuring static routes
Router(config)# ip route network-address subnetmask {ip-address | exit-interface }

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
32
fb.com/groups/IT.ATC

Dissecting static route syntax


ip route - Static route command
Network address Destination network
address
Subnet mask - Subnet mask of destination
network
IP address - Serial 0/0/0 interface IP
address on R2, which is the "next-hop" to
this network

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
33
fb.com/groups/IT.ATC

General Role of the Router

Connections of a Router for WAN


-A router has a DB-60 port that can support
5 different cabling standards

Connections of a Router for Ethernet


-2

types of connectors can be used:


Straight through and Cross-over
Straight through used to connect:
-Switch-to-Router, Switch-to-PC, Router-toServer, Hub-to-PC, Hub-to-Server

Cross-over used to connect:


-Switch-to-Switch, PC-to-PC, Switch-to-Hub,
Hub-to-Hub, Router-to-Router

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
34
fb.com/groups/IT.ATC

Examining Router Interfaces


-Show IP router command used to view
routing table
-Show Interfaces command used to show
status of an interface
-Show IP Interface brief command used to
show a portion of the interface information
-Show running-config command used to
show configuration file in RAM

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
35
fb.com/groups/IT.ATC

Interfaces

Configuring an Ethernet interface


By default all serial and Ethernet interfacesare down
To enable an interface use the No Shutdown-

command

Configuring a Serial interface


Enter interface configuration modeEnter in the ip address and subnet maskEnter in the no shutdown command-

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
36
fb.com/groups/IT.ATC

. Physically connecting a WAN InterfaceA WAN Physical Layer connection has:sides


Data Circuit-terminating Equipment (DCE)
This is the service provider. CSU/DSU is a DCE
device.
Data Terminal Equipment (DTE) Typically the
router is the DTE device.

ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
37
fb.com/groups/IT.ATC

Configuring serial links in a lab


environment
One side of a serial connection must be
considered a DCE
This requires placing a clocking signal
use the clock rate command.
Example:
-R1(config)#interface serial 0/0
-R1(config-if)#clockrate 64000

Serial Interfaces require a clock signal to


control the timing of the communications.
ID. 01
IT-ATC.blogspot.com :: fb.com/ATC.Information.Technology ::
38
fb.com/groups/IT.ATC

You might also like