Sei sulla pagina 1di 6

OSPF stands for Open Shortest Path First.

Definition: OSPF is a routing protocol used to determine the best route for delivering the packets
within an IP networks. It was published by the IETF to serve as an Interior Gateway Protocol
replacing RIP. The OSPF specification is published as Request For Comments (RFC) 1247.

Note that OSPF is a link-state routing protocol, whereas RIP and IGRP are distance-vector
routing protocols. Routers running the distance-vector algorithm send all or a portion of their
routing tables in routing-update messages to their neighbors.

OSPF sends link-state advertisements (LSAs) to all other routers within the same area.
Information on attached interfaces, metrics used, and other variables is included in OSPF LSAs.
OSPF routers use the SPF (Shortest Path First) algorithm to calculate the shortest path to each
node. SPF algorithm is also known as Dijkstra algorithm.

Advantages of OSPF
• OSPF is an open standard, not related to any particular vendor.
• OSPF is hierarchical routing protocol, using area 0 (Autonomous System) at the top of
the hierarchy.
• OSPF uses Link State Algorithm, and an OSPF network diameter can be much larger
than that of RIP.
• OSPF supports Variable Length Subnet Masks (VLSM), resulting in efficient use of
networking resources.
• OSPF uses multicasting within areas.
• After initialization, OSPF only sends updates on routing table sections which have
changed, it does not send the entire routing table, which in turn conserves network
bandwidth.
• Using areas, OSPF networks can be logically segmented to improve administration, and
decrease the size of routing tables.

Disadvantages of OSPF:
• OSPF is very processor intensive due to implementation of SPF algorithm. OSPF
maintains multiple copies of routing information, increasing the amount of memory
needed.
• OSPF is a more complex protocol to implement compared to RIP.

OSPF Networking Hierarchy:


As mentioned earlier, OSPF is a hierarchical routing protocol. It enables better administration
and smaller routing tables due to segmentation of entire network into smaller areas. OSPF
consists of a backbone (Area 0) network that links all other smaller areas within the hierarchy.
The following are the important components of an OSPF network:

• Areas
• Area Border Routers
• Backbone Areas
• AS Boundary Routers
• Stub Areas
• Not-So-Stubby Areas
• Totally Stubby Area
• Transit Areas

ABR: Area Border Router

ASBR: Autonomous System Boundary Router

Areas: An area consists of routers that have been administratively grouped together. Usually, an
area as a collection of contiguous IP subnetted networks. Routers that are totally within an area
are called internal routers. All interfaces on internal routers are directly connected to networks
within the area.

Within an area, all routers have identical topological databases.

Area Border Routers: Routers that belong to more than one area are called area border routers
(ABRs). ABRs maintain a separate topological database for each area to which they are
connected.

Backbone Area: An OSPF backbone area consists of all routers in area 0, and all area border
routers (ABRs). The backbone distributes routing information between different areas.

AS Boundary Routers (ASBRs): Routers that exchange routing information with routers in other
Autonomous Systems are called ASBRs. They advertise externally learned routes throughout the
AS.
Stub Areas: Stub areas are areas that do not propagate AS external advertisements. By not
propagating AS external advertisements, the size of the topological databases is reduced on the
internal routers of a stub area. This in turn reduces the processing power and the memory
requirements of the internal routers.

Not-So-Stubby Areas (NSSA): An OSPF stub area has no external routes in it. A NSSA allows
external routes to be flooded within the area. These routes are then leaked into other areas. This
is useful when you have a non-OSPF router connected to an ASBR of a NSSA. The routes are
imported, and flooded throughout the area. However, external routes from other areas still do not
enter the NSSA.

Totally Stubby Area: Only default summary route is allowed in Totally Stubby Area.

Transit Areas: Transit areas are used to pass traffic from an adjacent area to the backbone. The
traffic does not originate in, nor is it destined for, the transit area.

Link State Advertisements (LSAs):


It is important to know different Link State Advertisements (LSAs) offered by OSPF protocol.

Type 1: Router link advertisements generated by each router for each area it belongs to. Type 1
LSAs are flooded to a single area only.

Type 2: Network link advertisements generated by designated routers (DRs) giving the set of
routers attached to a particular network. Type 2 LSAs are flooded to the area that contains the
network.

Type 3/4: These are summary link advertisements generated by ABRs describing inter-area
routes. Type 3 describes routes to networks and is used for summarization. Type 4 describes
routes to the ASBR.

Type 5: Generated by the ASBR and provides links external to the Autonomous System (AS).
Type 5 LSAs are flooded to all areas except stub areas and totally stubby areas.

Type 6: Group membership link entry generated by multicast OSPF routers.

Type 7: NSSA external routes generated by ASBR. Only flooded to the NSSA. The ABR
converts LSA type 7 into LSA type 5 before flooding them into the backbone (area 0).

Area Restriction
Normal None
Stub Type 5 AS-external LSA NOT allowed
Type 5 AS-external LSAs are NOT allowed, but Type 7 LSAs that convert to Type
NSSA
5 at the NSSA ABR can traverse
Totally
Type 3, 4 or 5 LSAs are NOT allowed except the default summary route
Stubby

Having worked almost exclusively with Ethernet transport my whole career, it took me a while to really
grasp the concept of non-broadcast networks. Dynamic routing protocols, particularly OSPF, demand
familiarity with all sorts of layer two topologies, so I knew I had to better educate myself on the matter.
Fortunately, working with Dynamips and virtual frame relay networks provided the experience I needed to
feel comfortable implementing all the different OSPF network types.

OSPF addresses three classes of network (as listed in section 1.2 of RFC 2328): point-to-point,
broadcast, and non-broadcast.

Point-to-Point
This is by far the simplest network type, and serves as a convenient anchor from which to advance the
discussion. A point-to-point network is, as its name aptly describes, a link between exactly two points (or
routers). A packet sent from on of the routers will always have exactly one recipient on the local link.

Broadcast

Obviously, point-to-point links don't scale well. A much more efficient manner of connecting a large
number of devices is to implement a multiaccess segment; that is, a segment which can be accessed by
multiple end points. An Ethernet segment is an example of such a network.

Ethernet networks support broadcasts; a single packet transmitted by a device can be multiplied by the
medium (in this case an Ethernet switch) so that every other end point receives a copy. This is
advantageous not only in bandwidth savings, but also in facilitating automatic neighbor discovery.

In the example pictured above, R1 can multicast (a broadcast intended only for certain recipients) an
OSPF hello message to the link, knowing that all other OSPF routers connected to the link will receive it
and reply with their own multicast message. Consequently, neighbors can quickly identify each other and
form adjacencies without knowing addresses beforehand. Isn't that convenient?

OSPF routers on a multiaccess segment will elect a designated router (DR) and backup designated router
(BDR) with which all non-designated routers will form an adjacency. This is to ensure that the number of
adjacencies maintained does not grow too large; a network of five routers would require 20 adjacencies to
form a mesh, but only 7 when a DR and BDR are in place.

Non-Broadcast

Unfortunately, not all multiaccess technologies support broadcast transmissions. Frame relay and ATM
are probably the most common examples of non-broadcast transport, requiring individual permanent
virtual circuits (PVCs) to be configured between end points.
Notice in the frame relay topology pictured above, R1 must craft and transmit an individual packet for
every destination he wants to reach. Aside from being horribly inefficient with regard to bandwidth, this
limitation requires the router to know the addresses of his neighbors before he can communicate to them.

OSPF can operate in one of two modes across a non-broadcast network: non-broadcast multi-access
(NBMA) or point-to-multipoint. Each of these topologies tackles the absence of broadcast capability from
a different direction.

Non-Broadcast Multi-Access (NBMA)

An NBMA segment emulates the function of a broadcast network. Every router on the segment must be
configured with the IP address of each of its neighbors. OSPF hello packets are then individually
transmitted as unicast packets to each adjacent neighbor.

As in a true broadcast network, a DR and BDR are elected to limit the number of adjacencies formed.

Point-to-Multipoint

A point-to-multipoint configuration approaches the non-broadcast limitation in a different manner. Rather


than trying to emulate broadcast capability, it seeks to organize the PVCs into a collection of point-to-point
networks. Hello packets must still be replicated and transmitted individually to each neighbor, but the
multipoint approach offers two distinct advantages: no DR/BDR is needed, and the emulated point-to-
point links can occupy a common subnet.

All routers attached to a non-broadcast network must be manually configured to recognize it as a point-to-
multipoint segment:

Router(config-if)# ip ospf network point-to-multipoint [non-broadcast]

The non-broadcast parameter can be appended to the OSPF network type to force unicasting of
packets rather than relying on multicast. This might be necessary when dynamic circuits are in use.

Potrebbero piacerti anche