1 module 4: implementing ospf. 2 lessons ospf ospf areas and hierarchical routing ospf operation...
TRANSCRIPT
1
Module 4: Module 4: Implementing OSPFImplementing OSPF
2
LessonsLessons
• OSPF
• OSPF Areas and Hierarchical Routing
• OSPF Operation
• OSPF Routing Tables
• Designing an OSPF Network
3
Lesson 4-1: Lesson 4-1: OSPFOSPF
4
RIP vs. OSPFRIP vs. OSPF
• RIP Problems– Limited metric– Next-hop view– Limited network
diameter– Slow convergence– Non-hierarchical
routing
• OSPF Solutions– Arbitrary, 16-bit metric– Complete map– Theoretical unlimited
network diameter– Fast convergence– Hierarchical routing
structure
5
RIP vs. OSPFRIP vs. OSPF
Router A
Router B Router C
Router D
Router E
10
100
10
10
OSPF
10
10Net E
RIP
Router A
Router D
1
Net E (3 hops)
Figure 4-1
6
OSPF FeaturesOSPF Features
• Authentication
• Classless Routing
• Arbitrary Metric
• Hierarchical Routing Structure
• Equal-Load Balancing
• Multicast/Unicast Packets
7
OSPF and Link State RoutingOSPF and Link State Routing
• Neighbor Discovery/Maintenance
• Virtual Links
• Link State Advertisements (LSAs)
• Link State Database (LSDB)
• Adjacencies
• Route Generation Algorithm
• Routing Tables
8
Adjacent RoutersAdjacent Routers
Router A Router B Router C
Adjacent Adjacent
Figure 4-2
9
OSPF Sub-ProtocolsOSPF Sub-ProtocolsSUB-PROTOCOL PHASE FUNCTION
Hello Protocol Phase 1 The hello protocol specifies the format andexchange of Hello packets.
Exchange Protocol Phase 2 The exchange protocol specifies the format andexchange of Database Description (DD) packetsand Link State Request (LSRequest) packets.OSPF routers use DD packets to describe theirLSDB to other routers. OSPF routers useLSRequest packets to request LSAs that may bemissing from their LSDB.
Flooding Protocol Phase 3 The flooding protocol specifies the format andexchange of LSA packets and Link StateAcknowledgement (LSAck) packets. An OSPFrouter uses LSAck packets to acknowledge eachLSA it receives.
Table 4-1
10
Non-linear Phases of Non-linear Phases of OSPF OperationOSPF Operation
Phase 1
T0 T1 T2
Phase 2
Phase 3
Phase 1
Figure 4-3
11
RIP vs. OSPFRIP vs. OSPFCOMPARISON RIP OSPF
Routing Method Distance vector / routingby rumor
Link state / comprehensive map of thenetwork topology
Routing structure Non-hierarchical (flat) Hierarchical
Metric Hop-count Arbitrary 16-bit number
Network Diameter 15-hop limit No theoretical limit
Update Method Broadcast or multicast Multicast or unicast
Convergence Slow Fast
Bandwidth Usage Constant High-to-low (the synchronization process isbandwidth intensive; after synchronization,bandwidth usage is low)
ProcessorIntensive?
No Yes
Memory Intensive? No Yes
Table 4-2
12
Lesson 4-2: Lesson 4-2: OSPF AreasOSPF Areas
and Hierarchical Routing and Hierarchical Routing
13
ConceptsConcepts
• Types of OSPF Areas
• Types of OSPF Routers
• Types of Traffic
• Route Summarization
• Area Partitioning
• Virtual Links
14
OSPF Areas, OSPF Areas, Routers, Routers,
and Trafficand Traffic
Area 2(Stub Area)
Intra-Area Traffic
Area BorderRouters (ABR)
Area 1(Normal Area)
Inter-Area Traffic
Area 0(Backbone Area)
Intra-Area Traffic
External Traffic
Internal Routers
AutonomousSystem Boundary
Router (ASBR)
BackboneRouters
Area BorderRouter (ABR)
Figure 4-4
15
Route SummarizationRoute Summarization
ABR
172.1.1.0/24
Area 1
172.1.3.0/24
172.1.4.0/24172.1.2.0/24
172.1.5.0/24Sum m arized
Route:172.1.1.0/16
Figure 4-5
16
Sample AreaSample Area
Area X
Router XABR ABR
Figure 4-6
17
Router X Fails and Area X Router X Fails and Area X is Partitionedis Partitioned
Router X
Area XArea X
ABR
xABR
Figure 4-7
18
Connecting an Area Partition Connecting an Area Partition to the Backbone through a to the Backbone through a
Normal AreaNormal Area
Area 1(Partitioned)
Area 1(Partitioned)
Virtu
al Lin
kArea 2
(Normal Area)
Area 0(Backbone Area)
ABR ABR
Figure 4-8
19
Connecting a Partitioned Connecting a Partitioned Backbone through a Backbone through a
Normal AreaNormal Area
Area 0(Backbone Area)
Area 0(Backbone Area)
Area 1(Normal Area)
ABR
Virtual Link
ABR
Figure 4-9
20
Lesson 4-3: Lesson 4-3: OSPF OperationOSPF Operation
21
Format of an OSPF PacketFormat of an OSPF Packet
Layer 2Header
IP HeaderProtocol ID = 89
OSPF Header24 bytes
Type Specific Data
Figure 4-10
22
Types of OSPF PacketsTypes of OSPF Packets
Table 4-3
Type Number Type/Name Abbreviation
Type 1 Hello —
Type 2 Database Description DD
Type 3 Link State Request LSRequest
Type 4 Link State Update LSUpdate/LSA
Type 5 Link State Acknowledgement LSAck
23
Function of Hello PacketsFunction of Hello Packets
• Neighbor Discovery / Maintenance– announce the presence of a router– act as keepalives to verify the
continued participation of a router
• Election Process– determine the designated router (DR)
and backup designated router (BDR) of a multi-access network segment
24
Only Router A Forwards LSAs Only Router A Forwards LSAs from the Multi-Access Networkfrom the Multi-Access Network
Nei
ghbo
rsA
djac
ency
Nei
gh
bo
rs
Neighbors
Adjacency
Router A(DR)
Router B
Router C
Link toInternetw ork
LSAs
Link toInternetw orkNo LSAsX
Link toInternetw ork
No LSAsXFigure 4-11
25
Exchange Protocol:Exchange Protocol:Phase 2 OperationPhase 2 Operation
• Exchange DD Packets– establish master-slave relationship
• Exchange DD Packets– exchange information about LSDBs to
build a link state request list
• Transmit LSRequest Packets– request specific LSAs that are missing
from the LSDB of a router
26
OSPF LSA Packet FormatOSPF LSA Packet Format
Layer 2Header
IP HeaderProtocol ID = 89
OSPF Header24 bytes
Type SpecificData
LSA Header20 bytesType = 4
Figure 4-12
27
Flooding Protocol ConceptsFlooding Protocol Concepts
• 6 Types of LSAs
• Sequencing of LSAs
• Aging of LSAs
• Guaranteed Delivery of LSAs
28
Types of LSAsTypes of LSAs
Table 4-4
TYPE TYPE CODE FUNCTION
Router LSA1
Every router in an OSPF AS originates a router LSA. The router LSAdescribes the router and the interfaces on the router. Router LSAs arenot forwarded across area boundaries.
Network LSA2
Only the DR of a multi-access network originates a network LSA. TheLSA describes the network and identifies the other routers on thenetwork. Network LSAs are not forwarded across area boundaries.
NetworkSummary LSA 3
Only ABRs originate network summary LSAs. Network summary LSAsprovide the cost from the ABR to ABR that originated the LSA to adestination.
ASBRSummary LSA
4
Only ABRs originate ASBR summary LSAs. ASBR summary LSAsprovide the cost from the ABR that originated the LSA to a specificASBR. Combined with AS external LSAs, ASBR summary LSAsprovide reachability information for destinations external to the OSPFAS.
AS ExternalLSA 5
Only ASBRs originate AS external LSAs. AS external LSAs provide thecost from the ASBR that originated the LSA to a destination externalto the OSPF AS.
NSSAExternal LSA 7
Normal AS external LSAs cannot be flooded not-so-stubby areas(NSSA). NSSA external LSAs are similar to AS external LSAs and canbe flooded through a stub area. NSSAs are discussed in Appendix C.
29
Sequence NumbersSequence Numbers
Figure 4-13
LSA From Router XSequence Number = 99
LSDB
LSA from Router XSequence Number = 100
Router C Router D
30
Link State AcknowledgementsLink State Acknowledgements
• Implicit Acknowledgement– router sends back a copy of the LSA
in an LSUpdate packet
• Explicit Acknowledgement– router sends back an LSAck packet
that contains the 20-byte header of the LSA
31
Lesson 4-4: Lesson 4-4: OSPF Routing TablesOSPF Routing Tables
32
OSPF MetricsOSPF Metrics
• OSPF uses a 16-bit, arbitrary metric
• Metrics usually based on bandwidth
• Metric of a route = sum of all outgoing interfaces to the destination
• OSPF provides equal-load balancing
33
OSPF Path TypesOSPF Path Types
• Intra-Area Paths
• Inter-Area Paths
• E1 Paths
• E2 Paths
34
Dijkstra AlgorithmDijkstra Algorithm
• Also called the Shortest Path First (SPF) algorithm
• Converts the LSDB of a router into a shortest path tree (the router is the root of the tree)
• Run twice:– first to create the internal routing table– second to create the standard routing table
35
Sample NetworkSample Network
Figure 4-14
Router BRouter A
Router GRouter E
Router C
Router F
ABR ABR
Network 4 Network 3
Network 2
Network 1
Network 5 Network 6
Router HASBR
Router DASBR
Known Destinations
Netw ork 8 (5)Netw ork 9 (10)
Netw ork 10 (10)Router D/ASBR (15)
Known Destinations
Netw ork 8 (10)Netw ork 9 (5)
Netw ork 10 (15)Router D/ASBR (10) Known Destinations
Netw ork 11 (10)/E1Netw ork 12 (5)/E1Netw rok 13 (5)/E1
Known Destinations
Netw ork 12 (5)/E2Netw ork 14 (10)/E1Netw ork 15 (10)/E2
1
10
1
5
1
5
10
10
1 1
1
1
1
1
Network 7
1
Router J Router KRouter I
36
Shortest Path Tree of Router J Shortest Path Tree of Router J as Determined by the First SPF as Determined by the First SPF
CalculationCalculation
Figure 4-15Router J Router KRouter I
Router HASBR
Router A Router BABR ABR
Router C
Router GRouter E Router F
Router DASBR
37
Shortest Path Tree of Router J Shortest Path Tree of Router J as Determined by the Second as Determined by the Second
SPF CalculationSPF Calculation
Figure 4-16Router J Router KRouter I
Router HASBR
Router AABR
Router B Router CABR
Router GRouter E Router F
Router DASBR
Netw ork 2
Netw ork 7Netw ork 9Netw ork 8
Netw ork 10
Netw ork 11Netw ork 12Netw ork 13
Netw ork 14Netw ork 15
Netw ork 4 Netw ork 3
Netw ork 1
Netw ork 5 Netw ork 6
38
Lesson 4-5: Lesson 4-5: Designing an OSPF NetworkDesigning an OSPF Network
39
OSPF Routing ConceptsOSPF Routing Concepts
• Hierarchical Routing Structure– three-tiered model
• Route Summarization– summarize at area boundaries– conserve bandwidth and router
resources
40
Figure 4-17
Intra-AreaRouters
Area BorderRouters
BackboneRouters
Area BorderRouters
Intra-AreaRouters
Access Routers(3 rd Tier)
DistributionRouters(2nd Tier)
Core Routers(1st Tier)
DistributionRouters(2nd Tier)
Access Routers(3 rd Tier)
Three-TieredApproach toNetw orking
OSPFEquivalent
No
mo
re t
han
six
ro
ute
r h
op
s b
etw
een
en
dp
oin
ts
41
Route SummarizationRoute Summarization
Figure 4-18
ABR
172.1.1.0/24
Area 1
172.1.3.0/24
172.1.4.0/24172.1.2.0/24
172.1.5.0/24Netw ork
Summary LSA172.1.1.0/16
42
Topology ConsiderationsTopology Considerations
• Minimum/Maximum Routers per OSPF Network
• Minimum/Maximum Routers per OSPF Area
• Maximum Number of OSPF Areas
43
Scalability ConsiderationsScalability Considerations
• Plan for growth
• Ensure routers have the appropriate memory and processing power
• Place routers appropriately in the network
44
Area Design ConsiderationsArea Design Considerations
• Designing the Backbone Area
• Designing Stub Areas– normal stub areas– not-so-stubby areas
• Avoiding Partitions and Virtual Links
• Providing for Route Summarization
45
Commonly Configurable Commonly Configurable OSPF ParametersOSPF Parameters
Table 4-5
PARAMETER DESCRIPTION DEFAULT VALUE
Router Type Describes the router as an intra-area router, an ABR, or an ASBR. —
Path Type The assigned path type of external LSA forwarded by ASBRs. 1
Authentication Type
Describes the type of authentication OSPF packets will use(usually authentication type is per area)
0(None)
Area ID The ID of the area to which the interface of a router belongs. —*
Area Type Identifies the type of area to which the router interface of a router isattached (backbone, normal, NSSA, or stub).
—
InterfaceType
Identifies the type of router interface (point-to-point, point-to-multipoint, virtual link, multi-access broadcast, or multi-access non-broadcast).
—
SummaryRoutes
ABRs and ASBRs are configured with summary routing informationby which they create and flood LSAs.
—
* A router should usually not be a member of more than two areas** Usually auto-detected / auto-assigned by the router based on the type of link
46
Commonly Configurable Commonly Configurable OSPF Parameters (cont.)OSPF Parameters (cont.)
Table 4-5
PARAMETER DESCRIPTION DEFAULT VALUE
Cost Specifies the cost (metric) of the interface of a router. 1**
Key Sets the key for authentication —
Priority Sets the router priority of an interface (used to determine theDR/BDR of a multi-access network).
1
Hello Interval The interval between transmission of Hello packets from a routerinterface (in seconds)
10
Delay Indicates the number of seconds required to forward an LSA acrossthe interface (this time is added to the age value of the LSA).
1
LSARetransmission
Determines the amount of time (in seconds) between standard LSAupdates.
1800
Router DeadInterval
Determines the amount of time (in seconds) a router will wait toreceive a Hello packet from a neighbor before the router considersthe neighbor dead.
40
* A router should usually not be a member of more than two areas** Usually auto-detected / auto-assigned by the router based on the type of link
47
Module 4 Lab ExerciseModule 4 Lab Exercise
• Designing OSPF Solutions
48
Lab Exercise 4-1:Lab Exercise 4-1:Designing OSPF SolutionsDesigning OSPF Solutions
49
Lab Exercise 4-1: OverviewLab Exercise 4-1: Overview
• Setup– discussion lab
• Format– answer questions as a group– share proposed solutions with class– discuss the different strengths and
weaknesses of each proposed solution
50
Module 4:Module 4:Review Questions...Review Questions...
Summary...Summary...
51
1. Which of the following are link state 1. Which of the following are link state
routing protocols?routing protocols?
A. Link Service Protocol
B. Open Shortest Path First (OSPF)
C. Routing Information Protocol (RIP)
D. Intermediate System to Intermediate System (IS-IS)
(Choose three.)(Choose three.)
52
1. Which of the following are link state 1. Which of the following are link state
routing protocols?routing protocols?
A. Link Service Protocol
B. Open Shortest Path First (OSPF)
C. Routing Information Protocol (RIP)
D. Intermediate System to Intermediate System (IS-IS)
(Choose three.)(Choose three.)
53
2. What piece of information regarding 2. What piece of information regarding network topology is available to a link network topology is available to a link state router, but not to a distance vector state router, but not to a distance vector
router?router?
A. the network ID of all reachable destinations
B. the next hop along the path to each destination
C. the distance (or metric) from the router to the destination
D. the status of the links between the router and any router in the network
(Choose one.)(Choose one.)
54
2. What piece of information regarding 2. What piece of information regarding network topology is available to a link network topology is available to a link state router, but not to a distance vector state router, but not to a distance vector
router?router?
A. the network ID of all reachable destinations
B. the next hop along the path to each destination
C. the distance (or metric) from the router to the destination
D. the status of the links between the router and any router in the network
(Choose one.)(Choose one.)
55
3. Why do link state routers require more 3. Why do link state routers require more processing power than distance vector processing power than distance vector
routers?routers? A. because link state routers use the Dijkstra algorithm
to compute paths
B. because link state routers maintain more complex routing tables than distance vector routers
C. because link state routers can make connections to more destination networks and other routers than distance vector routers
D. because link state routers utilize a flooding process that requires them to transmit information about themselves and their links to every other router in their routing domains
(Choose one.)(Choose one.)
56
3. Why do link state routers require more 3. Why do link state routers require more processing power than distance vector processing power than distance vector
routers?routers? A. because link state routers use the Dijkstra algorithm
to compute paths
B. because link state routers maintain more complex routing tables than distance vector routers
C. because link state routers can make connections to more destination networks and other routers than distance vector routers
D. because link state routers utilize a flooding process that requires them to transmit information about themselves and their links to every other router in their routing domains
(Choose one.)(Choose one.)
57
4. In terms of link state routing protocols, 4. In terms of link state routing protocols,
what are neighboring routers? what are neighboring routers?
A. routers that share a common link
B. routers located on adjacent subnets of an IP network
C. routers that communicate with low latency because of their physical proximity
D. link state routers that can communicate without routing their packets through any distance vector routers
(Choose one.)(Choose one.)
58
4. In terms of link state routing protocols, 4. In terms of link state routing protocols,
what are neighboring routers? what are neighboring routers?
A. routers that share a common link
B. routers located on adjacent subnets of an IP network
C. routers that communicate with low latency because of their physical proximity
D. link state routers that can communicate without routing their packets through any distance vector routers
(Choose one.)(Choose one.)
59
5. What feature of link state routing 5. What feature of link state routing protocols enables link state routing protocols enables link state routing domains to converge more quickly than domains to converge more quickly than
distance vector routing domains?distance vector routing domains? A. Hello packets
B. Dijkstra algorithm
C. link state database
D. link state flooding
(Choose one.)(Choose one.)
60
5. What feature of link state routing 5. What feature of link state routing protocols enables link state routing protocols enables link state routing domains to converge more quickly than domains to converge more quickly than
distance vector routing domains?distance vector routing domains? A. Hello packets
B. Dijkstra algorithm
C. link state database
D. link state flooding
(Choose one.)(Choose one.)
61
6.6. What are the advantages of the What are the advantages of the hierarchical routing structure used by hierarchical routing structure used by
link state routers?link state routers? A. reduces amount of time necessary to build
adjacencies
B. reduces load on router memory, router processors, and network bandwidth
C. reduces number of fields required in routers' link state databases (LSDBs)
D. reduces number of link state advertisements (LSAs) that must be flooded to a routing domain
(Choose two.)(Choose two.)
62
6.6. What are the advantages of the What are the advantages of the hierarchical routing structure used by hierarchical routing structure used by
link state routers?link state routers? A. reduces amount of time necessary to build
adjacencies
B. reduces load on router memory, router processors, and network bandwidth
C. reduces number of fields required in routers' link state databases (LSDBs)
D. reduces number of link state advertisements (LSAs) that must be flooded to a routing domain
(Choose two.)(Choose two.)
63
7. What are the three categories of OSPF 7. What are the three categories of OSPF
design considerations?design considerations? A. topology considerations
B. reliability considerations
C. scalability considerations
D. bandwidth considerations
E. availability considerations
F. area design considerations
(Choose three.)(Choose three.)
64
7. What are the three categories of OSPF 7. What are the three categories of OSPF
design considerations?design considerations? A. topology considerations
B. reliability considerations
C. scalability considerations
D. bandwidth considerations
E. availability considerations
F. area design considerations
(Choose three.)(Choose three.)
65
8. What is the Internet Engineering Task 8. What is the Internet Engineering Task Force (IETF) recommendation for the Force (IETF) recommendation for the maximum number of routers in an maximum number of routers in an OSPF network?OSPF network?
A. 200
B. 700
C. 1000
D. 1200
(Choose one.)(Choose one.)
66
8. What is the Internet Engineering Task 8. What is the Internet Engineering Task Force (IETF) recommendation for the Force (IETF) recommendation for the maximum number of routers in an maximum number of routers in an OSPF network?OSPF network?
A. 200
B. 700
C. 1000
D. 1200
(Choose one.)(Choose one.)
67
9. In an OSPF network, what is the best 9. In an OSPF network, what is the best location for routers that are relatively location for routers that are relatively
low in memory and processing power?low in memory and processing power? A. backbone
B. stub areas
C. ISP interfaces
D. subnet interfaces
(Choose one.)(Choose one.)
68
9. In an OSPF network, what is the best 9. In an OSPF network, what is the best location for routers that are relatively location for routers that are relatively
low in memory and processing power?low in memory and processing power? A. backbone
B. stub areas
C. ISP interfaces
D. subnet interfaces
(Choose one.)(Choose one.)
69
10. Why should virtual links be reserved 10. Why should virtual links be reserved for emergencies in an OSPF network for emergencies in an OSPF network and not used as a permanent part of the and not used as a permanent part of the
network's topology?network's topology? A. Virtual links are prone to errors.
B. Virtual links require extra bandwidth.
C. Virtual links are difficult to configure.
D. Virtual links are slower than physical links.
E. Virtual links place increased loads on routers.
(Choose two.)(Choose two.)
70
10. Why should virtual links be reserved 10. Why should virtual links be reserved for emergencies in an OSPF network for emergencies in an OSPF network and not used as a permanent part of the and not used as a permanent part of the
network's topology?network's topology? A. Virtual links are prone to errors.
B. Virtual links require extra bandwidth.
C. Virtual links are difficult to configure.
D. Virtual links are slower than physical links.
E. Virtual links place increased loads on routers.
(Choose two.)(Choose two.)
71
72
AssumptionsAssumptions
• You understand the You understand the distance vector algorithm.distance vector algorithm.
• You know RIP.You know RIP.– Routing tablesRouting tables– Next-hop routerNext-hop router– Convergence processConvergence process
Module 4: Implementing OSPFModule 4: Implementing OSPF