Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Open Shortest Path First
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Protocol messages== {| class="wikitable floatright mw-collapsible" style="width: 400px;" |+ OSPF v2 header format, field lengths in bytes |- ! 1 ! 1 ! 2 ! 4 ! 4 ! 2 ! 2 ! 8 |- | Version 2 | Type | Packet length | Router ID | Area ID | Checksum | AuType | Authentication |} {| class="wikitable floatright mw-collapsible" style="width: 400px; " |+ OSPF v3 header format, field lengths in bytes |- ! 1 ! 1 ! 2 ! 4 ! 4 ! 2 ! 1 ! 1 |- | Version 3 | Type | Packet length | Router ID | Area ID | Checksum | Instance ID | Reserved |} Unlike other routing protocols, OSPF does not carry data via a transport protocol, such as the [[User Datagram Protocol]] (UDP) or the [[Transmission Control Protocol]] (TCP). Instead, OSPF forms IP datagrams directly, packaging them using protocol number 89 for the [[List of IP protocol numbers|IP Protocol field]]. OSPF defines five different message types, for various types of communication. Multiple packets can be sent per frame. OSPF uses 5 packet types: * Hello * Database description * Link state request * Link state update * Link state acknowledgement === Hello Packet === {| class="wikitable floatright mw-collapsible mw-collapsed" style="width: 400px;" |+ OSPF v2 hello packet, field lengths in bytes |- ! 24 ! 4 ! 2 ! 1 ! 1 ! 4 ! 4 ! 4 ! 4 |- | rowspan="2" colspan="1" | '''Header''' |- | Network Mask | Hello Interval | Options | Router Priority | Router Dead Interval | Designated Router ID | Backup Designated Router ID | Neighbor ID |} {| class="wikitable floatright mw-collapsible mw-collapsed" style="width: 400px;" |+ OSPF v3 hello packet, field lengths in bytes |- ! 16 ! 4 ! 1 ! 3 ! 2 ! 2 ! 4 ! 4 ! 4 |- | rowspan="2" colspan="1" | '''Header''' |- | Interface ID | Router Priority | Options | Hello Interval | Router Dead Interval | Designated Router ID | Backup Designated Router ID | Neighbor ID |} OSPF's Hello messages are used as a form of greeting, to allow a router to discover other adjacent routers on its local links and networks. The messages establish relationships between neighboring devices (called adjacencies) and communicate key parameters about how OSPF is to be used in the autonomous system or area. During normal operation, routers send hello messages to their neighbors at regular intervals (the ''hello interval''); if a router stops receiving hello messages from a neighbor, after a set period (the ''dead interval'') the router will assume the neighbor has gone down. === {{anchor|Database description}} Database description (DBD) === {| class="wikitable floatright mw-collapsible mw-collapsed" style="width: 400px;" |+ OSPF v2 and v3 database description, field lengths in bytes |- ! 16 or 24 ! 2 ! 1 ! 1 ! 1 ! 4 ! Variable |- | rowspan="2" colspan="1" | '''Header''' |- | Interface MTU | Hello Interval | Options | Flags | DD sequence number | LSA Headers |} ''Database description'' messages contain descriptions of the topology of the autonomous system or area. They convey the contents of the link-state database (LSDB) for the area from one router to another. Communicating a large LSDB may require several messages to be sent by having the sending device designated as a leader device and sending messages in sequence, with the follower (recipient of the LSDB information) responding with acknowledgments. ===Link state packets === {{Main|Link-state advertisement}} {| class="wikitable floatright mw-collapsible mw-collapsed" style="width: 400px;" |+ OSPF v2 link state request, field lengths in bytes |- ! 24 ! 4 ! 4 ! 4 |- | rowspan="2" colspan="1" | '''Header''' |- | LS Type | Link State ID | Advertising Router |} {| class="wikitable floatright mw-collapsible mw-collapsed" style="width: 400px;" |+ OSPF v3 link state request, field lengths in bytes |- ! 16 ! 2 ! 2 ! 4 ! 4 |- | rowspan="2" colspan="1" | '''Header''' |- | Reserved | LS Type | Link State ID | Advertising Router |} ;Link state request (''LSR''): ''Link state request'' messages are used by one router to request updated information about a portion of the LSDB from another router. The message specifies the link(s) for which the requesting device wants more current information. {| class="wikitable floatright mw-collapsible mw-collapsed" style="width: 400px;" |+ OSPF v2 and v3 link state update packet, field lengths in bytes |- ! 24 or 16 ! 4 ! Variable |- | rowspan="2" colspan="1" | '''Header''' |- | # LSAs | List of LSAs |} ;Link state update (''LSU''): ''Link-state update'' messages contain updated information about the state of certain links on the LSDB. They are sent in response to a link state request message, and also broadcast or multicast by routers on a regular basis. Their contents are used to update the information in the LSDBs of routers that receive them. {| class="wikitable floatright mw-collapsible mw-collapsed" style="width: 400px;" |+ OSPF v2 and v3 link state acknowledgment, field lengths in bytes |- ! 24 or 16 ! Variable |- | rowspan="2" colspan="1" | '''Header''' |- | List of LSAs |} ;Link state acknowledgment (''LSAck''): ''Link-state acknowledgment'' messages provide reliability to the link-state exchange process, by explicitly acknowledging receipt of a Link State Update message. {| class="wikitable mw-collapsible" |+ class="nowrap" | OSPF link state advertisements |- ! LS type ! LS name ! Generated by ! Description |- | 1 | Router-LSAs | Each internal router within an area |[[File:OSPF-type 1 figur.drawio.png|200px|frameless|right]] The link-state ID of the type 1 LSA is the originating router ID. Router-LSAs, describe the following types of interfaces: * Point-to-point connection to another router * Connection to a transit network * Connection to a stub network (Reserved in v3) * Virtual link |- | 2 | Network-LSAs | The DR | [[File:OSPF-type 2 Network-LSA figur.drawio.png|200px|frameless|right]]Originated for broadcasts and NBMA networks by the designated router. This LSA contains the list of routers connected to the network. The link-state ID of the type 2 LSA is the IP interface address of the DR. |- | 3 | Summary-LSAs | The ABR |[[File:OSPF-type3 Summary-LSAs figur.drawio.png|200px|frameless|right]]Type 3 summary-LSAs describe routes to networks. To inform other areas about inter-area routers. These routes can also be summarised. |- | 4 | ASBR-summary | The ABR |Type 4 describe routes to AS boundary routers beyond its area. The area border router (ABR) generates this LSA to inform other routers in the OSPF domain, that the matching router is an autonomous system boundary router (ASBR), so that the external LSAs (Type 5 / Type 7) it sent may be properly resolved outside its own area. |- | 5 | AS-external-LSAs | The ASBR |[[File:OSPF-Type-4 & Type-5 figur.drawio.png|200px|frameless|right]]Type 5 These describe routes advertised by the ASBR. LSAs contain information imported into OSPF from other routing processes. Together with Type 4 they describe the way to an external route. |- | 7 | NSSA external link-state advertisements | The ASBR, within a not-so-stubby area | Type 7-LSAs are identical to type-5 LSAs. Type-7 LSAs are only flooded within the NSSA. At the area border router, selected type-7 LSAs are translated into type 5-LSAs and flooded into the backbone. |- | 8 | Link-LSA (v3) | Each internal router within a link | Provide it local router's link-local address to all other routers on the local network. |- | 9 | Intra-Area-Prefix-LSAs (v3) | Each internal router within an area | Replaces some of the functionality of Router-LSAs; stub network segment, or an attached transit network segment. |} ==== OSPF v2 area types and accepted LSAs ==== Not all area types use all LSA. Below is a matrix of accepted LSAs. {| class="wikitable mw-collapsible" style="text-align:center;" |+ class="nowrap" | Overview of OSPF area types and accepted LSAs: <ref>{{cite web |title=juniper configuring-ospf-areas |url=https://www.juniper.net/documentation/us/en/software/junos/ospf/topics/topic-map/configuring-ospf-areas.html#id-ospf-designated-router-overview |website=Juniper Networks |access-date=23 October 2021 |language=en |date=18 January 2021 |archive-date=October 23, 2021 |archive-url=https://web.archive.org/web/20211023171518/https://www.juniper.net/documentation/us/en/software/junos/ospf/topics/topic-map/configuring-ospf-areas.html#id-ospf-designated-router-overview |url-status=live }}</ref> <ref>{{cite web |title=OSPF Area's Explained |url=https://www.packetcoders.io/ospf-areas-explained/ |website=Packet Coders |access-date=23 October 2021 |language=en |date=23 January 2019 |archive-date=October 23, 2021 |archive-url=https://web.archive.org/web/20211023171518/https://www.packetcoders.io/ospf-areas-explained/ |url-status=live }}</ref> |- style="text-align:left;" ! ! colspan="3" style="text-align:center;" | Within a single area ! colspan="3" style="text-align:center;" | Inter area |- | style="text-align:left;" | Area type | '''LSA 1 - router''' | '''LSA 2 - network''' | '''LSA 7 - NSSA external''' | '''LSA 3 - network summary''' | '''LSA 4 - ASBR Summary''' | '''LSA 5 - AS external''' |- | style="text-align:right;"| Backbone | {{yes|Yes}} | {{yes|Yes}} | {{no| No, converted into a Type 5 by the ABR}} | {{yes|Yes}} | {{yes|Yes}} | {{yes|Yes}} |- | style="text-align:right;" | Non-backbone | {{yes|Yes}} | {{yes|Yes}} | {{no| No, converted into a Type 5 by the ABR}} | {{yes|Yes}} | {{yes|Yes}} | {{yes|Yes}} |- | style="text-align:right;" | Stub | {{yes|Yes}} | {{yes|Yes}} | {{no|No, Default route}} | {{yes|Yes}} | {{no|No, Default route}} | {{no|No, Default route}} |- | style="text-align:right;" | Totally stubby | {{yes|Yes}} | {{yes|Yes}} | {{no|No, Default route}} | {{no|No, Default route}} | {{no|No, Default route}} | {{no|No, Default route}} |- | style="text-align:right;" | Not-so-stubby | {{yes|Yes}} | {{yes|Yes}} | {{yes|Yes}} | {{yes|Yes}} | {{no|No, Default route}} | {{no|No, Default route}} |- | style="text-align:right;" | Totally not-so-stubby | {{yes|Yes}} | {{yes|Yes}} | {{yes|Yes}} | {{no|No, Default route}} | {{no|No, Default route}} | {{no|No, Default route}} |}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)