© 1999, Cisco Systems, Inc OSPF Overview RFC 2328, 2178, 1583
Has fast convergence Supports VLSM Has no hop count limitation Processes updates efficiently Selects paths based on bandwidth What Is OSPF?
OSPF Terminology Links
OSPF Terminology Links Cost=10 Cost=1785 Cost=6
OSPF Terminology Area 1 Links Cost=10 Cost=1785 Cost=6 Area 0
OSPF Terminology Area 1 Links Cost=10 Cost=1785 Cost=6 Area 0 DR BDR
OSPF Terminology Adjacencies Database Lists Neighbors Area 1 Links Cost=10 Cost=1785 Cost=6 Area 0 DR BDR
OSPF Terminology Topology Database Lists All Routes Area 1 Links Cost=10 Cost=1785 Cost=6 Area 0 DR BDR Adjacencies Database Lists Neighbors
Area 1 Links Cost=10 Cost=1785 Cost=6 Area 0 OSPF Terminology DR BDR Routing Table Lists Best Routes Topology Database Lists All Routes Adjacencies Database Lists Neighbors
© 1999, Cisco Systems, Inc OSPF Operation within a Single Area
Establishing Adjacencies Hello A D E C B afadjfjorqpoeru Router ID Hello/Dead Intervals Neighbors Area-ID Router Priority DR IP Address BDR IP Address Authentication Password Stub Area Flag * * * *
Establishing Adjacencies (cont.) /24 E /24 E1 A B Down State
Establishing Adjacencies (cont.) /24 E /24 E1 Router B Adjacencies Database /24, int E1 I am router ID and I see no one. A B Down State Init State
Establishing Adjacencies (cont.) /24 E0 I am router ID , and I see /24 E1 Router B Adjacencies Database /24, int E1 I am router ID and I see no one. A B Down State Init State
Establishing Adjacencies (cont.) /24 E0 I am router ID , and I see Router A Adjacencies Database /24, int E /24 E1 Router B Adjacencies Database /24, int E1 I am router ID and I see no one. A B Down State Init State Two-Way State
Hellos elect DR and BDR Each router forms adjacency with DR and BDR Electing the DR and BDR DRBDR
Hello packets exchanged via IP multicast Router with highest OSPF priority elected P=1P=0P=1 Electing the DR and BDR (cont.) P=3P=2 Hello DR BDR
Discovering Routes E DR E No, I will start exchange because I have a higher router ID. I will start exchange because I have router ID Hello afadjfjorqpoeru Hello afadjfjorqpoeru Exstart State
Discovering Routes E DR E No, I will start exchange because I have a higher router ID. I will start exchange because I have router ID Here is a summary of my link-state database. Hello afadjfjorqpoeru Hello afadjfjorqpoeru DBD afadjfjorqpoeru Exstart State Exchange State Here is a summary of my link-state database. DBD afadjfjorqpoeru
Discovering Routes (cont.) E E Thanks for the information! LSAck afadjfjorqpoeru LSAck afadjfjorqpoeru DR
Discovering Routes (cont.) E E I need the complete entry for network /24. Here is the entry for network /24. Thanks for the information! LSR afadjfjorqpoeru LSAck afadjfjorqpoeru LSU afadjfjorqpoeru Loading State. Thanks for the information! LSAck afadjfjorqpoeru LSAck afadjfjorqpoeru DR
Discovering Routes (cont.) E E I need the complete entry for network /24. Here is the entry for network /24. Thanks for the information! LSR afadjfjorqpoeru LSAck afadjfjorqpoeru LSU afadjfjorqpoeru Full State Loading State. Thanks for the information! LSAck afadjfjorqpoeru LSAck afadjfjorqpoeru DR
Choosing Routes Routing Table Net Cost Out Interface TR TR E0 Cost=10 Cost=6 Cost=1 A B C This is the best route to C / / / /24
Maintaining Routing Information New Router xx Link-State Change LSU 1 DR A B New router tells all OSPF DRs on
Maintaining Routing Information New Router xx Link-State Change LSU 1 2 DR A B New router tells all OSPF DRs on DR tells others on
New router tells all OSPF DRs on DR tells others on New Router xx Link-State Change LSU Maintaining Routing Information DR A B
New router tells all OSPF DRs on DR tells others on Maintaining Routing Information New Router xx Link-State Change LSU I need to update my routing table. DR A B 4
Maintaining Routing Information (cont.) Is entry in link-state database? No Run SPF to calculate new routing table Add to database Flood LSA End LSA LSU A
Maintaining Routing Information (cont.) Is entry in link-state database? Yes No Run SPF to calculate new routing table Add to database Flood LSA Is seq. # the same? No Send LSU with newer information to source End LSA LSU Is seq. # newer? No
Maintaining Routing Information (cont.) Is entry in link-state database? Yes No Run SPF to calculate new routing table Add to database Flood LSA Is seq. # the same? Yes No Send LSU with newer information to source End LSA LSU Is seq. # newer? No Ignore LSA
Maintaining Routing Information (cont.) Is entry in link-state database? Yes No Run SPF to calculate new routing table Add to database Flood LSA Is seq. # the same? Yes No Yes Send LSU with newer information to source End LSA LSU Is seq. # newer? No A Ignore LSA Send LSAck to DR Go to A
Configuring OSPF on Internal Routers Can assign network or interface address. Broadcast NetworkPoint-to-Point Network E E0 S S1 A BC interface Ethernet0 ip address ! router ospf 1 network area 0 interface Ethernet0 ip address ! interface Serial0 ip address router ospf 50 network area 0 network area 0
Assigns a cost to an outgoing interface May be required for interoperability Use default cost between Cisco devices Cisco Non-Cisco Traffic Router(config-if)# ip ospf cost cost Configuring Optional Commands (cont.)
© 1999, Cisco Systems, Inc Creating Multiple OSPF Areas
Issues with Maintaining a Large OSPF Network OSPF My routing table is too big, I am running low on memory. The SPF is running too often for me to route. I am only receiving LSAs, no data.
Area 0 Area 1Area 2 Autonomous System Consists of areas and autonomous systems Minimizes routing update traffic The Solution: OSPF Hierarchical Routing
OSPF Multiarea Components Area 0 I am a backbone. Area 2 I am a stub. Area 1 I am standard. AreasRoutersLSAs Internal ABR ASBR Backbone Type 1 afadjfjorqpoeru Type 2 afadjfjorqpoeru Type 3/4 afadjfjorqpoeru Type 5 afadjfjorqpoeru
Types of OSPF Routers Internal Routers Area 1Area 2 ASBR and Backbone Router Backbone/ Internal Routers ABR and Backbone Router Backbone Area 0 External AS ABR and Backbone Router Internal Routers
Flooding LSUs to Multiple Areas (cont.) Routing Table Interarea routes Intra-area routes External (non-OSPF routes) Area 1 Area 0 Area 1RIP
OSPF Area Configuration Example Area 0 Stub Area S0 E0 External AS R4 R3 R3# interface Ethernet 0 ip address interface Serial 0 ip address router ospf 100 network area 0 network area 2 R4# interface Serial 0 ip address router ospf 15 network area 2
Link-State Network Discovery Routers calculate the shortest path to destinations in parallel ABC X Y ZW Routing Table W W 0 0 X X 0 0 X X 0 0 Y Y 0 0 Y Y 0 0 Z Z 0 0 E0 S1S0 S1 E1 E0 S1 S0 S1E1
Link-State Network Discovery Routers calculate the shortest path to destinations in parallel SPF ABC X Y Z Topological Database SPF Topological Database SPF Topological Database W Routing Table W W 0 0 X X 0 0 X X 0 0 Y Y 0 0 Y Y 0 0 Z Z 0 0 E0 S1S0 S1 E1 E0 S1 S0 S1E1
Link-State Network Discovery Routers calculate the shortest path to destinations in parallel SPF SPF Tree ABC X Y Z Topological Database A Routing Table A Routing Table SPF Topological Database B Routing Table B Routing Table SPF Topological Database C Routing Table C Routing Table W Routing Table W W 0 0 X X 0 0 X X 0 0 Y Y 0 0 Y Y 0 0 Z Z 0 0 E0 S1S0 S1 E1 E0 S1 S0 S1E1
Link-State Topology Changes Update processes proceed using the same link-state update Process to update this routing table Process to update this routing table Process to update this routing table Process to update this routing table Topologychangeinlink-stateupdate Process to update this routing table Process to update this routing table
Link-State Concerns Processing and memory required for link-state routing SPF SPF Tree Topological Database A Routing Table A Routing Table
Link-State Concerns Processing and memory required for link-state routing Bandwidth consumed for initial link-state “flood” SPF SPF Tree Topological Database A Routing Table A Routing Table
Problem: Link-State Updates Unsynchronized updates, inconsistent path decisions D B A C Network 1, Unreachable Network 1 goes down then comes up X, ok Slow path update
Problem: Link-State Updates Unsynchronized updates, inconsistent path decisions D B A C Network 1, Unreachable Network 1, Back Up Now Network 1, Unreachable Network 1 goes down then comes up X, ok Fast path updates arrive first Slow path update arrives lastSlow path update Which SPF tree to use for routing?
Problem: Link-State Updates Unsynchronized updates, inconsistent path decisions D B A C Network 1, Unreachable Network 1, Back Up Now Network 1, Unreachable Network 1 goes down then comes up X, ok Fast path updates arrive first Slow path update arrives lastSlow path update Which SPF tree to use for routing?
Link-State Update Problems Synchronizing large networks—which network topology updates are correct?
Link-State Update Problems Synchronizing large networks—which network topology updates are correct? Router startup—order of start alters the topology learned
Link-State Update Problems Synchronizing large networks—which network topology updates are correct? Router startup—order of start alters the topology learned Partitioned regions—slow updating part separated from fast updating part
Reduce the need for resources –“Dampen” update frequency –Target link-state updates to multicast –Use link-state area hierarchy for topology –Exchange route summaries at area borders Solution: Link-State Mechanisms
Reduce the need for resources –“Dampen” update frequency –Target link-state updates to multicast –Use link-state area hierarchy for topology –Exchange route summaries at area borders Coordinate link-state updates –Use time stamps –Update numbering and counters –Manage partitioning using an area hierarchy Solution: Link-State Mechanisms