Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Intro to OSPF © 1998, Cisco Systems, Inc. 1 Introduction to OSPF Presented by: Andrew Short Session Number Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 2 Agenda • Distance Vector vs Link State Routing protocols • OSPF basics • OSPF issues Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 3 OSPF – Open Shortest Path First • “Open” • “Shortest Path First” Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 4 Distance Vector Routing Protocols • Learn about network from neighbors only • Keep a table entry for all destinations Contains the distance and first gateway • Periodically send routing table updates to neighbors Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 5 Link State Routing Protocols • Flood Link State Advertisements (LSA) within Autonomous System (AS). LSA is state of each link from current router LSA must reach all routers in AS • Run Shortest Path First (SPF) algorithm to create an SPF tree for the complete AS. SPF tree is rooted at the current router. Use Next-Hop entries from SPF tree to populate routing table. • Triggered LSAs when a link goes up or down, the attached router sends updated LSAs out all remaining interfaces. Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 6 OSPF vs RIP ( link-state vs distance vector ) • RIP •Does not scale (15 hop count limit) •Flat networks, no hierarchy •Slow convergence •(RIP 1) Does not support VLSM (variable length subnet mask) •Periodic broadcast of route table leads to waste of bandwidth (periodic offload of routing table to the network, re: ISDN links!) •No concept of link-delay or cost Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 7 OSPF vs RIP ( link-state vs distance vector ) • OSPF •No hop count limitation •Scalable - hierarchical network design •“Areas” limit route information flooding, short convergence time •supports VLSM •link bandwidth determines metric Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 8 OSPF – Design, Design, Design • A healthy OSPF implementation is the product of a well thought out…. • DESIGN. Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 9 OSPF Terminology Area 0 0.0.0.0 Backbone Area 2 Area 1 0.0.0.1 0.0.0.2 To Another AS Presentation_ID Internal Router Area Border Router (ABR) Backbone Router Autonomous System Boundary Router (ASBR) © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 10 OSPF Terminology contd. • Router ID (RID) Must be unique Highest loopback address or Highest interface address if no loopback • LSA (Link State Advertisement) LSA describes state of all the routers links OSPF routers flood LSAs to create a picture of the network Each router uses these LSAs to create shortest-path tree rooted at itself Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 11 OSPF Terminology contd. • Area Logical group of routers which have complete picture of network within grouping. If multiple areas exist in the network, there must be an ‘area 0’, which is the backbone area. All routing information is disseminated from one area to another through area 0. • Network A single broadcast domain within the OSPF Autonomous System Frame-Relay PVC Ethernet VLAN Point to Point T1 Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 12 OSPF Areas Area 0 0.0.0.0 Backbone Area 1 Area 2 0.0.0.2 0.0.0.1 To Another AS Presentation_ID Internal Router Area Border Router (ABR) Backbone Router Autonomous System Boundary Router (ASBR) © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 13 OSPF Terminology contd. • Neighbors OSPF routers connected to the same network Must agree on: Area ID Authentication Network Mask Hello Interval RouterDeadInterval Options • Adjacencies Neighboring OSPF routers that proceed to the database exchange process Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 14 Configuring OSPF Router(config)#router ospf 1 Router(config-router)#net 10.0.0.0 0.255.255.255 area 1 - enable OSPF on router and specifies interfaces in OSPF domain Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 15 Forming adjacencies • OSPF has several network types - Broadcast - Non-broadcast Multi-access (NBMA) - Point-to-multipoint - Point-to-point • DR/BDR election only performed on broadcast and NBMA networks • Hellos sent to AllSPFRouters address (224.0.0.5). DR/BDR listen to AllDRRouters address (224.0.0.6) • On broadcast and NBMA networks, routers only become fully adjacent with DR and BDR. • On a NBMA network the DR/BDR need to have a static list of all OSPF routers in that network segment. Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 16 Forming adjacencies contd. • OSPF neighbors progress through the following stages: • Down: No information has been received from anybody on the segment. • Attempt: no recent information has been received. Attempt to contact neighbor. Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 17 Forming adjacencies contd. • Init: The interface has detected a Hello packet from a neighbor. • Two-way: Router sees itself in neighbors Hello packet • Exstart: Negotiating parameters before exchanging LSA information • Exchange: Routers will describe their entire link-state database by sending database description packets. Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 18 Forming adjacencies contd. • Loading: Finalizing information exchange. • Full: LSA exchange complete. Both routers now have identical link-state databases Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 19 OSPF Stub Areas • Stub Area • Totally Stubby Area • Not So Stubby Area (NSSA) Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 20 OSPF – Stub Area • External LSAs are NOT flooded into stub areas • No type 4 or type 5 LSAs in this area. • No virtual links • “area 1 stub” on ALL area 1 routers • Route lookups Intra-area routes Inter-area routes Default route Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 21 OSPF – Totally Stub Area • Type 1 and Type 2 internally • Only the single ABR produces a single Type 3 Network to advertise the default route. • “area 1 stub no-summary” (at the abr of a stub area) Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 22 OSPF – Not So Stubby Area • Basically, an ospf stub area with an ASBR • “area 1 nssa” Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 23 LSA Types Type 1 Router 2 Network 3 Summary Network 4 Summary ASBR 5 External NSSA 7 Presentation_ID LSA © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 24 LSA Types contd. • Router LSA (Type 1) Produced by every SPF Router Describes the state and cost of the router’s links to the area All of the router’s links in an area must be described in a single LSA Flooded throughout the particular area and no more Router indicates whether it is an ASBR, ABR, or end point of virtual link • “show ip ospf network database router” Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 25 LSA Types contd. • Network LSA (Type 2) Sent by DRs Generated for every transit broadcast and NBMA network Describes all the routers attached to the network Only the designated router originates this LSA Flooded throughout the area and no more • “show ip ospf network database network” Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 26 LSA Types contd. • Summary Network LSA (Type 3) and ASBR Summary LSA (Type 4) –Both are •originated by an ABR •Flooded throughout a single area –3 - Describes networks (including default routes) external to the area but still in the AS •“show ip ospf database summary” –4 - Describes ASBRs external to the area. •“show ip ospf database asbr-summary” Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 27 LSA Types contd. • External LSA (Type 5) Originated by ASBRs Defines routes to destination external to the AS Default route is also sent as external Flooded to all non-stub areas Two types of external LSA: E1: (E bit = 0) Consider the total cost up to the external destination E2: (E bit = 1) Considers only the cost of the outgoing interface to the external destination Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 28 LSA Types contd. • NSSA External LSA (Type 7) Originated by ASBRs in NSSA (not-so-stubby-area) area Flooded only within NSSA area ABR to NSSA area converts it to a Type 5 LSA Information DOES leave the Area, but not as a Type 7, because type 7 MUST remain in the area. Outside the area, it is seen as a Type 5 Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 29 Show commands • show ip ospf • show ip ospf neighbors • show ip ospf interface Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 30 Different Types of LSAs Sample Network for Each LSA 192.1.2.0 3 R1 192.1.1.0 R4 8 8 Area 0 1 R2 R3 8 2 192.1.3.0 External Route 140.10.0.0 195.12.1.1 18.10.0.6 192.1.4.0 2 4 1 Area 1 Router id 131.108.1.1 R7 NSSA Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 31 External LSA External Type 1 To N1 External Cost = 1 R3 Cost = 10 R1 To N1 External Cost = 2 Cost = 8 R2 Network N1 N1 Presentation_ID Type 1 11 10 Next Hop R1 R2 © 2005 Cisco Systems, Inc. All rights reserved. Selected Route CISCO CONFIDENTIAL 32 External LSA External Type 2 To N1 External Cost = 1 R3 Cost = 10 R1 To N1 External Cost = 2 Cost = 8 R2 Network N1 N1 Presentation_ID Type 2 1 2 Next Hop R1 R2 © 2005 Cisco Systems, Inc. All rights reserved. Selected Route CISCO CONFIDENTIAL 33 Type 5 Details • Forwarding address Must be known via intra or inter area route router ospf 1 redistribute rip subnets RIP Between the Routers ASBR Rest of the OSPF Network OSPF Is Enabled on this Interface Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 34 Show IP OSPF GSR-3#sh ip ospf Routing Process "ospf 100" with ID 10.10.128.3 Supports only single TOS(TOS0) routes Supports opaque LSA It is an area border router SPF schedule delay 5 secs, Hold time between two SPFs 10 secs Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs Number of external LSA 0. Checksum Sum 0x0 Number of opaque AS LSA 0. Checksum Sum 0x0 Number of DCbitless external and opaque AS LSA 0 Number of DoNotAge external and opaque AS LSA 0 Number of areas in this router is 2. 2 normal 0 stub 0 nssa External flood list length 0 Area BACKBONE(0) Number of interfaces in this area is 5 Area has no authentication SPF algorithm executed 2773 times Area ranges are Number of LSA 97. Checksum Sum 0x2B19E3 Number of opaque link LSA 0. Checksum Sum 0x0 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 35 Show IP OSPF (Cont.) Area 8 Number of interfaces in this area is 2 It is a stub area, no summary LSA in this area Area has no authentication SPF algorithm executed 11 times Area ranges are Number of LSA 5. Checksum Sum 0x22812 Number of DCbitless LSA 0 Number of indication LSA 0 Number of DoNotAge LSA 0 Flood list length 0 Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 36 OSPF Database 3600-g1#sh ip ospf data OSPF Router with ID (30.8.1.1) (Process ID 1) Router Link States (Area 0) Link ID 30.8.1.1 ADV Router 30.8.1.1 Age 1592 Seq# Checksum Link count 0x800001D0 0xA180 0 Router Link States (Area 8) Link ID ADV Router Age Seq# Checksum Link count 30.8.1.1 30.8.1.1 1592 0x8000023F 0xC782 1 30.8.1.2 30.8.1.2 298 0x800003D1 0x2967 2 30.8.3.2 30.8.3.2 666 0x800002B8 0xE52B 1 Net Link States (Area 8) Link ID ADV Router Age 30.8.1.2 30.8.1.2 299 30.100.1.2 30.8.3.2 666 Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. Seq# Checksum 0x80000203 0x4153 0x8000027A 0x10AB CISCO CONFIDENTIAL 37 OSPF Database GSR-3#show ip ospf database database-summary OSPF Router with ID (10.10.128.3) (Process ID 100) Area 0 database summary LSA Type Count Router 63 Network 4 Summary Net 30 Summary ASBR 0 Type-7 Ext 0 Opaque Link 0 Opaque Area 0 Subtotal 97 Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. Delete 0 0 0 0 0 0 0 0 Maxage 0 0 0 0 0 0 0 0 CISCO CONFIDENTIAL 38 OSPF Neighbor GSR-3#sh ip ospf neighbor Neighbor ID 10.64.1.2 10.10.128.1 10.10.128.2 10.10.128.4 GSR-3# Presentation_ID Pri State Dead Time Address Interface 1 FULL/DR 00:00:38 10.128.16.2 GigabitEthernet3/0 1 2WAY/DROTHER 00:00:31 10.128.1.1 Ethernet 6/0 1 FULL/BDR 00:00:36 10.128.1.2 Ethernet 6/0 1 FULL/DR 00:00:38 10.128.1.4 Ethernet 6/0 © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 39 OSPF Adjacency Changes r4-1# router ospf 1 ospf log-adjacency-changes %OSPF-5-ADJCHG: Process 1, Nbr 172.16.16.2 on Serial0.1 from FULL to DOWN, Neighbor Down %OSPF-5-ADJCHG: Process 1, Nbr 0.0.0.0 on Serial0.1 from DOWN to ATTEMPT, NBMA Start Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 40 Neighbor Details r4-1#sh ip ospf nei det Neighbor 172.16.133.5, interface address 172.16.133.5 In the area 0 via interface Ethernet0 Neighbor priority is 1, State is FULL, 6 state changes DR is 172.16.133.29 BDR is 172.16.133.6 Options is 0x2 Dead timer due in 00:00:37 Neighbor is up for 00:01:24 Index 2/2, retransmission queue length 0, number of retransmission 1 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 1, maximum is 1 Last retransmission scan time is 4 msec, maximum is 4 msec Neighbor 172.16.133.29, interface address 172.16.133.29 In the area 0 via interface Ethernet0 Neighbor priority is 1, State is FULL, 6 state changes DR is 172.16.133.29 BDR is 172.16.133.6 Options is 0x2 Dead timer due in 00:00:31 Neighbor is up for 00:01:58 Index 1/1, retransmission queue length 0, number of retransmission 2 First 0x0(0)/0x0(0) Next 0x0(0)/0x0(0) Last retransmission scan length is 1, maximum is 1 Last retransmission scan time is 0 msec, maximum is 0 msec Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 41 Show IP OSPF Interface r4-1#show ip ospf int Serial0.1 is up, line protocol is up Internet Address 172.16.7.1/24, Area 0 Process ID 1, Router ID 172.16.14.1, Network Type NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State DR, Priority 100 Designated Router (ID) 172.16.14.1, Interface address 172.16.7.1 No backup designated router on this network Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 Hello due in 00:00:12 Neighbor Count is 2, Adjacent neighbor count is 2 Adjacent with neighbor 172.16.30.1 Adjacent with neighbor 172.16.16.2 Suppress hello for 0 neighbor(s) Serial0.2 is up, line protocol is up Internet Address 172.16.14.1/24, Area 33 Process ID 1, Router ID 172.16.14.1, Network Type NON_BROADCAST, Cost: 64 Transmit Delay is 1 sec, State DR, Priority 100 Designated Router (ID) 172.16.14.1, Interface address 172.16.14.1 No backup designated router on this network Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 Hello due in 00:00:11 Neighbor Count is 1, Adjacent neighbor count is 1 Adjacent with neighbor 172.16.100.2 Suppress hello for 0 neighbor(s) Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 42 Other show Commands R6-2500#sh ip ospf database self-originate (shows the LSAs this router is generating) OSPF Router with ID (192.168.6.1) (Process ID 100) Router Link States (Area 0) Link ID ADV Router Age Seq# 773 0x8000005B 0xC608 1 Checksum Link count 192.168.6.1 192.168.6.1 Net Link States (Area 0) Link ID 135.4.1.2 ADV Router 192.168.6.1 Age 773 Seq# 0x80000056 Checksum 0x4D14 Seq# 0x80000053 Checksum Link count 0xC745 0 Router Link States (Area 5) Link ID 192.168.6.1 ADV Router 192.168.6.1 Age 264 Summary Net Link States (Area 5) Link ID 135.4.1.0 ADV Router 192.168.6.1 Age 774 Seq# Checksum 0x8000005C 0xDDFC Summary ASB Link States (Area 5) Link ID 5.5.5.5 ADV Router 192.168.6.1 Age 774 Seq# Checksum 0x8000002B 0x681B Type-5 AS External Link States Link ID 1.1.1.0 Presentation_ID ADV Router 192.168.6.1 Age 266 Seq# Checksum Tag 0x8000002C 0x31D0 0 © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 43 Other show Commands R6-2500#sh ip ospf database adv-router 5.5.5.5 (shows the LSAs neighbor is generating) OSPF Router with ID (192.168.6.1) (Process ID 100) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 5.5.5.5 5.5.5.5 1479 0x80000034 0xA52A 1 Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 1.1.1.0 5.5.5.5 1478 0x80000032 0xACCB 5.5.5.0 5.5.5.5 1478 0x80000030 0x204E 0 135.4.1.0 5.5.5.5 1478 0x80000032 0xB33B 0 0 R6-2500# Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 44 Show IP OSPF stat r4-1#sh ip ospf stat Area 0: SPF algorithm executed 16 times Area 33: SPF algorithm executed 8 times SPF calculation time Delta T Intra D-Intra Summ 3d18h 4 0 4 3d18h 8 0 4 3d18h 4 0 4 3d18h 4 0 4 3d18h 4 0 4 3d18h 4 0 4 3d17h 4 0 4 00:04:45 4 0 4 00:02:51 4 0 4 00:02:41 4 0 8 Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. D-Summ 4 0 0 0 0 0 0 8 0 8 Ext 8 8 8 8 8 8 8 8 8 8 D-Ext Total Reason 0 20 R, SN, 0 20 R, N, SN, 0 16 N, 0 20 N, SN, 0 16 R, N, 0 16 R, SN, 0 28 R, N, SN, SA, X 0 24 N, SN, 0 20 R, N, 0 28 R, SN, CISCO CONFIDENTIAL 45 OSPF issues • Number of routes in area • Number of adjacencies per router • Size of link-state database Managed with summarization and use of areas • Route summarization Pros and Cons • Reference bandwidth Ospf auto-cost Reference-bandwidth [#] • SPF calculation frequency and duration • Partitioned areas • Virtual links Transistional only! Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 46 OSPF resources • RFCs 2328: OSPF Version 2 1587: The OSPF NSSA Option 2370: Opaque LSA • Books CCIE Professional Development: Routing TCP/IP Vol 1 by Jeff Doyle • Cisco online OSPF resources OSPF Design Guide http://www.cisco.com/warp/customer/104/1.html OSPF: Frequently Asked Questions http://www.cisco.com/en/US/tech/tk365/technologies_q_and_a_item09186a0080094704.s html • Dijkstra Algorithm Applet: http://www.dgp.toronto.edu/people/JamesStewart/270/9798s/Laffra/DijkstraApplet.html Presentation_ID © 2005 Cisco Systems, Inc. All rights reserved. CISCO CONFIDENTIAL 47 Intro to OSPF © 2001, Cisco Systems, Inc.