📄 rfc1583.txt
字号:
Network Working Group J. MoyRequest for Comments: 1583 Proteon, Inc.Obsoletes: 1247 March 1994Category: Standards Track OSPF Version 2Status of this Memo This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.Abstract This memo documents version 2 of the OSPF protocol. OSPF is a link-state routing protocol. It is designed to be run internal to a single Autonomous System. Each OSPF router maintains an identical database describing the Autonomous System's topology. From this database, a routing table is calculated by constructing a shortest- path tree. OSPF recalculates routes quickly in the face of topological changes, utilizing a minimum of routing protocol traffic. OSPF provides support for equal-cost multipath. Separate routes can be calculated for each IP Type of Service. An area routing capability is provided, enabling an additional level of routing protection and a reduction in routing protocol traffic. In addition, all OSPF routing protocol exchanges are authenticated. OSPF Version 2 was originally documented in RFC 1247. The differences between RFC 1247 and this memo are explained in Appendix E. The differences consist of bug fixes and clarifications, and are backward-compatible in nature. Implementations of RFC 1247 and of this memo will interoperate. Please send comments to ospf@gated.cornell.edu.Moy [Page 1]RFC 1583 OSPF Version 2 March 1994Table of Contents 1 Introduction ........................................... 5 1.1 Protocol Overview ...................................... 5 1.2 Definitions of commonly used terms ..................... 6 1.3 Brief history of link-state routing technology ......... 9 1.4 Organization of this document .......................... 9 2 The Topological Database .............................. 10 2.1 The shortest-path tree ................................ 13 2.2 Use of external routing information ................... 16 2.3 Equal-cost multipath .................................. 20 2.4 TOS-based routing ..................................... 20 3 Splitting the AS into Areas ........................... 21 3.1 The backbone of the Autonomous System ................. 22 3.2 Inter-area routing .................................... 22 3.3 Classification of routers ............................. 23 3.4 A sample area configuration ........................... 24 3.5 IP subnetting support ................................. 30 3.6 Supporting stub areas ................................. 31 3.7 Partitions of areas ................................... 32 4 Functional Summary .................................... 34 4.1 Inter-area routing .................................... 35 4.2 AS external routes .................................... 35 4.3 Routing protocol packets .............................. 35 4.4 Basic implementation requirements ..................... 38 4.5 Optional OSPF capabilities ............................ 39 5 Protocol data structures .............................. 41 6 The Area Data Structure ............................... 42 7 Bringing Up Adjacencies ............................... 45 7.1 The Hello Protocol .................................... 45 7.2 The Synchronization of Databases ...................... 46 7.3 The Designated Router ................................. 47 7.4 The Backup Designated Router .......................... 48 7.5 The graph of adjacencies .............................. 49 8 Protocol Packet Processing ............................ 50 8.1 Sending protocol packets .............................. 51 8.2 Receiving protocol packets ............................ 53 9 The Interface Data Structure .......................... 55 9.1 Interface states ...................................... 58 9.2 Events causing interface state changes ................ 61 9.3 The Interface state machine ........................... 62 9.4 Electing the Designated Router ........................ 65 9.5 Sending Hello packets ................................. 67 9.5.1 Sending Hello packets on non-broadcast networks ....... 68 10 The Neighbor Data Structure ........................... 69 10.1 Neighbor states ....................................... 72 10.2 Events causing neighbor state changes ................. 75 10.3 The Neighbor state machine ............................ 77Moy [Page 2]RFC 1583 OSPF Version 2 March 1994 10.4 Whether to become adjacent ............................ 83 10.5 Receiving Hello Packets ............................... 83 10.6 Receiving Database Description Packets ................ 86 10.7 Receiving Link State Request Packets .................. 89 10.8 Sending Database Description Packets .................. 89 10.9 Sending Link State Request Packets .................... 90 10.10 An Example ............................................ 91 11 The Routing Table Structure ........................... 93 11.1 Routing table lookup .................................. 96 11.2 Sample routing table, without areas ................... 97 11.3 Sample routing table, with areas ...................... 98 12 Link State Advertisements ............................ 100 12.1 The Link State Advertisement Header .................. 101 12.1.1 LS age ............................................... 102 12.1.2 Options .............................................. 102 12.1.3 LS type .............................................. 103 12.1.4 Link State ID ........................................ 103 12.1.5 Advertising Router ................................... 105 12.1.6 LS sequence number ................................... 105 12.1.7 LS checksum .......................................... 106 12.2 The link state database .............................. 107 12.3 Representation of TOS ................................ 108 12.4 Originating link state advertisements ................ 109 12.4.1 Router links ......................................... 112 12.4.2 Network links ........................................ 118 12.4.3 Summary links ........................................ 120 12.4.4 Originating summary links into stub areas ............ 123 12.4.5 AS external links .................................... 124 13 The Flooding Procedure ............................... 126 13.1 Determining which link state is newer ................ 130 13.2 Installing link state advertisements in the database . 130 13.3 Next step in the flooding procedure .................. 131 13.4 Receiving self-originated link state ................. 134 13.5 Sending Link State Acknowledgment packets ............ 135 13.6 Retransmitting link state advertisements ............. 136 13.7 Receiving link state acknowledgments ................. 138 14 Aging The Link State Database ........................ 139 14.1 Premature aging of advertisements .................... 139 15 Virtual Links ........................................ 140 16 Calculation Of The Routing Table ..................... 142 16.1 Calculating the shortest-path tree for an area ....... 143 16.1.1 The next hop calculation ............................. 149 16.2 Calculating the inter-area routes .................... 150 16.3 Examining transit areas' summary links ............... 152 16.4 Calculating AS external routes ....................... 154 16.5 Incremental updates -- summary link advertisements ... 156 16.6 Incremental updates -- AS external link advertisements 157 16.7 Events generated as a result of routing table changes 157Moy [Page 3]RFC 1583 OSPF Version 2 March 1994 16.8 Equal-cost multipath ................................. 158 16.9 Building the non-zero-TOS portion of the routing table 158 Footnotes ............................................ 161 References ........................................... 164 A OSPF data formats .................................... 166 A.1 Encapsulation of OSPF packets ........................ 166 A.2 The Options field .................................... 168 A.3 OSPF Packet Formats .................................. 170 A.3.1 The OSPF packet header ............................... 171 A.3.2 The Hello packet ..................................... 173 A.3.3 The Database Description packet ...................... 175 A.3.4 The Link State Request packet ........................ 177 A.3.5 The Link State Update packet ......................... 179 A.3.6 The Link State Acknowledgment packet ................. 181 A.4 Link state advertisement formats ..................... 183 A.4.1 The Link State Advertisement header .................. 184 A.4.2 Router links advertisements .......................... 186 A.4.3 Network links advertisements ......................... 190 A.4.4 Summary link advertisements .......................... 192 A.4.5 AS external link advertisements ...................... 194 B Architectural Constants .............................. 196 C Configurable Constants ............................... 198 C.1 Global parameters .................................... 198 C.2 Area parameters ...................................... 198 C.3 Router interface parameters .......................... 200 C.4 Virtual link parameters .............................. 202 C.5 Non-broadcast, multi-access network parameters ....... 203 C.6 Host route parameters ................................ 203 D Authentication ....................................... 205 D.1 AuType 0 -- No authentication ........................ 205 D.2 AuType 1 -- Simple password .......................... 205 E Differences from RFC 1247 ............................ 207 E.1 A fix for a problem with OSPF Virtual links .......... 207 E.2 Supporting supernetting and subnet 0 ................. 208 E.3 Obsoleting LSInfinity in router links advertisements . 209 E.4 TOS encoding updated ................................. 209 E.5 Summarizing routes into transit areas ................ 210 E.6 Summarizing routes into stub areas ................... 210 E.7 Flushing anomalous network links advertisements ...... 210 E.8 Required Statistics appendix deleted ................. 211 E.9 Other changes ........................................ 211 F. An algorithm for assigning Link State IDs ............ 213 Security Considerations .............................. 216 Author's Address ..................................... 216Moy [Page 4]RFC 1583 OSPF Version 2 March 19941. Introduction This document is a specification of the Open Shortest Path First (OSPF) TCP/IP internet routing protocol. OSPF is classified as an Interior Gateway Protocol (IGP). This means that it distributes routing information between routers belonging to a single Autonomous System. The OSPF protocol is based on link-state or SPF technology. This is a departure from the Bellman-Ford base used by traditional TCP/IP internet routing protocols. The OSPF protocol was developed by the OSPF working group of the Internet Engineering Task Force. It has been designed expressly for the TCP/IP internet environment, including explicit support for IP subnetting, TOS-based routing and the tagging of externally-derived routing information. OSPF also provides for the authentication of routing updates, and utilizes IP multicast when sending/receiving the updates. In addition, much work has been done to produce a protocol that responds quickly to topology changes, yet involves small amounts of routing protocol traffic. The author would like to thank Fred Baker, Jeffrey Burgan, Rob Coltun, Dino Farinacci, Vince Fuller, Phanindra Jujjavarapu, Milo Medin, Kannan Varadhan and the rest of the OSPF working group for the ideas and support they have given to this project. 1.1. Protocol overview OSPF routes IP packets based solely on the destination IP address and IP Type of Service found in the IP packet header. IP packets are routed "as is" -- they are not encapsulated in any further protocol headers as they transit the Autonomous System. OSPF is a dynamic routing protocol. It quickly detects topological changes in the AS (such as router interface failures) and calculates new loop-free routes after a period of convergence. This period of convergence is short and involves a minimum of routing traffic. In a link-state routing protocol, each router maintains a database describing the Autonomous System's topology. Each participating router has an identical database. Each individual piece of this database is a particular router's local state (e.g., the router's usable interfaces and reachable neighbors). The router distributes its local state throughout the Autonomous System by flooding. All routers run the exact same algorithm, in parallel. From the topological database, each router constructs a tree of shortest paths with itself as root. This shortest-path tree gives the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -