OSPF: CONCEPTS: GENERAL PART 1


**************

TOPICS COVERED:

BASIC CHARACTERISTICS

WHY OSPF IS CALLED LINK STATE

HOW OSPF WORKS

LSA TYPES

OSPF NEIGHBORSHIP REQUIREMENT

OSPF AREA TYPES, BACKBONE AREA, CONCEPT OF ABR & ASBR


 

******************

BASIC CHARACTERISTICS

  • OSPF is a Link State Routing Protocol
  • Algorithm – Dijsktra’s SPF algorithm
  • Metric – Cost, which is based on the bandwidth of a link
  • Administrative Distance – 110
  • Process-ID number – the process-id number is declared when OSPF is started/configured and is a number from 1 to 65535. The process id number does NOT need to match to make Neighborship. This is not a condition to become Neighbor.
  • Hello Interval – Hello packets are sent every 10 seconds by default. In order for OSPF routers to establish neighbor adjacencies and exchange routing information successfully, the hello interval needs to match all OSPF routers in the OSPF area.
  • Dead Interval – The dead interval is 40 seconds by default. The dead interval should be 4 times the hello interval, and needs to match all OSPF routers in the area
  • Multiple Tables – Routing Table, Topology Table, and Neighbor Adjacency Table
  • DR and BDR Elections – In broadcast multi-access networks (Ethernet), routers in the OSPF area will elect a Designated Router (DR) and a Backup Designated Router (BDR).  Example, If there are 5 routers in a Broadcast network, one will become DR, One will become BDR

and remaining three routers will stay in DROTHER state.

 *******************

 

********************

WHY OSPF IS CALLED LINK STATE?

OSPF is a link-state protocol.

Link is simply the OSPF enabled interface on the router.

state of the link is a description of that interface and of its relationship to its neighboring routers.

A description of the interface would include, for example, the IP address of the interface, the mask, the type of network it is connected to, the routers connected to that network and so on. The collection of all these link-states would form a link-state database

Reference: OSPF Design Guide

http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/7039-1.html

 


HOW OSPF WORKS?

Each OSPF router distributes information about its local state (usable interfaces and reachable neighbors, and the cost of using each interface) to other routers using a Link State Advertisement (LSA) message. Each router uses the received messages to build up an identical database that describes the topology of the AS.

From this database, each router calculates its own routing table using a Shortest Path First (SPF) or Dijkstra algorithm. This routing table contains all the destinations the routing protocol knows about, associated with a next hop IP address and outgoing interface

 

OSPF LSA Packet Format

Reference Link

http://www.freesoft.org/CIE/RFC/1583/109.htm


 


OSPF LSA TYPES

LSA’s Importance:  LSA represent the state of the Link. State means IP address of the interface, the mask, the type of network it is connected to, the routers connected to that network and so on. The collection of all these link-states would form a link-state database. Link State Database solves the purpose of updating routing table present at the OSPF enabled routers

Depending on the communication in different scenarios, we have different LSA types. Different LSA types are generated by routers playing particular role in  OSPF.

 

” LSA DETAILS “

Updates inside the same area : LSA-1 will be generated

(Example: R1 has two interfaces on which OSPF is enabled. Then, R1 will generate two LSA-1 for each interface, which will be updated within the same area)

Updates in Broadcast type network: LSA-2 will be generated

Updates between different area: LSA-3 will be generated

Updates in case of Advertising routes from OSPF to any other protocol: LSA-4 will be generated

Updates in case of Learning routes from any other protocol into OSPF: LSA-5 will be generated

 

OSPF LSA TYPES

LSA Type     Existence                              Generated By

1                    Intra Area                             Every OSPF enabled interface on Router

2                    Intra Area                             DR

3                    Inter Area                             ABR

4                    OSPF to External redis           ABR

5                     External to OSPF redis          ASBR


 


OSPF NEIGHBORSHIP REQUIREMENT

 

OSPF NEIGHBORSHIP REQUIREMENT

1. Should have same subnet

2. Same Hello & Dead Interval

3. Authentication Pass, if configured

4. Should be part of same area

5. Should have same MTU size

************

 

************* 

AREA TYPES

OSPF is simply divided into areas to reduce the update. There is no  limitation of putting number of routers in a single area or multiple areas.

INTRA AREA: communication within the same area

INTER AREA: communication between areas

 

CONCEPT OF ABR

Example: we have 4 routers. R1, R2, R3, R4 in a network. we want to put them into two areas.  Out of four routers, atleast one has to become the ABR(Area Border Router) to have communication between two different areas.

Network can be like this:      R1(Area 0)————–(Area 0) R2(Area 1)——-(Area 1)R3(Area 1)——–(Area 1)R4

Here, R2 is acting as ABR

ABR means Router having interfaces configured in more than one area. So, R2 is acting as ABR here.

 

CONCEPT OF ASBR

ASBR: Autonomous System Border Router

Autonomous means unknown

ASBR is simply the router, which have OSPF running at one interface and any other protocol running at other interface. Any other protocol is unknown for OSPF

Example:                OSPF————-R1—————BGP

Here, R1 is ASBR

 

CONCEPT OF BACKBONE AREA

Backbone area is Area 0

Why required?

To communicate between two different areas, Backbone area(or Area 0) is must. In every area, there must be a router which is connected to Area 0. So, Area 0 is acting like a centre point for every area.

we can say, if in a OSPF network, we have more than one area, then one area must be Backbone area(or Area 0)

If we have single area in a network, then it doesn’t matter, if we have Area0 or Area 1 or any other area, as we don’t have to do any communication between area, there is only one area in the network

NOTE: Backbone area (or Area 0 )  comes into the picture, if we have more than one area in the OSPF network

OSPF AREA TYPES

We have different area types depending on the network

Depending on different area type, communication is affected between areas. This can be affected if we allow or stop LSA’s in different area types.

OSPF AREA TYPES

 

Area Type        LSA Allowed     Can Have ASBR     Configuration Command

Standard           1,2,3,4,5               Yes                           Area <Number>

Totally Stub        1,2                        No                           Area<Number> stub no-summary

Stub                 1,2,3                     No                            Area<Number> stub

Not So Stubby    1,2,3 & 7              Yes                           Area<Number> nssa

Case:To make NSSA into NSSA no-summary.Means ASBR can be present, LSA-7 can be received, so external routes received.But it will not advertise routes into other areaCommand: Area<Number> nssa no-summary
Case:In Stub and Totally stub, default route present itself to communicate with other area.There is no need to create Default RouteIn NSSA, Default route needs to be createdCommand: “default-information-originate

 ***************

 

 

 

 

 

 

Advertisements

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