Tải bản đầy đủ (.pdf) (45 trang)

Routing Protocols and Concepts – Chapter 8 pptx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.45 MB, 45 trang )

The Routing Table: A
Closer Look
Routing Protocols and Concepts – Chapter 8
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
ITE PC v4.0
Chapter 1
1
Objectives
 D
esc
ri
be
th
e
v
a
ri
ous
r
ou
t
e
t
ypes
f
ou
n
d
in th
e
r


ou
tin
g

esc be e a ous ou e ypes ou d e ou g
table structure

Describe the routing table lookup process.
Describe

the

routing

table

lookup

process.
 Describe routing behavior in routed networks.
ITE PC v4.0
Chapter 1
2
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Introduction
 Chapter Focus

Structure of the routing table
Structure


of

the

routing

table
•Will examine the format of the routing table and learn about
level 1 and level 2 routes.
– Lookup process of the routing table
– Classless and classful routing behaviors
Cisco IP Routing by Alex Zinin (ISBN 0
-
201
-
60473
-
6)
Cisco

IP

Routing
,
by

Alex

Zinin


(ISBN

0
201
60473
6)
.
ITE PC v4.0
Chapter 1
3
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure
Routing

Table

Structure
 Lab Topology
 3 router setup
-R1 and R2 share a common 172.16.0.0/16 network with
172 16 2 0/24 subnets
172
.
16
.
2
.
0/24

subnets

.
-R2 and R3 are connected by the 192.168.1.0/24 network.
-
R3 also has a 172 16 4 0/24 subnet which is disconnected or
R3

also

has

a

172
.
16
.
4
.
0/24

subnet
,
which

is

disconnected
,
or


discontiguous, from the 172.16.0.0 network that R1 and R2
share.
ITE PC v4.0
Chapter 1
4
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
In a later section, we will configure
the interfaces for R2
Routing Table Structure

The figure shows routing table entries come from the

The

figure

shows

routing

table

entries

come

from

the


following sources
-
Directly connected networks
-
Directly

connected

networks
-Static routes
Dynamic routing protocols
-
Dynamic

routing

protocols
ITE PC v4.0
Chapter 1
5
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure
Routing

Table

Structure
 The figure shows what happens as the Serial 0/0/1 interface for R2 is
configured with the 192.168.1.1/24 address.
– R1 and R3 already have their interfaces configured with the appropriate

IP addresses and subnet masks.
–We will now configure the interfaces for R2 and use debug ip routing to
view the routing table process that is used to add these entries.
 As soon as the “no shutdown” command is issued the route is added
to routin
g
table
g
debug ip routing
debug

ip

routing
ITE PC v4.0
Chapter 1
6
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure
Ci IP ti t bl

Ci
sco
IP
rou
ti
ng
t
a
bl

e
is a hierarchical
structure
structure
–The reason for this is
to speed up lookup
to

speed

up

lookup

process
The hierarchy

The

hierarchy

includes several
levels.
•level 1

level 2
ITE PC v4.0
Chapter 1
7
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

level

2
Routing Table Structure
Routing

Table

Structure
 Level 1 Routes

Have a subnet mask e
q
ual to or less than the classful
q
mask of the network address.
–192.168.1.0/24 is a level 1 network route, because the
subnet mask is equal to the network's classful mask. /24
f l C t k h th 192 168 1 0 t k
f
or c
l
ass
C
ne
t
wor
k
s, suc
h

as
th
e
192
.
168
.
1
.
0
ne
t
wor
k
.
 Level 1 route can function as

Default route
•A default route is a static route with the address
0.0.0.0/0.

Supe
rn
e
t r
ou
t
e
Supeeoue
•A supernet route is a network address with a mask

less than the classful mask.

Network route
Network

route
•A network route is a route that has a subnet mask
equal to that of the classful mask.

The source of the level 1 route can be a
directly
ITE PC v4.0
Chapter 1
8
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

The

source

of

the

level

1

route


can

be

a

directly

connected network, static route, or a dynamic routing
protocol.
Routing Table Structure
Routing

Table

Structure
 The level 1 route 192.168.1.0/24 can be further defined as an
ultimate route
.
ultimate

route
.
ultimate route includes either:
-A next-hop ip address
(another path)
OR
OR
-An exit interface
 The directly connected network 192.168.1.0/24

It i l l 1 t k t b it h b t k th t i th

It

i
s a
l
eve
l

1
ne
t
wor
k
rou
t
e
b
ecause
it

h
as a su
b
ne
t
mas
k


th
a
t

i
s
th
e same as
its classful mask.
–This same route is also an ultimate route because it contains the exit interface
Serial 0/0/1
Serial

0/0/1
.
ITE PC v4.0
Chapter 1
9
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Parent and Child Routes
 A parent route is a level 1 route
Parent

and

Child

Routes

A parent route does not contain

any next-hop IP address or exit
interface information
 When the 172.16.3.0 subnet was
added to the routing table, another
route
,
172.16.0.0
,
was also added.
,,
–The first entry, 172.16.0.0/24, does
not contain any next-hop IP address
or exit interface information.
or

exit

interface

information.

–This route is known as a level 1
parent route.
Attitllhdi

A
paren
t
rou
t

e
i
s ac
t
ua
ll
y a
h
ea
di
ng
that indicates the presence of level 2
routes, also known as child routes.
ITE PC v4.0
Chapter 1
10
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure
Routing

Table

Structure
 A level 1 parent route is automatically
created any time a subnet is added to
created

any

time


a

subnet

is

added

to

the routing table.
–In other words, a parent route is
created whenever a route with a mask
created

whenever

a

route

with

a

mask

greater than the classful mask is
entered into the routing table.

172 16 0 0/24 i b tt d 1 b t

172
.
16
.
0
.
0/24

i
s su
b
ne
tt
e
d
,
1
su
b
ne
t
s
 A level 2 route is a route that is a
subnet of a classful network address.
– Child routes are level 2 routes
– Child routes are a subnet of a
lfltkdd
c

l
ass
f
u
l
ne
t
wor
k
a
dd
ress
–C 172.16.3.0 is directly connected,
FastEthernet0/0
ITE PC v4.0
Chapter 1
11
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure
Routing

Table

Structure
 The parent route contains the 172.16.0.0 - The classful network
address for our subnet.
 Level 2 child routes contain 172.16.3.0, route source & the
network address of the route

Notice that the subnet mask is not included with the subnet the level


Notice

that

the

subnet

mask

is

not

included

with

the

subnet
,
the

level

2 child route. The subnet mask for this child route (subnet) is the /24
mask included in its parent route, 172.16.0.0


Level 2
child routes
are
also considered
ultimate routes

Level

2

child

routes
are
also

considered

ultimate

routes
–Reason: they contain the next hop address &/or exit interface
ITE PC v4.0
Chapter 1
12
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure
Routing

Table


Structure
 The figure shows the
configuration of the Serial
configuration

of

the

Serial

0/0/0 interface on R2
.

The routing table shows
The

routing

table

shows

two child routes for the
same 172.16.0.0/24 parent
route
route
.
•Both 172.16.2.0 and

172.16.3.0 are members
of the same parent route,
•because they are both
bfth
mem
b
ers o
f

th
e
172.16.0.0/16 classful
network
ITE PC v4.0
Chapter 1
13
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure
 Both child routes have the same subnet mask
-This means the parent route maintains the /24 mask
Note: If there is only a
single level 2 child route
and that route is
and

that

route

is


removed, the level 1
parent route will be
automatically deleted. A
level 1 parent route
exists only when there
is at least one level 2
child route
ITE PC v4.0
Chapter 1
14
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
child

route
.
The role of the parent route will be examined when we discuss the route lookup process.
Routing Table Structure
 In classless networks, child routes do not have to share
the same subnet mask
–Whenever there are two or more child routes with different
subnet masks belonging to the same classful network the
subnet

masks

belonging

to


the

same

classful

network
,
the

routing table presents a slightly different view, which states that
this parent network is variably subnetted.
ITE PC v4.0
Chapter 1
15
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Rti TblSt t
R
ou
ti
ng
T
a
bl
e
St
ruc
t
ure


Parent & Child Routes: Classless Networks

Parent

&

Child

Routes:

Classless

Networks
ITE PC v4.0
Chapter 1
16
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Structure

Parent & Child Routes: classful and classless Networks
Parent

&

Child

Routes:

classful


and

classless

Networks
Network
Type
Parent
route’s
Term
variably
Includes
the # of
Subnet
mask
classful
Classful
mask is
Displayed
subnetted
is seen in
parent
route in
routing
different
masks of
child
routes
included
with each

child route
entry
routing

table
Class-
ful
No No No No
classless
Class-
l
Yes Yes Yes Yes
l
ess
ITE PC v4.0
Chapter 1
17
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Lookup Process
Routing

Table

Lookup

Process
 The Route Lookup Process
1. Examine level 1 routes
• If best match a level 1 ultimate route
and is not a parent route this route is

used to forward packet

If the best match is a level 1 parent

If

the

best

match

is

a

level

1

parent

route, proceed to Step 2
2. Router examines level 2 (child) routes
• If there is a match with level 2 child
route then that subnet is used to
forward packet
• If no match then proceed to Step 3
3
Rtdt i l fl

3
.
R
ou
t
er
d
e
t
erm
i
nes c
l
ass
f
u
l
or
classless routing behavior
• If classful then packet is dropped

If classless then router searches level

If

classless

then

router


searches

level

one supernet and default routes
4. If there exists a level 1 supernet or
default route match then Packet is
fdd
ITE PC v4.0
Chapter 1
18
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
f
orwar
d
e
d
5. If not packet is dropped
Rti TblLk P
R
ou
ti
ng
T
a
bl
e
L
oo

k
up
P
rocess
 Longest Match: Level 1 Network Routes
Best match is
a
lso
k
nown
a
s the longest match

Best

match

is

a
lso

k
nown

a
s

the


longest

match

–The best match is the one that has the most number of left
most bits matching between the destination IP address and the
route in the routing table.
 For example, in the figure we have a packet destined for
172 16 0 10 Many possible routes could match this packet Three
172
.
16
.
0
.
10
.
Many

possible

routes

could

match

this

packet

.
Three

possible routes are shown that do match this packet: 172.16.0.0/12,
172.16.0.0/18, and 172.16.0.0/26. Of the three routes,
172 16 0 0/26 has the longest match
172
.
16
.
0
.
0/26

has

the

longest

match
.
ITE PC v4.0
Chapter 1
19
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Lookup Process
Routing

Table


Lookup

Process
 Finding the subnet mask
used to determine the
used

to

determine

the

longest match
Scenario:
Scenario:
–PC1 pings 192.168.1.2
–Router examines level 1
tf b t th
rou
t
e
f
or
b
es
t
ma
t

c
h
–There exist a match
between192.168.1.2 &
192.168.1.0 / 24
–Router forwards packets out
s0/0/0
ITE PC v4.0
Chapter 1
20
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Lookup Process
Routing

Table

Lookup

Process
 The process of matching

1st there must be a match made between the parent route &
destination IP

If a match is made then an attempt at finding a match

If

a


match

is

made

then

an

attempt

at

finding

a

match

between the destination IP and the child route is made.
•Do at least 16 of the left-most bits of the
p
arent route match the
p
first 16 bits of the packet's destination IP address of 192.168.1.2?
–The answer, no,
ITE PC v4.0
Chapter 1
21

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Lookup Process
Fi di t h b t k t’ d ti ti IP dd

Fi
n
di
ng a ma
t
c
h

b
e
t
ween pac
k
e
t’
s
d
es
ti
na
ti
on
IP
a
dd
ress

and the next route in the routing table
The figure shows a match between the destination IP of 192 168 1 0

The

figure

shows

a

match

between

the

destination

IP

of

192
.
168
.
1
.
0


and the level one IP of 192.168.1.0 / 24 then packet forwarded out
s0/0/0

Not only does the minimum of 24 bits match, but a total of 30 bits
match, as shown in the figure.
ITE PC v4.0
Chapter 1
22
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Lookup Process
 In the exam
p
le in the fi
g
ure
,
PC1 sends a
p
in
g
to PC2
pg, pg
at 172.16.3.10. What happens when there is a match
with a level 1 parent route?
B f l l 2 hild t i d

B
e
f

ore
l
eve
l

2
c
hild
rou
t
es are exam
i
ne
d
-There must be a match between classful level one
parent route and destination IP address
parent

route

and

destination

IP

address
.
ITE PC v4.0
Chapter 1

23
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Lookup Process
Routing

Table

Lookup

Process
 After the match with parent route has been made Level 2 child
routes will be examined for a match
routes

will

be

examined

for

a

match
-Route lookup process searches for child
routes with a match with destination IP
ITE PC v4.0
Chapter 1
24

© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
Routing Table Lookup Process
Routing

Table

Lookup

Process
 How a router finds a match with one of the level 2
child routes
child

routes
–First router examines parent routes for a match
–If a match exists then:
Child routes are examined

Child

routes

are

examined
•Child route chosen is the one with the
longest match
 First, the router examines the parent route for a
match.


The router checks the last child route for
The

router

checks

the

last

child

route

for

172.16.3.0/24 and finds a match. The first 24 bits
do match. The routing table process will use this
route, 172.16.3.0/24, to forward the packet with
the destination IP address of 172.16.3.10 out the
exit interface of Serial 0/0/0.

R 172.16.3.0 [120/1] via 172.16.2.2, 00:00:25,
ITE PC v4.0
Chapter 1
25
© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public
R


172.16.3.0

[120/1]

via

172.16.2.2,

00:00:25,

Serial0/0/0

×