0323FMf.book Page i Wednesday, March 12, 2003 9:41 AM OSPF Network Design Solutions Second Edition Thomas M Thomas II, CCIE No 9360 Cisco Press Cisco Press 201 West 103rd Street Indianapolis, IN 46290 USA 0323FMf.book Page ii Wednesday, March 12, 2003 9:41 AM ii OSPF Network Design Solutions, Second Edition Thomas M Thomas II Copyright© 2003 Cisco Systems, Inc Published by: Cisco Press 201 West 103rd Street Indianapolis, IN 46290 USA All rights reserved No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without written permission from the publisher, except for the inclusion of brief quotations in a review Printed in the United States of America First Printing April 2003 Library of Congress Cataloging-in-Publication Number: 2001095162 ISBN: 1-58705-032-3 Warning and Disclaimer This book is designed to provide information about the Open Shortest Path First (OSPF) protocol Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied The information is provided on an “as is” basis The authors, Cisco Press, and Cisco Systems, Inc shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book or from the use of the discs or programs that may accompany it The opinions expressed in this book belong to the author and are not necessarily those of Cisco Systems, Inc Trademark Acknowledgments All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized Cisco Press or Cisco Systems, Inc cannot attest to the accuracy of this information Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark Feedback Information At Cisco Press, our goal is to create in-depth technical books of the highest quality and value Each book is crafted with care and precision, undergoing rigorous development that involves the unique expertise of members from the professional technical community Readers’ feedback is a natural continuation of this process If you have any comments regarding how we could improve the quality of this book, or otherwise alter it to better suit your needs, you can contact us through email at feedback@ciscopress.com Please make sure to include the book title and ISBN in your message We greatly appreciate your assistance 0323FMf.book Page iii Wednesday, March 12, 2003 9:41 AM iii Publisher Editor-In-Chief Cisco Representative Cisco Press Program Manager Manager, Marketing Communications, Cisco Systems Cisco Marketing Program Manager Executive Editor Acquisitions Editor Production Manager Development Editor Project Editor Copy Editor Technical Editors Team Coordinator Book Designer Cover Designer Indexer John Wait John Kane Anthony Wolfenden Sonia Torres Chavez Scott Miller Edie Quiroz Brett Bartow Amy Moss Patrick Kanouse Christopher Cleveland San Dee Phillips Progressive Publishing Alternatives Henry Benjamin, Matthew Birkner, Rick Burts, Daniel Golding, John Hammond, Cary Riddock Tammi Ross Gina Rexrode Louisa Adair Tim Wright 0323FMf.book Page iv Wednesday, March 12, 2003 9:41 AM iv About the Author Thomas M Thomas II is a self-proclaimed Network Emergency Repair Dude, or NERD for short, and a country boy who is CCIE No 9360 as well as being a certified Cisco Systems instructor and holding CCNP, CCDA, and CCNA certifications and claims he never works because he loves what he does Tom is the founder of NetCerts.com (now CCPrep.com) and the International Network Resource Group (www.inrgi.net ) where he remains on the board of directors in an advisory capacity, providing vision and focus He was previously an Instructor for Chesapeake Computer Consultants, Inc (CCCI), and a course developer for Cisco Systems He has also authored the first edition of OSPF Network Design Solutions and a variety of other networking books designed to help his fellow engineers Tom is currently working as a senior network consultant designing and implementing Voice-over-IP and Data networks wherever he can as a part of US Networks, Inc (www.usnetworksinc.com) Tom currently lives in Raleigh, NC, with his family, and although he is not in the country, he humorously observes that you can see it from his home About the Technical Reviewers Henry Benjamin , CCIE No 4695, holds three CCIE certifications (Routing and Switching, ISP Dial, and Communication and Services) Formerly with the Cisco Systems CCIE global team, Henry is now an independent consultant for a large security firm in Australia He has served as a proctor for the CCIE Lab exams and is the author of CCNP Practical Studies: Routing from Cisco Press and CCIE Routing and Switching Exam Cram from Coriolis Matthew H Birkner, CCIE No 3719, is a technical leader at Cisco Systems, specializing in IP and MPLS network design He has influenced multiple large carrier and enterprise designs worldwide Matt has spoken at Cisco Networkers on MPLS VPN technologies in both the United States and EMEA over the past few years Matt, a “Double CCIE,” authored the Cisco Press book, Cisco Internetwork Design Matt holds a B.S.E.E from Tufts University, where he majored in electrical engineering Rick Burts, CCIE No 4615, has over 20 years experience with computers and computer networks Rick is a certified Cisco Systems instructor and a CCIE (Routing/Switching) He has taught a variety of Cisco courses and helped develop an OSPF course for Mentor Technologies Rick is a consultant and has helped many customers with OSPF as their network routing protocol He is a senior consultant with Chesapeake NetCraftsmen (www.netcraftsmen.net) In his current position, Rick deals with network design, implementation, and troubleshooting issues and teaches a few courses Daniel L Golding is peering manager in America Online’s Internet Architecture group Dan is responsible for ensuring worldwide Internet connectivity for all AOL Time Warner subscribers and properties His particular areas of expertise include internetwork peering and routing policy design He has a long history of involvement with various Internet service providers, particularly in the area of backbone engineering Dan is also a frequent speaker at North American Network Operator’s Group (NANOG) meetings and has been a network engineer for over six years John Hammond has been an instructor and course developer for Juniper Networks for the past two years Prior to that he was a member of the teaching staff of Chesapeake Computer Consultants, Inc., a Cisco Training Partner John has been involved in many aspects of networks since 1990 Cary Riddock, CCNP, CSS1, has worked as an network engineer for some of the largest companies in Houston, Texas and Central Florida over the last six years He is very active in the IT Security Field and is currently pursuing CCSP and CISSP certifications His resume includes co-authoring MCNS for Cisco Press and is a contributing author for various network security publications 0323FMf.book Page v Wednesday, March 12, 2003 9:41 AM v Dedications I want to dedicate this book to my family for their ever-faithful support and understanding during the many nights and weekends I spent writing An extra special thank you goes to my wife Rose, daughter Rebekah, and son Daniel who never voiced anything but encouragement and support Without the support of my family and their faith in me I would never have been able to completely rewrite this book I had my faith in the Lord and the knowledge that my family knew I could improve upon my book in this new edition to keep me going I want to reaffirm a few words of special meaning to my wife and I who have been married for over 15 years… Always Forever Endlessly Until Eternity Acknowledgments I am very grateful to the group of talented people that were assembled to make this book a reality Through their knowledge, dedication, and hard work, this book has become more than I ever thought possible The most important acknowledgment must go to my wife, Rose, who put up with me writing all night after working all day Her unwavering support was the single greatest factor in my ability to complete the book you now hold in your hands Writing this book allowed me to assemble a team of technical professionals who have helped me make this book more than I thought possible I had the privilege to be a part of an awesome team during this time Thank you all for your insight and friendship I have to recognize the extraordinary group of publishing professionals who helped guide me through the process: Amy Moss, a true and dear friend of many years now; and Chris Cleveland who is always busy but always has time to help me 0323FMf.book Page vi Wednesday, March 12, 2003 9:41 AM vi Contents at a Glance Introduction xix Part I OSPF Fundamentals and Communication Chapter Networking and Routing Fundamentals Chapter Introduction to OSPF 47 Chapter OSPF Communication 103 Part II OSPF Routing and Network Design Chapter Design Fundamentals 163 Chapter Routing Concepts and Configuration 225 Chapter Redistribution 339 Chapter Summarization 405 Part III OSPF Implementation, Troubleshooting, and Management Chapter Managing and Securing OSPF Networks 441 Chapter Troubleshooting OSPF Chapter 10 BGP and MPLS in an OSPF Network Part IV Additional OSPF Resources Appendix A OSPF RFCs Index 724 705 161 533 707 655 439 0323FMf.book Page vii Wednesday, March 12, 2003 9:41 AM vii Contents Introduction xix Part I Chapter OSPF Fundamentals and Communication Networking and Routing Fundamentals Foundations of Networking Why Was the OSI Reference Model Needed? Characteristics of the OSI Layers Understanding the Seven Layers of the OSI Reference Model Upper Layers Layer 7—Application Layer 6—Presentation 10 Layer 5—Session 10 Lower Layers 10 Layer 4—Transport 10 Layer 3—Network 11 Layer 2—Data Link 11 Layer 1—Physical 12 OSI Reference Model Layers and Information Exchange 13 Headers, Trailers, and Data 13 TCP/IP Protocol Suite 14 TCP/IP Functions 15 TCP Overview 15 IP Overview 16 Types of Network Topologies 16 Local-Area Networks 16 Wide-Area Networks 17 IP Addressing 21 Class A Addresses 22 Class B Addresses 22 Class C Addresses 23 Class D Addresses 23 Class E Addresses 23 How IP Addresses Are Used 24 Role of IP Addresses 27 How IP Addresses Are Read 27 IP Subnet Addressing 28 Subnet Masking 29 Subnetting Restrictions 31 Explaining the Need for VLSM and CIDR 31 Route Summarization 33 Classful Routing 34 Impact of Classful Routing 34 Classless Routing 34 VLSMs 35 VLSM Design Guidelines and Techniques 36 CIDR 37 Validating a CIDRized Network 37 What Do Those Slashes Mean? 38 Important CIDR Terms 38 IP Classless 39 CIDR Translation Table 39 Manually Computing the Value of a CIDR IP Prefix 40 Case Study: VLSMs 41 Route Aggregation 42 Summary 44 0323FMf.book Page viii Wednesday, March 12, 2003 9:41 AM viii Chapter Introduction to OSPF 47 What Is a Routing Protocol? 48 Basic Routing Protocol Operation 50 Link-State Versus Distance Vector Routing Protocols 51 Link-State Routing Protocols 52 OSPF Characteristics 53 Integrated Intermediate System-to-Intermediate System 54 Distance Vector Routing Protocols 55 Routing Information Protocol Characteristics 56 Conclusion 56 Selecting a Routing Protocol 57 Operational Considerations 57 Protocols Supported 57 Routing Hierarchies 58 IP Address Management 59 IP Encapsulation Support 59 Available Resources 59 Technical Considerations 60 Fast Convergence 60 Routing Updates 61 VLSM and CIDR Support 61 Load Sharing 61 Metrics 61 Scalability 62 Physical Media Support 62 Extensibility 62 Business Considerations 62 Standards 63 Multivendor Environments 63 Proven Technology 63 SPF Overview 63 SPF in Operation 64 SPF Functions 68 Full and Partial SPF Calculations 70 Verifying SPF Operation 70 OSPF Routing Hierarchy 71 Hierarchical Network Design Techniques 71 Routing Types Within an OSPF Network 72 Intra-Area Routing 72 Inter-Area Routing 72 External Routes 73 OSPF Areas 74 Characteristics of a Standard OSPF Area 74 Standard Area Design Rules 74 Area 0: The OSPF Backbone Area 75 Stub Areas 75 Not-So-Stubby Areas 76 OSPF Operational Environment 77 Types of OSPF Routers 77 Internal Routers 78 Area Border Routers 78 Autonomous System Boundary Routers 78 Backbone Routers 79 OSPF Network Types 79 Router Identification 80 Neighbors 81 Adjacencies 82 Neighbor Versus Adjacent OSPF Routers 82 Designated Routers 83 Case Study: Adding a New OSPF Router to a Network 85 0323FMf.book Page ix Wednesday, March 12, 2003 9:41 AM ix Chapter Part II Chapter Case Study: Developing the Link-State Database 88 Case Study: OSPF Network Evolution and Convergence 95 Configuring Loopback Interfaces 96 Enabling OSPF 96 Verifying OSPF Operation 97 Summary 101 OSPF Communication 103 Link-State Advertisements 103 Types of LSAs 103 Type 1: Router LSAs 104 Type 2: Network LSAs 105 Type 3: ABR Summary LSAs 107 Type 4: ASBR Summary LSAs 108 Type 5: Autonomous System External LSAs 109 Type 7: Not-So-Stubby Area LSAs 110 Type 9: Opaque LSA: Link-Local Scope 112 Type 10: Opaque LSA: Area-Local Scope 113 Type 11: Opaque LSA: Autonomous System Scope 113 LSA Operation Example 113 Link-State Database Synchronization 116 Speaking OSPF 121 Types of OSPF Packets 121 Hello Process/Protocol 122 Hello Protocol Operational Variations 124 Hello Protocol Packet Format 125 Exchange Process/Protocol 126 Flooding Process/Protocol 127 Manipulating LSAs 128 Understanding LSA Group Pacing 128 How to Configure LSA Group Pacing 130 Understanding OSPF Packet Pacing 131 Blocking LSA Flooding 131 Ignoring MOSPF LSA Packets 132 Altering LSA Retransmissions 132 Altering LSA Transmission Delay 133 Detailed Neighbor Establishment 133 Hello Protocol State Changes 133 Database Exchange State Changes 134 Case Study: OSPF Initialization 138 Case Study: Troubleshooting Neighbor Problems 149 Neighbor Stuck in Init STATE 150 Neighbor Stuck in Exstart/Exchange State 151 What’s the Solution? 156 Neighbor Stuck in 2-Way State 156 Summary 158 OSPF Routing and Network Design 161 Design Fundamentals 163 OSPF Design Guidelines 164 OSPF Design Goals 164 Functionality 165 Scalability 165 Adaptability 166 Manageability 166 Cost Effectiveness 166 0323FMf.book Page x Wednesday, March 12, 2003 9:41 AM x OSPF Network Design Methodology 167 Step 1: Analyze the Requirements 168 OSPF Deployment 169 Load Balancing with OSPF 170 OSPF Convergence 170 Step 2: Develop the Network Topology 171 Fully Meshed Topology 171 Hierarchical Topology 171 OSPF Backbone Design in the Hierarchical Model 173 Area Design in the Hierarchical Model 174 Using a Stub Area 175 Example of an OSPF Network with a Hierarchical Structure 177 Step 3: Determine the Addressing and Naming Conventions 180 Public or Private Address Space 180 Plan Now for OSPF Summarization 181 Bit Splitting (Borrowing Bits) 184 Map OSPF Addresses for VLSM 184 Discontiguous Subnets 185 Naming Schemes 186 Step 4: Provision the Hardware 186 Step 5: Deploy Protocol and Cisco IOS Software Features 187 OSPF Features 187 Cisco IOS Software Features 188 Step 6: Implement, Monitor, and Manage the Network 189 OSPF Network Scalability 189 OSPF Network Topology 190 Area Sizing 191 Determining the Number of Areas per ABR 192 Determining the Number of Areas per Router 194 Determining the Number of Neighbors per Router 194 Selecting the Designated Router 195 Fully Meshed Versus Partially Meshed Network Topology 196 Link-State Database Size Considerations 197 Determining Router Memory Requirements 197 Router CPU Requirements 199 Bandwidth Usage 199 OSPF Security 199 Area Design Considerations 200 Area Design Overview 200 Considering Physical Proximity 201 Reducing the Area Size if Links Are Unstable 201 Ensuring Contiguous Areas 201 Using Tunable OSPF Parameters 202 Naming an Area 204 Standard Area Design 205 Golden Rules of Standard Area Design 205 Backbone Area Design 205 Backbone Design Golden Rules 206 Stub Area Design 207 Stub Area Design Golden Rules 208 Stub Area Configuration 208 Totally Stubby Areas 212 Not-So-Stubby Areas 212 NSSA Implementation Considerations 214 OSPF Virtual Links: Bane or Benefit? 215 Mending a Partitioned Area 215 Ensuring a Connection to Area 216 Golden Rules of Virtual Link Design 217 Virtual Link Configuration Example 217 OSPF Design Tools 230 Altering Neighbor Cost 230 ... Page ii Wednesday, March 12, 2003 9:41 AM ii OSPF Network Design Solutions, Second Edition Thomas M Thomas II Copyright© 2003 Cisco Systems, Inc Published by: Cisco Press 201 West 103rd Street... Considerations 275 Different Network Types and OSPF 276 Configuring the Network Type 276 Broadcast Networks 277 Nonbroadcast Networks 278 Point-to-Multipoint Networks 279 Point-to-Point Networks 283 0323FMf.book... the Solution? 156 Neighbor Stuck in 2-Way State 156 Summary 158 OSPF Routing and Network Design 161 Design Fundamentals 163 OSPF Design Guidelines 164 OSPF Design Goals 164 Functionality 165 Scalability