Open Shortest Path First
From Free net encyclopedia
Layer | Protocols |
---|---|
Application | DNS, TLS/SSL, TFTP, FTP, HTTP, IMAP, IRC, NNTP, POP3, SIP, SMTP, SNMP, SSH, TELNET, BitTorrent, RTP, rlogin, ENRP, … |
Transport | TCP, UDP, DCCP, SCTP, IL, RUDP, … |
Network | IP (IPv4, IPv6), ICMP, IGMP, ARP, RARP, … |
Link | Ethernet, Wi-Fi, Token ring, PPP, SLIP, FDDI, ATM, DTM, Frame Relay, SMDS, … |
Open Shortest Path First (OSPF) is a link-state, hierarchical Interior Gateway Protocol (IGP) routing protocol. Dijkstra's algorithm is used to calculate the shortest path tree. It uses cost as its routing metric. A link state database is constructed of the network topology which is identical on all routers in the area.
OSPF is perhaps the most widely used IGP in large networks. It can operate securely, using MD5 to authenticate peers before forming adjacencies, and before accepting link-state advertisements. A natural successor to RIP, it was VLSM capable or classless from its inception. A newer version of OSPF (OSPFv3) now supports IPv6 as well. Multicast extensions to OSPF (MOSPF) have been defined, however these are not widely used. OSPF can "tag" routes, and propagate these tags along with the routes.
An OSPF network can be broken up into smaller networks. A special area called the backbone area forms the core of the network, and other areas are connected to it. Inter-area routing goes via the backbone. All areas must connect to the backbone; if no direct connection is possible, a virtual link may be established.
Routers in the same broadcast domain or at each end of a point to point link form adjacencies when they have discovered each other. The routers elect a designated router (DR) and backup designated router (BDR) which act as hub to reduce traffic between routers. OSPF uses both unicast and multicast to send 'hello packets' and link state updates. Multicast addresses 224.0.0.5 and 224.0.0.6 are used. In contrast to RIP or BGP, OSPF does not use TCP or UDP but uses IP directly, using IP protocol 89.
Contents |
Area types
An OSPF network is divided into areas. These are logical groupings of routers whose information may be summarized towards the rest of the network. Several "special" area types are defined:
Backbone area
The backbone area (also known as area zero) forms the core of an OSPF network. All other areas are connected to it, and inter-area routing happens via a router connected to the backbone area.
Stub area
A stub area is an area which doesn't receive external routes. External routes are defined as routes which were distributed in OSPF via another routing protocol. Therefore, stub areas typically need to rely on a default route to send traffic to routes outside the present domain.
Totally stubby area
A totally stubby area is similar to a stub area, however this area does not allow summary routes in addition to the external routes, i.e., inter-area (IA) routes are not summarized into totally stubby areas. The only way for traffic to get routed outside of the area is a default route which is the only Type-3 LSA advertised into the area. When there is only one route out of the area, fewer routing decisions have to be made by the route processor, which lowers system resource utilization.
Not-so-stubby area
Also referred to as NSSA, a not-so-stubby area is a type of stub area that can import AS external routes and send them to the backbone, but cannot receive AS external routes from the backbone or other areas. Cisco also implements a proprietary version of NSSAs called a NSSA Totally Stubby area. It takes on the attributes of a Totally Stubby area, meaning that type 3 and 4 summary routes are not flooded into this type of area.
OSPF router types
OSPF defines various router types. These are logical definitions, and a router that uses OSPF may be classified as more than one of the following types. For example, a router that is connected to more than one area, and which receives routes from a BGP process connected to another AS, is both an ABR and an ASBR.
Area Border Router
An Area Border Router (ABR) is a router that connects one or more OSPF areas to the main backbone network. It is considered a member of all areas it is connected to. An ABR keeps multiple copies of the link-state database in memory, one for each area.
Autonomous System Boundary Router
An ASBR is a router connected to more than one autonomous system (AS), and which exchanges routing information with routers in other ASs. ASBRs typically also run a non-IGP routing protocol, such as BGP. An ASBR is used to distribute routes received from other ASs throughout its own AS.
Internal router
A router is called an internal router (IR) if it only has OSPF adjacencies with routers in the same area.
Backbone router
A backbone router (BR) is a router with an interface in to the backbone area. An ABR would be a BR, although the reverse need not be true.
Designated Router
A designated router (DR) is the router elected by the network by elections. The DR is elected based on the following default criteria:
- If the priority setting on a OSPF router is set to 0, that means it can NEVER become a DR or BDR.
- When a DR fails and the BDR takes over, there is another election to see who becomes the replacement BDR.
- The router sending the Hello packets with the highest priority.
- If two or more routers tie with the highest priority setting, the router sending the Hello with the highest RID (Router ID) wins.
- (NOTE) A RID is the highest logical (loopback) IP address configured on a router, if no logical/loopback IP address is set then the Router uses the highest IP address configured on its interfaces. (e.g. 192.168.0.1 would be higher than 10.1.1.2)
- Usually the router with the second highest priority number becomes the BDR (Backup Domain Router)
- The range of priority values range from 1 - 255, with a higher value increasing it's chances of becoming DR or BDR.
- IF a HIGHER priority OSPF router comes online AFTER the election has taken place, it will not become DR or BDR until (at least) the DR and BDR fail.
DR's exist for the purpose of reducing network traffic by providing a source for routing updates, the DR maintains a complete topology table of the network and sends the updates to the other routers via multicast. This way all the routers do not have to constantly update each other, and can rather get all their updates from a single source. The use of multicasting further reduces the network load. DRs and BDRs are always setup/elected on Broadcast networks (Ethernet). DR's can also be elected on NBMA (Non-broadcast Multi-Access Networks) such as Frame Relay. DRs or BDRs do not configure on point-to-point links (such as a point-to-point WAN connection) because the bandwidth between two hosts cannot be further optimized.
Backup Designated Router
A backup designated router (BDR) is a router that becomes the designated router if the current designated router has a problem or fails.
RFC history
- 1989, October - First put forward as a proposed standard as RFC 1131.
- 1994, The OSPF NSSA Option, RFC 1587.
- 1994, March - Multicast extensions to OSPF proposed as RFC 1584.
- 1997, July - OSPF version 2, as proposed in RFC 2178
- 1998, April - OSPF version 2, updated in RFC 2328, standard 54.
- 1999, December - OSPFv3, IPv6, RFC 2740.
- 2003, January - The OSPF NSSA Option updated, RFC 3101.
External links
Information Sources
- IETF OSPF Working Group
- Design and Implementation of OpenOSPFD (Paper)
- Design and Implementation of OpenOSPFD (Presentation)
- Cisco OSPF
- Cisco OSPF Areas and Virtual Links
- OSPF Tutorial
Implementations
- OpenOSPFD daemon
- Zebra router software for Unix-like systems which supports OSPF
- Quagga a fork of Zebra
- XORP a routing suite including a limited OSPF daemonde:Open Shortest Path First
es:Open Shortest Path First fr:Open shortest path first it:Open Shortest Path First he:Open Shortest Path First nl:Open Shortest Path First ja:オープン・ショーテスト・パス・ファースト pl:OSPF pt:Open Shortest Path First ru:OSPF fi:OSPF sv:Open Shortest Path First tr:OSPF zh:开放式最短路径优先