Day 3 ENHANCED IGRP (EIGRP) AND OPEN SHORTEST PATH FIRST (OSPF)
111 Open Shortest Path First OSPF OSPF Overview OSPF Operation By Grace Deng Oct.16.2003.
-
date post
21-Dec-2015 -
Category
Documents
-
view
285 -
download
5
Transcript of 111 Open Shortest Path First OSPF OSPF Overview OSPF Operation By Grace Deng Oct.16.2003.
111
Open Shortest Path FirstOpen Shortest Path FirstOSPFOSPF
OSPF OverviewOSPF Overview OSPF OperationOSPF Operation
By Grace Deng Oct.16.2003By Grace Deng Oct.16.2003
222
OSPF OverviewOSPF OverviewHistoryHistory
Development began 1987 by IETF Development began 1987 by IETF Goal—a link state protocol more efficient Goal—a link state protocol more efficient
and scaleable than RIPand scaleable than RIP Latest revision is RFC 2328Latest revision is RFC 2328
April 1998April 1998
333
OSPF OverviewOSPF OverviewOSPF versus RIPOSPF versus RIP
OSPFOSPF Link stateLink state Efficient routing updates Efficient routing updates
(sends changes only)(sends changes only) No hop count limitNo hop count limit Fast ConvergenceFast Convergence
Supports VLSMSupports VLSM
Path selection based on Path selection based on bandwidthbandwidth
RIPRIP Distance vector Distance vector Copies entire routing Copies entire routing
tabletable Hop count limit of 15Hop count limit of 15 Hold-down timers to Hold-down timers to
prevent routing loopsprevent routing loops Does not advertise sub-Does not advertise sub-
net masksnet masks Uses only hop count as Uses only hop count as
metricmetric
444
OSPF OverviewOSPF Overview Concepts Concepts
OSPF is a Link-State Routing ProtocolOSPF is a Link-State Routing Protocol Uses IP as transport, IP protocol 89Uses IP as transport, IP protocol 89 Uses Uses multicast addressesmulticast addresses in neighbor in neighbor
maintenance and flooding of LSAsmaintenance and flooding of LSAs 224.0.0.5 – All OSPF Routers224.0.0.5 – All OSPF Routers 224.0.0.6 – All DRouters224.0.0.6 – All DRouters
Employs Dijkstra’s Shortest Path First (SPF) Employs Dijkstra’s Shortest Path First (SPF) algorithm to calculate the path treealgorithm to calculate the path tree
555
OSPF OverviewOSPF Overview Concepts – (cont.) Concepts – (cont.)
Uses Metrics—path cost Uses Metrics—path cost Typically faster convergence than DVRPsTypically faster convergence than DVRPs Support for CIDR, VLSM, Authentication, Support for CIDR, VLSM, Authentication,
Multi-path and IP unnumberedMulti-path and IP unnumbered Relatively low steady state bandwidth Relatively low steady state bandwidth
requirementsrequirements
777
OSPF OverviewOSPF Overview Terminology Terminology
Link Link Link stateLink state Link State (LS) or topological database Link State (LS) or topological database AreaArea OSPF Metric CostOSPF Metric Cost Routing tableRouting table Adjacencies databaseAdjacencies database
888
OSPF Overview OSPF Overview Topology/Link State DatabaseTopology/Link State Database
A router has A router has a separatea separate Link State (LS) or Link State (LS) or topological database for topological database for each areaeach area to which to which it belongsit belongs
All routers belonging to the All routers belonging to the samesame areaarea should have should have identical databasesidentical databases
SPF calculation is performed SPF calculation is performed independently independently for each areafor each area
LSA flooding is bounded by areaLSA flooding is bounded by area
999
OSPF Overview OSPF Overview AreasAreas
OSPF uses a 2 level hierarchical modelOSPF uses a 2 level hierarchical model Areas labeled with a 32-bit numberAreas labeled with a 32-bit number
Can be defined using single decimal or IP Can be defined using single decimal or IP address format valueaddress format value
(i.e. (i.e. Area 0.0.0.0Area 0.0.0.0 or or Area 0Area 0)) Area 0 reserved for the backbone areaArea 0 reserved for the backbone area All areas must connect to area 0All areas must connect to area 0
111111
OSPF Overview OSPF Overview OSPF MetricOSPF Metric
Cost applied on all router link paths Cost applied on all router link paths 16-bit positive number 1–65,53516-bit positive number 1–65,535 The lower the more desirableThe lower the more desirable Relevant going out an interface onlyRelevant going out an interface only Route decisions made on total cost of path Route decisions made on total cost of path
141414
OSPF Overview OSPF Overview Router IDRouter ID
Routers are identified by a unique 32-bit IDRouters are identified by a unique 32-bit ID RID: highest IP address configured on any RID: highest IP address configured on any
active active loopback interfaceloopback interface RID: if no loopback exists, highest IP address RID: if no loopback exists, highest IP address
configured on any active configured on any active physical interfacephysical interface RID can be configured withRID can be configured with
router-id <ip address>router-id <ip address>
151515
OSPF Overview OSPF Overview OSPF Hello PacketsOSPF Hello Packets
Multicast 224.0.0.5 on all router interfacesMulticast 224.0.0.5 on all router interfaces Hello interval 10 sec. LAN, 30 sec. NBMAHello interval 10 sec. LAN, 30 sec. NBMA Used to form adjacencies between routersUsed to form adjacencies between routers
161616
OSPF Overview OSPF Overview Database Descriptor Packets (DDP)Database Descriptor Packets (DDP)
Contain link state database headersContain link state database headers Describe the current LS databaseDescribe the current LS database ExchangeExchange stage stage
••••••
DD seq=x+1,S
DD seq=x+n,S
DD seq=x+n,M
DD seq=x+1,M
171717
OSPF Overview OSPF Overview Link State Request & Update PacketsLink State Request & Update Packets
Request for specific parts of databaseRequest for specific parts of database Send only database updates requestedSend only database updates requested LoadingLoading Stage, labeled Stage, labeled FullFull when complete when complete
Link State Update
Link State Request
Link State Request
Link State Update
181818
OSPF OperationOSPF Operation
Network changes generate link-state Network changes generate link-state advertisements (LSA)advertisements (LSA) Cost change to an interfaceCost change to an interface Link being added or deleted from topologyLink being added or deleted from topology
All routers exchange LSAs to build and All routers exchange LSAs to build and maintain a consistent databasemaintain a consistent database
The protocol remains relatively quiet during The protocol remains relatively quiet during steady-state conditions.steady-state conditions.
191919
OSPF Operation OSPF Operation Steps to OSPF OperationSteps to OSPF Operation
1. Establishing router adjacencies1. Establishing router adjacencies
2. Electing DR and BDR2. Electing DR and BDR
3. Discovering Routes3. Discovering Routes
4. Choosing Routes4. Choosing Routes
5. Maintaining Routing Information5. Maintaining Routing Information
202020
OSPF OperationOSPF Operation OSPF StatesOSPF States
OSPF router interfaces can be in one of OSPF router interfaces can be in one of seven states:seven states:
Down StateDown State Init StateInit State Two-way StateTwo-way State ExStart State ExStart State Exchange StateExchange State Loading StateLoading State Full Adjacency StateFull Adjacency State
212121
OSPF OperationOSPF Operation Steps to OSPF Operation with OSPF StatesSteps to OSPF Operation with OSPF States
1. Establishing router adjacencies1. Establishing router adjacencies Down StateDown State Init StateInit State Two-way StateTwo-way State (ExStart State unless DR/BDR election (ExStart State unless DR/BDR election
needed)needed)
2. Electing DR and BDR2. Electing DR and BDR ExStart State with DR and BDRExStart State with DR and BDR Two-way State with all other routersTwo-way State with all other routers
222222
3. Discovering Routes3. Discovering Routes ExStart StateExStart State Exchange StateExchange State Loading StateLoading State Full StateFull State
4. Choosing Routes4. Choosing Routes
5. Maintaining Routing Information5. Maintaining Routing Information
OSPF OperationOSPF Operation Steps to OSPF Operation with OSPF StatesSteps to OSPF Operation with OSPF States
232323
Initially, an OSPF router interface is in Initially, an OSPF router interface is in the the down statedown state.not exchanged .not exchanged information with any neighbor.information with any neighbor.
OSPF OperationOSPF Operation 1. Establishing Adjacencies (1)1. Establishing Adjacencies (1)
242424
Init StateInit State Init StateInit State - OSPF routers send Type 1 - OSPF routers send Type 1
Hello packets at regular intervals (10 Hello packets at regular intervals (10 sec.) to establish neighbors.sec.) to establish neighbors.
When a router receives its first Hello When a router receives its first Hello packet, it enters the packet, it enters the init stateinit state, meaning , meaning the router is ready to take the the router is ready to take the relationship to the next level.relationship to the next level.
OSPF OperationOSPF Operation 1. Establishing Adjacencies 1. Establishing Adjacencies (2)(2)
252525
From From init stateinit state to the to the two-way statetwo-way state RTB receives Hello packets from RTA and RTB receives Hello packets from RTA and
RTC (its neighbors), and sees its own RTC (its neighbors), and sees its own Router ID (10.6.0.1) in the Neighbor ID field.Router ID (10.6.0.1) in the Neighbor ID field.
RTB declares takes the relationship to a RTB declares takes the relationship to a new level, and declares a new level, and declares a two-way statetwo-way state between itself and RTA, and itself and RTC.between itself and RTA, and itself and RTC.
OSPF OperationOSPF Operation 1. Establishing Adjacencies (3)1. Establishing Adjacencies (3)
262626
Two-way stateTwo-way state to to ExStart stateExStart state?? RTB now decides who to establish a full adjacency with RTB now decides who to establish a full adjacency with
depending upon the type of network that the particular depending upon the type of network that the particular interfaces resides on.interfaces resides on.
If the interface is on a If the interface is on a point-to-pointpoint-to-point link, the routers link, the routers becomes adjacent with its sole link partner (aka “soul becomes adjacent with its sole link partner (aka “soul mates”), and take the relationship to the next level by mates”), and take the relationship to the next level by entering the entering the ExStart stateExStart state..
If the interface is on a If the interface is on a multi-accessmulti-access link (Ethernet, link (Ethernet, Frame Relay, …) RTB must enter an election process Frame Relay, …) RTB must enter an election process to see who it will establish a full adjacency with, and to see who it will establish a full adjacency with, and remains in the remains in the two-way statetwo-way state. (Next!). (Next!)
OSPF OperationOSPF Operation 1. Establishing Adjacencies (4)1. Establishing Adjacencies (4)
272727
OSPF Operation OSPF Operation Designated RouterDesignated Router
Reduce OSPF traffic on multiaccess linksReduce OSPF traffic on multiaccess links Routers form FULL adjacencies with DR/BDRRouters form FULL adjacencies with DR/BDR
Store and distribute neighbors LSDBsStore and distribute neighbors LSDBs Backup DR for redundancyBackup DR for redundancy OSPF priority used in DR selectionOSPF priority used in DR selection
Range 1–255 default 1, 0 for non-candidate. Range 1–255 default 1, 0 for non-candidate. Priority carried in Hello packetPriority carried in Hello packet
ip ospf priority <value>ip ospf priority <value>
282828
OSPF Operation OSPF Operation Function of DR/BDRFunction of DR/BDR
DR
BDR
Link
chan
ge Flood Link change224.0.0.5
AllOSPFRouters
224.0.0.6AllDRrouters
292929
OSPF OperationOSPF Operation 2.Electing a DR and BDR (1)2.Electing a DR and BDR (1)
On On point-to-point point-to-point links links adjacencies are established adjacencies are established with all neighbors, because with all neighbors, because there is only one neighbor.there is only one neighbor.
OnOn multi-access multi-access networks,OSPF elects a DR networks,OSPF elects a DR and BDR to limit the number and BDR to limit the number of adjacencies.of adjacencies. Reduce routing update Reduce routing update
traffictraffic
303030
DRDR - Designated Router- Designated Router BDRBDR – Backup Designated Router – Backup Designated Router DR’s serve as collection points for Link DR’s serve as collection points for Link
State Advertisements (LSAs)State Advertisements (LSAs) A BDR back ups the DR.A BDR back ups the DR. If the IP network is If the IP network is multi-accessmulti-access, the , the
OSPF routers will elect 1 DR and 1 BDROSPF routers will elect 1 DR and 1 BDR (unless there is only 1 router on the (unless there is only 1 router on the network).network).
OSPF OperationOSPF Operation 2.Electing a DR and BDR (2)2.Electing a DR and BDR (2)
313131
The formation of an adjacency between The formation of an adjacency between every attached router would create many every attached router would create many unncessary LSA (Link State unncessary LSA (Link State Advertisements), n(n-1)/2 adjacencies.Advertisements), n(n-1)/2 adjacencies.
Flooding on the network itself would be Flooding on the network itself would be chaotic.chaotic.
To prevent this problem, a To prevent this problem, a Designated Designated RouterRouter is elected on multi-access networks. is elected on multi-access networks.
OSPF OperationOSPF Operation 2.Electing a DR and BDR (3)2.Electing a DR and BDR (3)
323232
All other routers, “DRother”, establish All other routers, “DRother”, establish adjacencies with only the DR and BDR.adjacencies with only the DR and BDR.
DRother routers multicast LSAs to only the DR DRother routers multicast LSAs to only the DR and BDRand BDR (224.0.0.6 - all DR routers)(224.0.0.6 - all DR routers)
DR sends LSA to all adjacent neighbors DR sends LSA to all adjacent neighbors (224.0.0.5 - all OSPF routers)(224.0.0.5 - all OSPF routers)
OSPF OperationOSPF Operation 2.Electing a DR and BDR (4)2.Electing a DR and BDR (4)
333333
Once a DR is established, a new router that enters Once a DR is established, a new router that enters the network with a higher priority or router id will the network with a higher priority or router id will NOT become the DR or BDR. (Bug in early IOS NOT become the DR or BDR. (Bug in early IOS 12.0)12.0)
If DR fails, BDR takes over as DR and selection If DR fails, BDR takes over as DR and selection process for new BDR begins.process for new BDR begins.
State of the relationshipState of the relationship DRothers enterDRothers enter ExStart stateExStart state with DR and BDR with DR and BDR
andand two-way statetwo-way state with all other routerswith all other routers
OSPF OperationOSPF Operation 2.Electing a DR and BDR (5)2.Electing a DR and BDR (5)
343434
DR - SummaryDR ElectionDR Election Router with the highest interface priority Router with the highest interface priority
(priority = 0 cannot become DR or BDR)(priority = 0 cannot become DR or BDR)
Router with the highest router ID. Router with the highest router ID. Loopback address used firstLoopback address used first IP Address on active interface used IP Address on active interface used
secondsecond BDR is the second highestBDR is the second highest
OSPF OperationOSPF Operation 2.Electing a DR and BDR (6)2.Electing a DR and BDR (6)
353535
DR - SummaryAdjacencies and multicastingAdjacencies and multicasting All other routers, DRother, establish All other routers, DRother, establish
adjacencies with only the DR and BDR.adjacencies with only the DR and BDR. All routers continue to multicast Hello All routers continue to multicast Hello
packets to AllSPFRouters (224.0.0.5) so they packets to AllSPFRouters (224.0.0.5) so they can track neighbors.can track neighbors.
But updates (LSAs) are multicast to DR and But updates (LSAs) are multicast to DR and BDR only (224.0.0.6 - AllDRrouters) and in BDR only (224.0.0.6 - AllDRrouters) and in turn turn
DR floods updates (LSAs) to all adjacent DR floods updates (LSAs) to all adjacent neighbors (224.0.0.5 - AllSPFRrouters)neighbors (224.0.0.5 - AllSPFRrouters)
OSPF OperationOSPF Operation 2.Electing a DR and BDR (7)2.Electing a DR and BDR (7)
363636
BDR-summary Listens, but doesn’t act.Listens, but doesn’t act. If LSA is sent, BDR sets a timer.If LSA is sent, BDR sets a timer. If timer expires before it sees the reply from If timer expires before it sees the reply from
the DR, it becomes the DR and takes over the DR, it becomes the DR and takes over the update process.the update process.
The process for a new BDR begins.The process for a new BDR begins.
OSPF OperationOSPF Operation 2.Electing a DR and BDR (8)2.Electing a DR and BDR (8)
373737
OSPF OperationOSPF Operation 3. Discovering Routes and reaching Full State3. Discovering Routes and reaching Full State
383838
Link state databaseLink state database Created with Link State Packets (LSPs) from Created with Link State Packets (LSPs) from
each routereach router TENT databaseTENT database
Tentative triples (ID, path cost, direction)Tentative triples (ID, path cost, direction) PATH databasePATH database
Best path triples (ID, path cost, direction)Best path triples (ID, path cost, direction) Forwarding databaseForwarding database
The The Routing TableRouting Table
Dijkstra - Dijkstra - Shortest Path First (SPF) Shortest Path First (SPF) AlgorithmAlgorithm
OSPF OperationOSPF Operation 4. Choosing routes (1)4. Choosing routes (1)
393939
All routers exchange Link State Packets (LSPs)All routers exchange Link State Packets (LSPs) Each router starts with itself as rootEach router starts with itself as root Tent is built from LSPsTent is built from LSPs Path is created by examining and comparing Path is created by examining and comparing
TENT triplesTENT triples Once path is final the forwarding table is Once path is final the forwarding table is
populatedpopulated
Dijkstra (SPF) Overview (Cont.)Dijkstra (SPF) Overview (Cont.)
OSPF OperationOSPF Operation 4. Choosing routes (2)4. Choosing routes (2)
404040
B C D E F
B/4
G/2
G
A/4
C/1
A
B/1
D/4
E/2
C/4
E/1
C/2
D/1
F/2
E/2
G/2
A/2
F/2
B A C
D
E F G
4 2
2 2
2 1 4
1
Lowest cost best
Link State Packet (LSP) Link State Packet (LSP) DataData
OSPF OperationOSPF Operation 4. Choosing routes (3)4. Choosing routes (3)
414141
....
OSPF Operation OSPF Operation 5. Maintaining routes5. Maintaining routes
Router 2, Area 1
Old Routing Table New Routing Table
Link State Table
LSA
Dijkstra Algorithm
ACK
Every router in Every router in area receives the area receives the new LSA via new LSA via floodingflooding
Each router Each router computes computes shortest path shortest path routing table routing table when a link when a link changes State.changes State.
Router 1, Area 1
424242
Issues with large OSPF netsIssues with large OSPF nets
Large routing table Large routing table Large link-state tableLarge link-state table Frequent SPF calculationsFrequent SPF calculations
434343
referencereference RFC 1403RFC 1403, "BGP OSPF Interaction", K. Varadhan, 1993., "BGP OSPF Interaction", K. Varadhan, 1993. RFC 1584RFC 1584, "Multicast Extensions to OSPF", J. Moy, March 1994., "Multicast Extensions to OSPF", J. Moy, March 1994. RFC 1850RFC 1850, "OSPF Version 2 Management Information Base", F. , "OSPF Version 2 Management Information Base", F.
Baker and R. Coltun, Nov 1995.Baker and R. Coltun, Nov 1995. RFC 2328RFC 2328, "OSPF Version 2", J. Moy, April 1998, also STD 54. , "OSPF Version 2", J. Moy, April 1998, also STD 54. RFC 2370RFC 2370, "The OSPF Opaque LSA Option", R. Coltun, July 1998., "The OSPF Opaque LSA Option", R. Coltun, July 1998. http://www2.rad.com/networks/1995/ospf/ospf.htmhttp://www2.rad.com/networks/1995/ospf/ospf.htm, “OSPF”, B. , “OSPF”, B.
Daniel, B. Omer, R. Carmel.Daniel, B. Omer, R. Carmel. Internetworking with TCP/IP (Vol I) - Comer Internetworking with TCP/IP (Vol I) - Comer www.et.fnt.hvu.nl/docenten/cuiterwijk/ccnp/guideswww.et.fnt.hvu.nl/docenten/cuiterwijk/ccnp/guides,“The Technology ,“The Technology
Innovation Centre Brimingham”.Innovation Centre Brimingham”.