Professional Documents
Culture Documents
CCNA Day2
CCNA Day2
Cisco IOS
Cisco technology is built around the Cisco
Internetwork Operating System (IOS), which is
the software that controls the routing and
switching functions of internetworking devices.
A solid understanding of the IOS is essential for
a network administrator.
Introduction to Routers
A router is a special type of computer. It has the same basic components as a
standard desktop PC. However, routers are designed to perform some very specific
functions. Just as computers need operating systems to run software applications,
routers need the Internetwork Operating System software (IOS) to run configuration
files. These configuration files contain the instructions and parameters that control
the flow of traffic in and out of the routers. The many parts of a router are shown
below:
Router Memory
Components
ROM
Bootstrap/POST
FLASH Memory-
reload
RAM
NVRAM
- Start up configuration
- Configuration Register
- Contents are kept on reload
ROM
Read-Only Memory
ROM has the following characteristics and
functions:
Mini IOS
6
RAM
Random Access Memory, also called dynamic RAM
(DRAM)
RAM has the following characteristics and functions:
NVRAM
Non-Volatile RAM
NVRAM has the following characteristics and
functions:
Provides storage for the startup configuration
file
Retains content when router is powered down
or
restarted
Configuration Register 16 bit register which
decides boot sequence
8
Flash
Flash memory has the following characteristics
and functions:
Interfaces
Interfaces have the following characteristics and
functions:
Connect router to network for frame entry and
exit
Can be on the motherboard or on a separate
module
Types of interfaces:
Ethernet
Fast Ethernet
Serial
ISDN BRI
Loopback
10
Router Internal
Components
11
Router Power-On/Bootup
Sequence
1.
2.
3.
4.
5.
6.
7.
Boot Sequence
C-File NVRAM
ROMMonit
or
RXBoot
FLASH
Running
Y
N
Setup Mode
Configuration Register
4 2 1 8
RAM
4 2 1 8
4 2 1 8
4 2 1
15 14 13 12 11 10 9 8 7
6 5 4 3
2 1 0
0
0
0
1
0
0
0
1
0
0
1
1
0
1
0
1
ROMMonitor
RxBoot
1
2-15 Flash
13
17
18
Computer/Terminal Console
Connection
19
21
Establishing a
HyperTerminal Session
Take the following steps to connect a terminal to the console port on the
router:
First, connect the terminal using the RJ-45 to RJ-45 rollover cable and an
RJ-45 to DB-9 or RJ-45 to DB-25 adapter.
Then, configure the terminal or PC terminal emulation software for 9600
baud, 8 data bits, no parity, 1 stop bit, and no flow control.
22
23
24
25
26
27
28
Router Modes
29
(or config t)
31
32
In NVRAM
wg_ro_c#show running-config
Building configuration...
wg_ro_c#show startup-config
Using 1359 out of 32762 bytes
!
version 12.0
!
-- More --
Current configuration:
!
version 12.0
!
-- More --
33
Saving Configurations
Configurations in two locations - RAM and NVRAM.
The running configuration is stored in RAM.
Any configuration changes to the router are made to
the running-configuration and take effect immediately
after the command is entered.
The startup-configuration is saved in NVRAM and is
loaded into the router's running-configuration when the
router boots up.
To save the running-configuration to the startup
configuration, type the following from privileged EXEC
mode (i.e. at the "Router#" prompt.)
34
Command Abbreviation
Show Configuration sh conf
Configure Terminal conf t
Line auxillary line aux
Line console line con
35
Configuring a Routers
Name
A router should be given a unique name as one of the
first configuration tasks.
This task is accomplished in global configuration mode
using the following commands:
Router(config)#hostname Gates
Gates(config)#
As soon as the Enter key is pressed, the prompt
changes from the default host name (Router) to the
newly configured host name (which is Gates in the
example above).
36
Setting
the Clock
with Help
37
38
Password
Passwords restrict access to routers.
Passwords should always be configured for virtual
terminal lines and the console line.
Passwords are also used to control access to
privileged EXEC mode so that only authorized users
may make changes to the configuration file.
40
Passwords
There are five passwords for Router
Privileged Mode Password 2
Line Console Password
Auxiliary Port Password
Telnet Password
41
42
Line Password
Gates(config)# line console 0
Gates(config)# password cisco
Gates(config)# login
43
44
45
support
five
VTY
lines
46
Telnet Password
Gates(config)# line vty 0 4
Gates(config)# password cisco
Gates(config)# login
47
Encrypting Passwords
Only the enable secret password is encrypted by
default
Need to manually configure the user-mode and
enable passwords for encryption
To manually encrypt your passwords, use the
service password-encryption command
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#service password-encryption
48
Disable Passwords
Gates(config)# no enable password
Gates(config)# no enable secret
For the Console
Gates(config)# line con 0
Gates(config)# no password
Gates(config)# line vty 0 4
Gates(config)# no password
49
LAB Interface
Configuration
20.0.0.1
10.0.0.1 E0
10.0.0.2
S0
20.0.0.2
S0
30.0.0.2
30.0.0.1
S0
S1
E0 40.0.0.1
40.0.0.2
50
Descriptions
Setting descriptions on an interface is
helpful to the administrator
Only locally significant
R1(config)#int e0
R1(config-if)#description Sales Lan
R1(config-if)#int s0
R1(config-if)#desc Wan to Mumbai
51
Configuring Interfaces
An interface needs an IP Address and a Subnet Mask to be configured.
All interfaces are shutdown by default.
The DCE end of a serial interface needs a clock rate.
R1#config t
R1(config)#int e0
R1(config)#Description Connoted to Host
R1(config-if)#ip address 10.0.0.1 255.0.0.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 0
R1(config-if)#ip address 20.0.0.1 255.255.255.0
R1(config-if)# bandwidth 64
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#exit
R1#
On new routers, Serial 1 would be just Serial 0/1 and e0 would be f0/0.
s = serial
e = Ethernet
f = fast Ethernet
52
DCE DTE
To find out DCE or DTE
#Show controllers s 0
53
Viewing Configuration
To Check the status of interface
#Show IP interface brief
or
#Sh IP int brief
54
55
56
Objectives
Upon completion of this chapter, you will
be able to complete the following tasks:
Distinguish the use and operation of static and
dynamic routes
Configure and verify a static route
Identify how distance vector IP routing protocols
such as RIP and IGRP operate on Cisco routers
Enable Routing Information Protocol (RIP)
Enable Interior Gateway Routing Protocol (IGRP)
Verify IP routing with show and debug commands
57
Routing
The process of transferring data from one local
area network to another
Layer 3 devices
Routed protocol Enables to forward packet from
one router to another Ex IP, IPX
Routing protocol sends and receives routing
information packets to and from other routers
Ex -RIP, OSPF , IGRP
Routing protocols gather and share the routing
information used to maintain and update
routing tables.
That routing information is in turn used to route
a routed protocol to its final destination
58
Routing
From
Raj
House #213, 4th Street
Jayanagar, Bangalore
To
Ram
House #452, 2nd Street
Dadar, Mumbai
59
What is Routing?
10.120.2.0
172.16.1.0
172.16.1.0
S0
Network
Protocol
Connected
Learned
Destination
Network
10.120.2.0
172.16.1.0
Exit
Interface
E0
S0
Routed Protocol: IP
Route Types
Static routing - network administrator configures
information about remote networks manually.
They are used to reduce overhead and for
security.
Dynamic routing - information is learned from
other routers, and routing protocols adjust routes
automatically.
Because of the extra administrative requirements,
static routing does not have the scalability of
dynamic routing.
62
IP Routing Process
10.0.0.1
E0
10.0.0.2
E1
20.0.0.1
20.0.0.2
LAB Interface
Configuration
20.0.0.1
10.0.0.1 E0
10.0.0.2
S0
20.0.0.2
S0
30.0.0.2
30.0.0.1
S0
S1
E0 40.0.0.1
40.0.0.2
65
66
IP Routing
The different types of routing are:
Static routing
Default routing
Dynamic routing
67
Static Routes
Benefits
No overhead on the router CPU
No bandwidth usage between routers
Adds security
Disadvantage
Administrator must really understand the internetwork
If a network is added to the internetwork, the
administrator has to add a route to it on all routers
Not feasible in large networks
68
69
S0
20.0.0.2
S0
30.0.0.2
30.0.0.1
S0
S1
E0 40.0.0.1
R2# config t
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#ip route 40.0.0.0 255.0.0.0 30.0.0.2
10.0.0.2
R1# config t
R1(config)#ip route 30.0.0.0 255.0.0.0 20.0.0.2
R1(config)#ip route 40.0.0.0 255.0.0.0 20.0.0.2
40.0.0.2
R3# config t
R3(config)#ip route 10.0.0.0 255.0.0.0 30.0.0.1
R3(config)#ip route 20.0.0.0 255.0.0.0 30.0.0.1
71
Verifying Static
Route Configuration
After static routes are configured it is important to
verify that they are present in the routing table and
that routing is working as expected.
The command show running-config is used to view
the active configuration in RAM to verify that the static
route was entered correctly.
The show ip route command is used to make sure
that the static route is present in the routing table.
72
Removing IP Route
20.0.0.1
10.0.0.1 E0
S0
20.0.0.2
S0
30.0.0.2
30.0.0.1
S0
S1
E0 40.0.0.1
R2# config t
R2(config)#no ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#no ip route 40.0.0.0 255.0.0.0 30.0.0.2
10.0.0.2
40.0.0.2
R1# config t
R3# config t
R1(config)#no ip route 30.0.0.0 255.0.0.0 20.0.0.2
R3(config)#no ip route 10.0.0.0 255.0.0.0 30.0
R1(config)#no ip route 40.0.0.0 255.0.0.0 20.0.0.2
R3(config)#no ip route 20.0.0.0 255.0.0.0 30.0
73
Default Routes
Can only use default routing on stub networks
Stub networks are those with only one exit path
out of the network
The only routers that are considered to be in a
stub network are R1 and R3
20.0.0.1
10.0.0.1E0
10.0.0.2 A
S0
S0
20.0.0.2
30.0.0.130.0.0.2
S1
S0
E0 40.0.0.1
B 40.0.0.2
74
Default Routes
Stub Network
172.16.1.0
Network
10.0.0.0
SO
A
172.16.2.2
172.16.2.1
BB
76
LAB Configuration
30.0.0.1
20.0.0.1
10.0.0.1 E0
S0
S1
S0
20.0.0.2
10.0.0.2
30.0.0.2
S0
E0
40.0.0.1
40.0.0.2
77
20.0.0.1
10.0.0.1 E0
S0
S1
S0
20.0.0.2
10.0.0.2
30.0.0.2
S0
E0
40.0.0.1
40.0.0.2
R2# config t
R2(config)#ip route 10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#ip route 40.0.0.0 255.0.0.0 30.0.0.2
R1# config t
R1(config)#ip route 0.0.0.0 0.0.0.0
20.0.0.2
R3# config t
R3(config)#ip route 0.0.0.0 0.0.0.0
30.0.0.1
78
What is a Routing
Protocol?
10.120.2.0
E0
Network
Protocol
Connected
RIP
IGRP
172.16.1.0
S0
Destination
Network
10.120.2.0
172.16.2.0
172.17.3.0
Exit
Interface
172.17.3.0
E0
S0
S1
Routed Protocol: IP
Routing protocol: RIP, IGRP
79
Routing Categories
Autonomous System
EGP
Exterior Gateway
Protocols are used
for routing between
Autonomous Systems
AS 1000
AS 3000
IGP
AS 2000
80
Routing Categories
Interior Gateway Protocol
(IGP)
Exterior Gateway
Protocol (EGP)
AS 1000
AS 3000
EGP
EGP
IGP
EGP
AS 2000
Fig. 49 The use of IGP and EGP protocols (TI1332EU02TI_0004 The Network Layer, 67)
81
83
85
86
Distance Vector
Uses Bellman Ford Algorithm
It needs to find out the shortest path from one network to other
How to determine which path is best?
192.168.10.1
192.168.20.1
88
Distance Vector
192.168.20.1
192.168.10.1
There are two Distance Vector Protocol, Both uses different metric
RIP Hops
IGRP - Composite
89
Distance Vector
2
R1
3
0
192.168.10.1
2
1
192.168.20.1
90
Distance Vector
R1
10 1 Mbps
1 Mbps
1 Mbps
10
10
192.168.10.1
56 kbps
192.168.10.1
30
30
192.168.20.1
56 kbps
30
60
91
Routing Loops
92
Inconsistent Routing
Entries
Each node maintains the distance from itself to each possible destination network.
94
Inconsistent Routing
Entries (Cont.)
95
Inconsistent Routing
Entries (Cont.)
Inconsistent Routing
Entries (Cont.)
Count to Infinity
98
Routing Loops
Defining a Maximum
100
101
Split Horizon
It is never useful to send information about a route back in the direction from which the original information
came.
102
Split Horizon
Solution to the Routing Loop problem
Split Horizon is a rule that routing
information cannot be sent back in the
direction from which it was received
Had split horizon been used in our
example, Router B would not have
included information about network
10.4.0.0 in its update to Router C.
103
Route Poisoning
Route Poisoning. Usually used in conjunction with
split horizon
Route poisoning involves explicitly poisoning a
routing table entry for an unreachable network
Once Router C learned that network 10.4.0.0 was
unavailable it would have immediately poisoned
the route to that network by setting its hop count
to the routing protocols infinity value
In the case of RIP, that would mean a hop count
of 16.
104
Triggered Updates
New routing tables are sent to neighboring routers on a regular
basis.
RIP updates occur every 30 seconds
However a triggered update is sent immediately in response to
some change in the routing table.
The router that detects a topology change immediately sends
an update message to adjacent routers that, in turn, generate
triggered updates notifying their adjacent neighbors of the
change.
Triggered updates, used in conjunction with route poisoning,
ensure that all routers know of failed routes.
105
106
Holddowns
Holddowns are a technique used to ensure that a route
recently removed or changed is not reinstated by a routing
table update from another route
Holddown prevents regular update messages from
reinstating a route that is going up and down (called
flapping)
Holddowns prevent routes from changing too rapidly by
allowing time for either the downed route to come back up
Holddowns make a router wait a period of time before
accepting an update for a network whose status or metric
has recently changed
107
108
Pinhole Congestion
1Mbps
1Mbps
192.168.20.1
192.168.10.1
56kbps
56kbps
109
RIP Timers
Route update timer Sets the interval
seconds) between periodic routing updates
(typically
30
110
111
Router Configuration
The router command starts a routing process.
The network command is required because it enables
the routing process to determine which interfaces
participate in the sending and receiving of routing
updates.
An example of a routing configuration is:
Gates(config)#router rip
Gates(config-router)#network 172.16.0.0
The network numbers are based on the network class
addresses, not subnet addresses or individual host
112
RIP Configuration
192.168.20.1
192.168.10.1E0
S0
192.168.30.1
S0
S1
S0
192.168.10.2
R2# config t
R2(config)#router rip
R2(config)#network 192.168.20.0
R2(config)#network 192.168.30.0
R1# config t
R1(config)# )#router rip
R1(config)#network 192.168.10.0
R1(config)#network 192.168.20.0
E0 192.168.40.1
192.168.30.2
192.168.20.2
192.168.40.2
R3# config t
R3(config)# )#router rip
R3(config)#network 192.168.30.0
R3(config)#network 192.168.40.0
113
114
Displaying the
IP Routing Table
115
116
Passive Interface
Passive-interface command prevents RIP update
broadcasts from being sent out a defined interface,
but same interface can still receive RIP updates
R1#config t
R1(config)#router rip
R1(config-router)#network 192.168.10.0
R1(config-router)#passive-interface serial 0
R1# config t
R1(config)# )#router rip
R1(config)#network 192.168.10.0
R1(config)#network 192.168.20.0
R1(config)#version 2
118
E0
192.168.0.16/29
1.
S0
192.168.0.8/30
S1
S0
S0
E0
192.168.0.32/28
119
E0
192.168.0.5
255.255.255.252
192.168.0.9
255.255.255.252
S0
S1
192.168.0.17
255.255.255.248
S0
192.168.0.6
255.255.255.252
S0
192.168.0.10
255.255.255.252
E0
192.168.0.33
255.255.255.240
192.168.0.34
255.255.255.240
192.168.0.18
255.255.255.248
120
E0
192.168.0.16/29
S0
192.168.0.8/30
S0
S1
S0
E0
R2# config t
R2(config)#router rip
R2(config)#network 192.168.0.4
R2(config)#network 192.168.0.8
R2(config)#version 2
R1# config t
R1(config)# )#router rip
R1(config)#network 192.168.0.4
R1(config)#network 192.168.0.16
R1(config)#version 2
192.168.0.32/28
R3# config t
R3(config)# )#router rip
R3(config)#network 192.168.0.8
R3(config)#network 192.168.0.32
R3(config)#version 2
121
Enabling IGRP
122
122
Introducing IGRP
CISCO Proprietary
More scalable than RIP
Sophisticated metric
123
Bandwidth
Delay
Reliability
Load
MTU
124
IGRP
Some of the IGRP key design characteristics emphasize the
following:
It is a distance vector routing protocol.
Routing updates are broadcast every 90 seconds.
Bandwidth, load, delay and reliability are used to create
a composite metric.
The main difference between RIP and IGRP
configuration is that when you configure IGRP, you
supply the autonomous system number. All routers
must use the same number in order to share routing
table information.
125
IGRP Vs RIP
126
Configuring IGRP
128
IGRP Configuration
192.168.20.1
192.168.10.1E0
S0
192.168.30.1
S0
S1
S0
192.168.10.2
R2# config t
R2(config)#router igrp 10
R2(config)#network 192.168.20.0
R2(config)#network 192.168.30.0
R1# config t
R1(config)# )#router igrp 10
R1(config)#network 192.168.10.0
R1(config)#network 192.168.20.0
E0 192.168.40.1
192.168.30.2
192.168.20.2
192.168.40.2
R3# config t
R3(config)# )#router igrp 10
R3(config)#network 192.168.30.0
R3(config)#network 192.168.40.0
129
130
Debug Commands
debug ip igrp events Command
summary of the IGRP routing information that is running
on the network.
131