Jaycee's Networking

May 13, 2009

OSPF Overview

Filed under: IOS, OSPF — Tags: — Jaycee @ 4:56 am

1. OSPF (Open Shortest Path First) advantage:

(1) OSPF is classless- offering full CIDR and VLSM support
(2) It scales well, converges quickly when the network’s stat changes.
(3) It guarantees loop free routing.
(4) It doesn’t use a lot of network bandwidth.
(5) It supports address summarization
(6) It supports tagging of external routes.
(7) OSPF is open standard.

2. OSPF disadvantage:

(1) It could be complex.
(2) It tends to use a lot of CPU time on the router because the OSPF LSA maintenance algorithms are CPU-intensive.

=> This tendency to be a CPU hog can be controlled by restricting the number of routers per area.

3. OSPF protocol:

(1) OSPF operates directly at the IP layer using IP protocol number 89.
(2) all OSPF routers use, and DRs (Designated Routers) use

4. OSPF metric/cost:

(1) Routers distribute the individual link costs to one another.
(2) The maximum cost for an individual link is 65,536, but RFC doesn’t specify a maximum total path cost. (100Mbps/bandwidth = cost).

5. OSPF LSAs (Link State Advertisements):

(1) OSPF routers only start to exchange routing information after they have establishd a neighbor relationship.
(2) OSPF routers don’t actually exchange routing tables directly. They exchange LSAs, which describe the states of different network links. to build their own routing tables.
(3) Routing information can be summarized at the ABRs (Area Border Routers). The routers in one area don’t need to worry about the LSA information from routers in other areas, which improves network stability and convergence times. It also reduces the memory and CPU required to support OSPF on the routers.
(4) The fewer LSA you need to pass between areas, the better OSPF will scale.

LSA type Name Description
1 Router-LSA It includes information about the link states of all of a router’s interfaces. These LSAs are flooded throughout the area, but not into adjacent areas.
Type 1 LSAs contain all the link-state information.
These advertisements describes the router’s links within the area.
2 Network-LSA On NBMA and broadcast-capable network segments, the DR originates Network-LSAs. It describes the routers that are connected to this broadcast or NBMA segment. Network-LSAs are flooded throughout the area, but not into adjacent areas.
Type 2 LSAs contain network-specific information. The designated router of the OSPF network broadcasts this LSA to all area routers.
Network-LSAs are sent by DRs, and describe the routers connected to the network from which the LSA was received.
3 Summary-LSA ABR routers originate Summary-LSAs to describe inter-area routes to networks that are outside of the area but inside of the AS. They are flooded throughout an area. Type 3 LSAs are used for routes to networks.
Type 3 LSAs contain route information for internal networks. This information is broadcast by the ABR to all backbone routers.
Summary LSAs for ABRs are sent by ABRs. These advertisements describe inter-area routes fro networks. They are used to advertise summary routes.
4 Summary-LSA It’s similar to Type 3 LSAs, except that they are used for routes to ASBR routers.
Type 4 LSAs contain route information for ASBR routers.
Summary LSAs for ASBRs are sent by ASBRs and ABRs. It provides next-hop info on “how to get to that ASBR via ABR”.
5 AS-External-LSA ASBR routers originate Type 5 LSAs to describe routes to networks that are external to the AS. Type 5 LSAs are flooded throughout the AS.
Type 5 LSAs contain route information about external networks. Only ASBR routers send these LSAs.
ASE (Autonomous System External) LSAs are sent by ASBRs and ABRs. These advertisements describe networks external to the autonomous system. They are sent everywhere, except to stub area. They are external routes that are being redistributed into OSPF domain.
6 MOSPF-LSA Type 6 LSAs are used for carrying multicast routing information with MOSPF. (Cisco routers don’t support Type 6 LSAs.)
A Cisco router will ignore this type and generate a syslog entry if it does receive one. To suppress the syslog mesage, use the command ignore lsa mospf.
7 NSSA-External-LSA Type 7 LSAs are originated by ASBRs in an NSSA area. They are similar to Type 5 LSAs except that they are only flooded throughout the NSSA area. When Type 7 LSAs reach the ABR, it translates them into Type 5 LSAs and distributes them to the rest of the AS.
NSSA LSAs are sent by ABRs. Theses advertisements describe links within the NSSA.

7. OSPF Areas:

A good design should have no more than 50 routers per area (or 100 interfaces.)

Areas allow summarization of network addresses, which in turn allows for smaller routing tables.
=> Smaller routing tables means faster convergence, less routing protocol bandwidth, and better route determination.
=> However, using a large number of relatively small areas can also mean a more difficult configuration.

a. Stub Area

(1) It doesn’t allow Type 5 ASE LSAs.
(2) no O E1 or O E2 routes will be seen in the area.
(3) Stub areas see detailed routing information on all other areas, but only summary information about networks outside of the AS. ABR sends Type 3 LSA packets to summarize this information
(4) ABR connecting to stub area summarizes routes to external networks outside of the AS. All external routes are reduced to a single summary. => You cannot make connections to external networks via a stub area.
(5) Stub areas are most useful when there are many external routes, so summarizing them saves router resources.

area 1 stub

b. Totally Stub Area (TSA)

(1) It doesn’t allow Type 3, 4 or 5 LSAs, except for the default summary route (as a single Type 3 LSA message). => TSAs see only a default route, and routes local to the areas themselves.
(2) also called “stub no-summary areas”
(3) It summarize not only external routes, but also routes from other areas (inter-area routes).
(4) It’s useful in WAN situations where the overhead of maintaining and updating a large link state database is both onerous(繁重的) and unnecessary.
(5) This is a Cisco invention, so you might have problems implementing it in a multivendor network.

area 1 stub no-summary

c. Not So Stubby Areas (NSSA)

(1) No Type 5 LSAs are allowed.
(2) Type 7 LSAs that convert to Type 5 at the ABR are allowed.
(3) It’s able to connect to external networks. It acoomplishes this by introducing LSA Type 7. It’s used within the area to carry external routes that originate with ASBRs connected to this area.
(4) ABR summarizes only those external routes that are received from other areas, and therefore reached through the ABR.
(5) External routes from ASBRs inside the area are not summarized.
(6) In order to pass the internally generated external routes to the rest of the network, the ABR translates these Type 7 LSAs into Type 5 LSAs before relaying this information into Area 0.
(7) You can use NSSA areas to connect to external networks.
(8) Even a simple redistributed static route is considered an external route.
(9) If you want external routes to be available for the rest of the network, then NSSA is a good way to handle them.

area 1 nssa

d. Totally Stubby NSSA

(1) Totally Stubby NSSA = TSA + NSSA
(2) It doesn’t allow Type 3, 4, or 5 LSAs, except for the default summary route and allow Type 7 that convert to Tyep 5 at the ABR.
(3) It summarizes information from all other areas, but handling external routes like NSSA.
(4) It allows you to summarize internal routes from other areas while still allowing you to put an ASBR inside of the area.
(5) Totally Stubby NSSA area can be used as a transit area to an external network, but it can also benefit from summarization of inter-area routes.
(6) Totally Stuby NSSA area is ideal when you need to connect to an external network through an area that you would really prefer to keep stubby for performance and scaling reasons.

area 1 nssa no-summary

8. Two types of external routes:

a. The cost of a Type 1 external route is the sum of the external metric + the internal cost to reach the ASBR.

b. The cost of a Type 2 external route is just the external metric cost. OSPF doesn’t add in the cost to reach the ASBR for Type 2 external routes.

c. When making routing decisions, OSPF prefers Type 1 to Type 2 external routes.

d. You can use Type 1 external routes to ensure that every internal router selects the closest ASBR that connects to a particular external network. You might also want to setup a backup ASBR that injects Type 2 routes. The internal routers will then prefer the Type 1 routes if they are present.

9. Router ID:

a. By default, the router ID is the address of its loopback interface.

b. If no loopback address is defined, the router ID is the highest IP address of any active interface.

10. DR (Designated Router):

a. Each network segment needs a designated router before it can exchange routing information.

b. OSPF eleects a DR on each multi-access segment.When an OSPF broadcast arrives at the DR, it’s DR’s job to multicast the update to all routers within its area.

=> This keeps OSPF traffic to a minimum, because each router communicates with only the DR to get the routing information.

c. Without this design, the broadcast would have to go to eeach router, which would in turn broadcast again until every router got the message.

=> DR gives us a one-to-many relationship instead of a many-to-many relationship.

d. With DR routers, there is only ONE place to send an update and one router that updates all the ourters within the segment.


1 Comment »

  1. […] refer this  for good presentation of […]

    Pingback by Day 6 – OSPF « all things Junos. — September 12, 2011 @ 8:54 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: