Introduction to Dynamic
Routin
g
Protocol
g
Routing Protocols and Concepts – Chapter 3
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1
1
Objectives
D
esc
ri
be
th
e
r
o
l
e
o
f
dy
n
a
mi
c
r
ou
tin
g
p
r
o
t
oco
l
s
a
n
d
escbe eoeodya cou gpoocosad
place these protocols in the context of modern
network design.
Identify several ways to classify routing protocols.
Describe how metrics are used by routing protocols
Describe
how
metrics
are
used
by
routing
protocols
and identify the metric types used by dynamic routing
protocols.
Determine the administrative distance of a route and
describe its importance in the routing process.
Identify the different elements of the routing table.
ITE PC v4.0
Chapter 1
2
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dynamic Routing Protocols
D
y
n
a
mi
c
r
ou
tin
g
p
r
o
t
oco
l
s
a
r
e
usua
ll
y
y a c ou g p o oco s a e usua y
used in larger networks to ease the
administrative and operational overhead
fi ltti t
o
f
us
i
ng on
l
y s
t
a
ti
c rou
t
es.
Typically, a network uses a combination
f b th d i ti t l d
o
f
b
o
th
a
d
ynam
i
c rou
ti
ng pro
t
oco
l
an
d
static routes.
ITE PC v4.0
Chapter 1
3
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
The Evolution of Dynamic Routing Protocols
One of the earliest routing protocols was Routing Information Protocol (RIP).
RIP h l d i t i RIP 2 H
–
RIP
h
as evo
l
ve
d
i
n
t
o a newer vers
i
on
RIP
v
2
.
H
owever,
–The newer version of RIP still does not scale to larger network implementations.
To address the needs of larger networks, two advanced routing protocols were
developed: Open Shortest Path First (OSPF) and Intermediate System-to-
It dit S t (IS
IS)
I
n
t
erme
di
a
t
e
S
ys
t
em
(IS
-
IS)
.
Cisco developed Interior Gateway Routing Protocol (IGRP) and Enhanced IGRP
(EIGRP), which also scales well in larger network implementations.
Additionally there was the need to interconnect different internetworks and provide
Additionally
,
there
was
the
need
to
interconnect
different
internetworks
and
provide
routing among them. Border Gateway Routing (BGP) protocol is now used between
ISPs as well as between ISPs and their larger private clients to exchange routing
information.
With the advent of numerous consumer devices using IP the IPv4 addressing space
With
the
advent
of
numerous
consumer
devices
using
IP
,
the
IPv4
addressing
space
is nearly exhausted. Thus IPv6 has emerged. To support the communication based
on IPv6, newer versions of the IP routing protocols have been developed (see the
IPv6 row in the table).
ITE PC v4.0
Chapter 1
4
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dynamic Routing Protocols
Function(s) of Dynamic Routing Protocols:
-Dynamically share information between routers.
-Automatically update routing table when topology changes.
-
Determine best path to a destination
Determine
best
path
to
a
destination
.
–Compared to static routing, dynamic routing protocols require less administrative
overhead.
•
However, the expense of using dynamic routing protocols is dedicating part of a router
'
s
However,
the
expense
of
using
dynamic
routing
protocols
is
dedicating
part
of
a
router s
resources for protocol operation including CPU time and network link bandwidth.
– One of the primary benefits to using a dynamic routing protocol is that routers
exchange routing information whenever there is a topology change. This exchange
ll t t t ti ll l b t t k d l t fi d lt t
a
ll
ows rou
t
ers
t
o au
t
oma
ti
ca
ll
y
l
earn a
b
ou
t
new ne
t
wor
k
s an
d
a
l
so
t
o
fi
n
d
a
lt
erna
t
e
paths when there is a link failure to a current network.
ITE PC v4.0
Chapter 1
5
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dynamic Routing Protocols
D
esp
it
e
th
e
be
n
e
fit
s
o
f
dy
n
a
mi
c
r
ou
tin
g,
s
t
a
ti
c
r
ou
tin
g
s
till
esp e e be e s o dy a c ou g, s a c ou g s
has its place.
There are times when static routing is more appropriate and
There
are
times
when
static
routing
is
more
appropriate
and
other times when dynamic routing is the better choice.
More often than not you will find a combination of both
More
often
than
not
,
you
will
find
a
combination
of
both
types of routing in any network that has a moderate level of
complexity.
ITE PC v4.0
Chapter 1
6
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dynamic Routing Protocols
A routin
g
p
rotocol
gp
–is a set of processes, algorithms, and messages that are used to
exchange routing information and populate the routing table with the
routin
g
p
rotocol's choice of best
p
aths
gp p
The purpose of a dynamic routing protocol is to:
-Discover remote networks
-Maintaining up-to-date routing information
-Choosing the best path to destination networks
Abilit t
fi d b t th
if th t th i l il bl
-
Abilit
y
t
o
fi
n
d
a new
b
es
t
pa
th
if
th
e curren
t
pa
th
i
s no
l
onger ava
il
a
bl
e
ITE PC v4.0
Chapter 1
7
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dynamic Routing Protocols
Dynamic
Routing
Protocols
Components of a routing protocol
–
Data structures
Data
structures
•Some routing protocols use tables and/or databases for its operations.
This information is kept in RAM
Al ith
–
Al
gor
ith
m
•Algorithm is a finite list of steps used in accomplishing a task
•
Algorithms are used for facilitating routing information and best path
Algorithms
are
used
for
facilitating
routing
information
and
best
path
determination
–Routing protocol messages
Th f
di i i hb
d
hf
•
Th
ese are messages
f
or
di
scover
i
ng ne
i
g
hb
ors an
d
exc
h
ange o
f
routing information , and other tasks to learn and maintain accurate
information about the network.
ITE PC v4.0
Chapter 1
8
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dynamic Routing Protocol Operation
Dynamic
Routing
Protocol
Operation
All routing protocols have the same purpose - to learn about remote networks
and to quickly adapt whenever there is a change in the topology.
The method that a routing protocol uses to accomplish this depends upon the
algorithm it uses and the operational characteristics of that protocol.
In general the operations of a dynamic routing protocol can be described as
In
general
,
the
operations
of
a
dynamic
routing
protocol
can
be
described
as
follows:
–The router sends and receives routing messages on its interfaces.
–
The router shares routing messages and routing information with other routers that
are using the same routing protocol.
–Routers exchange routing information to learn about remote networks.
–
When a router detects a topology change the routing protocol can advertise this
change to other routers.
ITE PC v4.0
Chapter 1
9
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Dynamic Routing Protocols
Advantages of static routing
It b k lti l
Advantages of dynamic routing
-
It
can
b
ac
k
up mu
lti
p
l
e
interfaces/networks on a router
-Minimal CPU processing
Easier for administrator to
-Administrator has less work
maintaining the configuration when
adding or deleting networks.
-
Easier
for
administrator
to
understand
-Easy to configure
-
No extra resources are needed
-Protocols automatically react to the
topology changes.
-Confi
g
uration is less erro
r
-prone.
No
extra
resources
are
needed
-More secure
Disadvantages of static routing
g
-More scalable, growing the network
usually does not present a problem
Disadvantages
of
dynamic routing
-Network changes require manual
reconfiguration
-Configuration and maintenance is
time
-
consuming
Disadvantages
of
dynamic
routing
-Router resources are used (CPU
cycles, memory and link bandwidth).
time
consuming
-Does not scale well in large
topologies
-Confi
g
uration is erro
r
-
p
rone
,
-More administrator knowledge is
required for configuration,
verification, and troubleshooting.
ITE PC v4.0
Chapter 1
10
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
g
p,
especially in large networks
Dynamic Routing Protocols
ITE PC v4.0
Chapter 1
11
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classifying Routing Protocols
D
y
namic routin
g
p
rotocols are
g
rou
p
ed accordin
g
to
ygp
gp g
characteristics. Examples include:
-RIP
IGRP
-
IGRP
-EIGRP
OSPF
-
OSPF
-IS-IS
-
BGP
BGP
Autonomous System is a group of routers under the control of
a sin
g
le authorit
y
.
ITE PC v4.0
Chapter 1
12
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
gy
Classifying Routing Protocols
Dynamic routing protocols:
–RIP
•A distance vector interior routing protocol
–
IGRP
•The distance vector interior routing
developed by Cisco (deprecated from 12.2
IOS and later)
–
EIGRP
•The advanced distance vector interior
routing protocol developed by Cisco
OSPF
–
OSPF
•A link-state interior routing protocol
–IS-IS
•A link-state interior routing protocol
–BGP
•
A
p
ath vector exterior routin
g
p
rotocol
ITE PC v4.0
Chapter 1
13
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
pgp
Classifying Routing Protocols
Classifying
Routing
Protocols
An autonomous system (AS) - otherwise known as a
routing domain - is a collection of routers under a
common administration
.
common
administration
.
Because the Internet is based on the ASs concept, two
types of routing protocols are required: interior and
exterior routing protocols.
Interior Gateway Protocols
(IGP)
-
Interior
Gateway
Protocols
(IGP)
•are used for intra-autonomous system routing - routing
inside an autonomous system
•IGPs are used for routing within a routing domain, those
networks within the control of a sin
g
le or
g
anization.
gg
–An autonomous system is commonly comprised of many
individual networks belonging to companies, schools, and
other institutions.
• IGPs for IP include RIP, IGRP, EIGRP, OSPF, and IS-IS
Exterior Gateway Protocols
(EGP)
-
Exterior
Gateway
Protocols
(EGP)
•are used for inter-autonomous system routing - routing
between autonomous systems that are under the control
of different administrations
•
At the ISP level, there are often more important issues
At
the
ISP
level,
there
are
often
more
important
issues
than just choosing the fastest path.
•BGP is typically used between ISPs and sometimes
between a company and an ISP
ITE PC v4.0
Chapter 1
14
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
At t
A
u
t
onomous sys
t
ems
An autonomous system (AS) is a collection of
networks under a common administration
networks
under
a
common
administration
sharing a common routing strategy.
To the outside world, an AS is viewed as a single
entity. The AS may be run by one or more
operators while presenting a consistent view of
routing to the external world.
The American Registry of Internet Numbers
(ARIN), a service provider, or an administrator
assi
g
ns an identif
y
in
g
number to each AS. This
gyg
autonomous system number is a 16 bit number.
Routing protocols, such as Cisco’s IGRP,
require assignment of a unique, autonomous
system number.
American Registry for Internet Numbers
/>A t S t b (ASN) id
ITE PC v4.0
Chapter 1
15
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
A
u
t
onomous
S
ys
t
em num
b
er
(ASN)
resource gu
id
e
/>IS-IS
Autonomous systems
Autonomous
systems
Cisco system AS number:
/>ITE PC v4.0
Chapter 1
16
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Autonomous systems
Autonomous
systems
/>RFC 1930
AS just like IP, it needs
to apply from ARIN or
the appropriate region
and be unique on the
it t
i
n
t
erne
t
.
The Internet Assigned
Numbers Authority
(IANA) has reserved the
following block of AS
numbers for private use
(not to be advertised on
the global Internet):
64512 through 65535
ITE PC v4.0
Chapter 1
17
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classifying Routing Protocols
Classifying
Routing
Protocols
IGP: Comparison of Distance Vector & Link
State Routing Protocols
Distance vector
– routes are advertised as vectors of distance &
direction.
•Distance is defined in terms of a metric such as hop
count (RIP)
•Direction is simply the next-hop router or exit
interface
interface
•Distance vector protocols typically use the Bellman-
Ford algorithm for the best path route determination
–
incomplete view of network topology
incomplete
view
of
network
topology
.
•Distance vector protocols use routers as sign posts
along the path to the final destination.
•Distance vector routin
g
p
rotocols do not have an
gp
actual map of the network topology
– Generally, periodic updates.
•Some distance vector protocols periodically send
ITE PC v4.0
Chapter 1
18
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
complete routing tables to all connected neighbors.
Classifying Routing Protocols
Classifying
Routing
Protocols
IGP: Comparison of Distance Vector &
Link State
Routing Protocols
Link
State
Routing
Protocols
Link state
–
com
p
lete view of network to
p
olo
gy
is created.
ppgy
•The sign posts along the way from source to
destination are not necessary, because all link-
state routers are using an identical
"
map
"
of the
state
routers
are
using
an
identical
map
of
the
network.
– updates are not periodic.
•After the network has converged, a link-state
update only sent when there is a change in the
topology.
ITE PC v4.0
Chapter 1
19
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classifying Routing Protocols
Classifying
Routing
Protocols
Comparison of Distance Vector & Link State Routing Protocols
Di t t t l k
Di
s
t
ance vec
t
or pro
t
oco
l
s wor
k
best in situations where:
–
The network is sim
p
le and flat
Link-state protocols work best in
situations where:
–
The network desi
g
n is hierarchical
,
p
and does not require a special
hierarchical design.
–
The administrators do not have
g,
usually occurring in large networks.
–The administrators have a good
knowledge of the implemented link
-
enough knowledge to configure
and troubleshoot link-state
protocols.
knowledge
of
the
implemented
link
state routing protocol.
–Fast convergence of the network is
crucial
–Specific types of networks, such
as hub-and-spoke networks, are
being implemented.
crucial
.
–Worst-case convergence times
in a network are not a concern.
ITE PC v4.0
Chapter 1
20
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Classifying Routing Protocols
Classful routing protocols
–
Do NOT send
subnet mask in routing updates
Do
NOT
send
subnet
mask
in
routing
updates
,
–Do NOT support VLSM,
–Classful routing protocols cannot be used when
a network is subnetted usin
g
more than one
g
subnet mask,
• Tony: This does not mean you can not
subnet the clasasfull network. You can still
subnet it but can only do it once and all
subnet
it
,
but
can
only
do
it
once
and
all
network needs to have the identical mask.
–Routing protocols such as RIPv1 and IGRP.
Classless routin
g
p
rotocols
gp
–Do send subnet mask in routing updates.
–support variable length subnet masks (VLSM).
•In the fi
g
ure
,
the classless version of the network is
g,
using both /30 and /27 masks in the same topology.
•Tony: It means you can create the network
with all different sizes of subnets. They don’t
need to have the same mask.
ITE PC v4.0
Chapter 1
21
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
need
to
have
the
same
mask.
•Classless routing protocols are RIPv2, EIGRP,
OSPF, IS-IS, BGP.
Classifying Routing Protocols
Co
nv
e
r
ge
n
ce
i
s
de
fin
ed
as
wh
e
n
a
ll r
ou
t
e
r
s
’ r
ou
tin
g
Co e ge ce
sdeedas eaouesoug
tables are at a state of consistency
– The network has converged when all routers have complete and
f
accurate in
f
ormation about the network
Convergence time is the time it takes routers to share
i f ti l l t b t th d d t th i ti
i
n
f
orma
ti
on, ca
l
cu
l
a
t
e
b
es
t
pa
th
s, an
d
up
d
a
t
e
th
e
i
r rou
ti
ng
tables.
Rti t l b tdb d
R
ou
ti
ng pro
t
oco
l
s can
b
e ra
t
e
d
b
ase
d
on
the speed to convergence; the faster the
convergence, the better the routing
tl
pro
t
oco
l
.
–RIP and IGRP are slow to converge
–
EIGRP and OSPF are faster to converge.
ITE PC v4.0
Chapter 1
22
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
EIGRP
and
OSPF
are
faster
to
converge.
Routing Protocols Metrics
To select the best path, the routing
lbbl l d
protoco
l
must
b
e a
bl
e to eva
l
uate an
d
differentiate between the available paths.
For this purpose a metric is used.
Metric
–A value used by a routing protocol to
determine which routes are better than others.
Each routing protocol uses its own metric.
–RIP uses hop count,
•
The hop count refers to the number of routers
The
hop
count
refers
to
the
number
of
routers
a packet must cross to reach the destination
network.
•For R3 in the figure, network 172.16.3.0 is two
hops or two routers away
hops
,
or
two
routers
away
.
–EIGRP uses a combination of bandwidth and
delay,
–
OSPF
uses
bandwidth (cost)
.
ITE PC v4.0
Chapter 1
23
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
OSPF
uses
bandwidth
(cost)
.
Routing Protocols Metrics
Metrics used in IP routing protocols
–
Bandwidth
•Influences path selection by preferring the path
with the highest bandwidth
–
Cost
Cost
•A value determined either by the IOS or by the
network administrator to indicate preference for a
route. Cost can represent a metric, a combination
of metrics or a
p
olic
y
.
RIP
OSPF
py
–Delay
•Considers the time a packet takes to traverse a
path
Hop count
RIP
–
Hop
count
•A simple metric that counts the number of routers
a packet must traverse
–
Load
•Considers the traffic utilization of a certain link
–Reliability
•Assesses the probability of a link failure,
calculated from the interface error count or
ITE PC v4.0
Chapter 1
24
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
calculated
from
the
interface
error
count
or
previous link failures
Routing Protocols Metrics
Routing
Protocols
Metrics
The Metric Field in the Routing Table
Metric used for each routing protocol
-RIP - hop count
-IGRP & EIGRP - Bandwidth (used by
default), Delay (used by default), Load,
Reliability
Reliability
-IS-IS & OSPF – Cost, Bandwidth
(Cisco’s implementation)
Refer to the example in the figure The
Refer
to
the
example
in
the
figure
The
routers are using the RIP routing
protocol.
–The metric associated with a certain
tbbtidith
rou
t
e can
b
e
b
es
t
v
i
ewe
d
us
i
ng
th
e
show ip route command.
–The metric value is the second value in
the brackets for a routing table entry.
–In the figure, R2 has a route to the
192.168.8.0/24 network that is 2 hops
away.
•
R 192 168 8 0/24 [120/2] via
ITE PC v4.0
Chapter 1
25
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
R
192
.
168
.
8
.
0/24
[120/2]
via
192.168.4.1, 00:00:26, Serial0/0/1