Roteamento OSPF
Roteamento OSPF
Roteamento OSPF
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 1
Introduction
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 2
Introduction to OSPF
Background of OSPF
Began in 1987
1989 OSPFv1 released in RFC 1131
This version was experimental & never deployed
1991 OSPFv2 released in RFC 1247
1998 OSPFv2 updated in RFC 2328
1999 OSPFv3 published in RFC 2740
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 3
Introduction to OSPF
Hello Protocol
OSPF Hello Packet
–Purpose of Hello Packet
Discover OSPF neighbors & establish adjacencies
Advertise guidelines on which routers must agree to become
neighbors
Used by multi-access networks to elect a designated router and
a backup designated router
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 4
Introduction to OSPF
Hello Packets continued
Contents of a Hello Packet
router ID of transmitting router
OSPF Hello Intervals
–Usually multicast (224.0.0.5)
–Sent every 30 seconds for NBMA segments
OSPF Dead Intervals
–This is the time that must transpire
before the neighbor is considered
down
–Default time is 4 times
the hello interval
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 5
How Routing Information Is Maintained
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 6
Link-State Routing Protocol Algorithms
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 7
Steps in the Operation of OSPF
Selecting the Best Route
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 8
OSPF Metric
COST of an OSPF route
Is the accumulated value from one router to the next
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 9
Basic OSPF Configuration
Modifying the Cost of a link
Both sides of a serial link should be configured with the
same bandwidth
–Commands used to modify bandwidth value
Bandwidth command
–Example: Router(config-if)#bandwidthbandwidth-kbps
ip ospf cost command – allows you to directly specify
interface cost
-Example:R1(config)#interface serial 0/0/0
R1(config-if)#ip ospf cost
1562
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 10
Modifying OSPF Cost Metric
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 11
Introduction to OSPF
OSPF Algorithm
OSPF routers build &
maintain link-state
database containing LSA
received from other routers
–Information found in
database is utilized upon
execution of Dijkstra SPF
algorithm
–SPF algorithm used to
create SPF tree
–SPF tree used to populate
routing table
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 12
Introduction to OSPF
Administrative Distance
Default Administrative Distance for OSPF is 110
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 13
Introduction to OSPF
OSPF Authentication
–Purpose is to encrypt & authenticate routing
information
–This is an interface specific configuration
–Routers will only accept routing information from
other routers that have been configured with the
same password or authentication information
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 14
Configuring OSPF Authentication
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 15
OSPF Overview
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 17
Introduction to OSPF
Hello protocol packets contain information that is used
in electing
-Designated Router (DR)
DR is responsible for updating all other OSPF routers
-Backup Designated Router (BDR)
This router takes over DR’s responsibilities if DR fails
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 18
Basic OSPF Configuration
Lab Topology
Topology used for this chapter
Discontiguous IP addressing scheme
Since OSPF is a classless routing protocol the subnet mask is
configured in
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 20
Basic OSPF Configuration
The router ospf command
To enable OSPF on a router use the following
command
R1(config)#router ospf process-id
Process id
A locally significant number between 1 and 65535
-this means it does not have to match other OSPF
routers
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 21
Basic OSPF Configuration
OSPF network command
-Requires entering: network address
wildcard mask - the inverse of the
subnet mask
area-id - area-id refers to the OSPF
area. OSPF area is a group of routers
that share link state information
-Example: Router(config-router)#network network-address
wildcard-ask area area-id
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 22
Basic OSPF Configuration
OSPF Router ID
Commands used to verify current router ID
–Show ip protocols
–Show ip ospf
–Show ip ospf interface
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 23
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 24
192.168.10.0 (sub-rede)
192.168.10.8/30 192.168.10.1 (1)
255.255.255.252 192.168.10.2 (2)
255 192.168.10.3 (broadcast)
-252
_____ 192.168.10.4 (sub-rede)
3 192.168.10.5
.6
.7 (broadcast)
192.168.10.0/30
255.255.255.11111100 192.168.10.8 rede
.9
.10
.11 broad
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 25
192.168.10.0 (rede)
192.168.10.1 (primeiro)
192.168.10.192/26
...
255.255.255.192
192.168.10.62 (último)
192.168.10.63 (broad)
255
-192 2^2=4
_____ 00- 0 63
63 01- 64 - 127
10- 128 191
11- 192 - 255
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 26
64/27 30 B
116/30 112/30
120/30 A
c
14 60
200.20.2.0/24
96/28 0/26
255
-224
ITE PC v4.0
Chapter 1
31© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 27
200.20.2.0 / 24
00000000
ITE PC v4.0
Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 28