OSPF OVERVIEW
OSPF OVERVIEW :
OSPF Is Classified As An Interior Gateway Protocol (IGP). This Means That It Distributes Routing Information Between Routers Belonging To A Single Autonomous System. The OSPF Protocol Was Developed By The OSPF Working Group Of The Internet Engineering Task Force. It Has Been Designed Expressly For The TCP/IP Internet Environment, Including Explicit Support For CIDR And The Tagging Of Externally-Derived Routing Information.OSPF Also Provides For The Authentication Of Routing Updates, And Utilizes IP Multicast When Sending/Receiving The Updates. In Addition, Much Work Has Been Done To Produce A Protocol That Responds Quickly To Topology Changes, Yet Involves Small Amounts Of Routing Protocol Traffic. Also OSPF Is An Open-Standard, Classless Routing Protocol That Converges Quickly And Uses Cost As A Metric. (Cisco IOS Automatically Associates Cost With Bandwidth.)
OSPF Uses Dijkstra’s Shortest Path First (SPF) Algorithm To Determine Its Best Path To Each Network. The First Responsibility Of A Link-State Router Is To Create A Database That Reflects The Structure Of The Network. Link State Routing Protocols Learn More Information On The Structure Of The Network Than Other Routing Protocols And Thus Can Make More Informed Routing Decisions. OSPF Routers Exchange Hellos With Each Neighbor, Learning Router Id (RID) And Cost. Neighbor Information Is Kept In The Adjacency Database. The Router Then Constructs The Appropriate Link State Advertisements (LSA), Which Include Information Such As The RIDs Of, And Cost To, Each Neighbor. Each Router In The Routing Domain Shares Its LSAs With All Other Routers. Each Router Keeps The Complete Set Of LSAs In A Table —The Link State Database (LSDB). Each Router Runs The SPF Algorithm To Compute Best Paths. It Then Submits These Paths For Inclusion In The Routing Table, Or Forwarding Database.
Also Open Shortest Path First (OSPF) Is A Link-State Routing Protocol Defined In RFC 2328. It Is Designed To Be Run As An Interior Gateway Protocol (IGP) To A Single Autonomous System (AS). In A Link-State Routing Protocol, Each Router Maintains A Database Of Router Advertisements Called Link State Advertisements (LSAs). LSAs For Routers Within The AS Consist Of A Router, Its Attached Networks, And Their Configured Costs. An OSPF Cost Is A Unitless Metric That Indicates The Preference Of Using A Link. There Are Also LSAs For Summarized Routes And Routes Outside Of The AS.
The Router Distributes Its LSAs To Its Neighboring Routers. LSAs Are Gathered Into A Database Called The Link State Database (LSDB). By Synchronizing LSDBs Between All Neighboring Routers, Each Router Has Each Other Router's LSA In Its Database. Therefore, Every Router Has The Same LSDB. From The LSDB, Entries For The Router's Routing Table Are Calculated Using The Dijkstra Algorithm To Determine The Least Cost Path, The Path With The Lowest Accumulated Cost, To Each Network In The Internetwork.
FEATURES OF OSPF
FEW OF THE IMPORTANT FEATURES OF OSPF ARE AS FOLLOWS:
◙ This Protocol Is Open, Which Means That Its Specification Is In The Public Domain. It Means That Anyone Can Implement It Without Paying License Fees. The OSPF Specification Is Published As Request For Comments (RFC) 1247.◙ OSPF Is Based On The SPF Algorithm, Which Is Also Referred To As The Dijkstra’s Algorithm, Named After The Person Credited With Its Creation.
◙ OSPF Is A Link-State Routing Protocol That Calls For The Sending Of Link-State Advertisements (LSAs) To All Other Routers Within The Same Hierarchical Area. Information On Attached Interfaces, Metrics Used, And Other Variables Are Included In OSPF LSAs. As A Link-State Routing Protocol, OSPF Contrasts With RIP, Which Are Distance-Vector Routing Protocols. Routers Running The Distance-Vector Algorithm Send All Or A Portion Of Their Routing Tables In Routing-Update Messages Only To Their Neighbors.
◙ OSPF Specifies That All The Exchanges Between Routers Must Be Authenticated. It Allows A Variety Of Authentication Schemes, Even Different Areas Can Choose Different Authentication Schemes. The Idea Behind Authentication Is That Only Authorized Router Are Allowed To Advertise Routing Information.
◙ OSPF Include Type Of Service Routing. It Can Calculate Separate Routes For Each Type Of Service (TOS), For Example It Can Maintain Separate Routes To A Single Destination Based On Hop-Count And High Throughput.
◙ OSPF Provides Load Balancing. When Several Equal-Cost Routes To A Destination Exist, Traffic Is Distributed Equally Among Them.
◙ OSPF Allows Supports Host-Specific Routes, Subnet-Specific Routes And Also Network-Specific Routes.
◙ OSPF Allows Sets Of Networks To Be Grouped Together. Such A Grouping Is Called An Area. Each Area Is Self-Contained; The Topology Of An Area Is Hidden From The Rest Of The Autonomous System And From Other Areas Too. This Information Hiding Enables A Significant Reduction In Routing Traffic.
◙ OSPF Uses Different Message Formats To Distinguish The Information Acquired From Within The Network (Internal Sources) With That Which Is Acquired From A Router Outside (External Sources).
ADDITIONAL FEATURES OF LINK-STATE ALGORITHM :
Advertise About Neighborhood : Instead Of Sending Its Entire Routing Table, A Router Sends Information About Its Neighborhood Only.Flooding: Each Router Sends This Information To Every Other Router On The Internetwork, Not Just To Its Neighbors. It Does So By A Process Of Flooding. In Flooding, A Router Sends Its Information To All Its Neighbors (Through All Of Its Output Ports). Every Router Sends Such Messages To Each Of Its Neighbor, And Every Router That Receives The Packet Sends Copies To Its Neighbor. Finally, Every Router Has A Copy Of Same Information.
Active Response : Each Router Sends Out Information About The Neighbor When There Is A Change.
Initialization : When An SPF Router Is Powered Up, It Initializes Its Routing-Protocol Data Structures And Then Waits For Indications From Lower-Layer Protocols That Its Interfaces Are Functional.
After A Router Is Assured That Its Interfaces Are Functioning, It Uses The OSPF Hello Protocol (Sends Greeting Messages) To Acquire Neighbors, Which Are Routers With Interfaces To A Common Network. The Router Sends Hello Packets To Its Neighbors And Receives Their Hello Packets. These Messages Are Also Known As Greeting Messages. It Then Prepares An LSP (Link State Packet) Based On The Results Of This Hello Protocol.
Information From Neighbors : A Router Gets Its Information About Its Neighbor By Periodically Sending Them A Short Greeting Packet (This Is Known As Hello Message Format). If Neighbor Responds To This Greeting Message As Expected, It Is Assumed To Be Alive And Functioning. If It Does Not, A Change Is Assumed To Have Occurred And The Sending Router Then Alerts The Rest Of The Network In Its Next Link state packet (LSP), About This Neighbor Being Down. These Greeting Messages Are Small Enough That They Do Not Use Network Resources To A Significant Amount, Unlike The Routing Table Updates In Case Of A Vector-Distance Algorithm.
Shortest Path Calculation: After Gathering The Link State Database, Each Router Applies An Algorithm Called The Dijkstra Algorithm To Calculate The Shortest Distance Between Any Two Nodes. The Dijkstra’s Algorithm Calculates The Shortest Path Between Two Points On A Network Using A Graph Made Up Of Nodes And Arcs, Where Nodes Are The Routers And The Network, While Connection Between Router And Network Is Refer To As Arcs.
OSPF METRIC :By Default, Cisco Assigns A Cost To Each Interface That Is Inversely Proportional To 100 Mbps (100,000,000 Bps). The Cost For Each Link Is Then Accrued As The Route Advertisement For That Link Traverses The Network.
Router(Config-Router)# Auto-Cost Reference-Bandwidth 1000
The Cost Can Also Be Manually Assigned Under The Interface Configuration Mode. The Cost Is A 16-Bit Number, So It Can Be Any Value From 1 To 65,535. Router(Config-If)# Ip Ospf Cost 27
OSPF NETWORK STRUCTURE
OSPF NETWORK STRUCTURE :
OSPF Can Operate Within A Hierarchy. The Largest Entity Within The Hierarchy Is The Autonomous System (AS), Which Is A Collection Of Networks Under A Common Administration That Share A Common Routing Strategy. OSPF Is An Intra-AS (Interior Gateway) Routing Protocol, Although It Is Capable Of Receiving Routes From And Sending Routes To Other ASs.An AS Can Be Divided Into A Number Of Areas, Which Are Groups Of Contiguous Networks And Attached Hosts. Routers With Multiple Interfaces Can Participate In Multiple Areas. These Routers, Which Are Called Area Border Routers, Maintain Separate Topological Databases For Each Area.
A Topological Database Is Essentially An Overall Picture Of Networks In Relationship To Routers. The Topological Database Contains The Collection Of LSAs Received From All Routers In The Same Area. Because Routers Within The Same Area Share The Same Information, They Have Identical Topological Databases.
The Term Domain Sometimes Is Used To Describe A Portion Of The Network In Which All Routers Have Identical Topological Databases. Domain Is Frequently Used Interchangeably With AS. An Area's Topology Is Invisible To Entities Outside The Area. By Keeping Area Topologies Separate, OSPF Passes Less Routing Traffic Than It Would If The AS Were Not Partitioned.
Area Partitioning Creates Two Different Types Of OSPF Routing, Depending On Whether The Source And The Destination Are In The Same Or Different Areas. Intra-Area Routing Occurs When The Source And Destination Are In The Same Area; Inter-Area Routing Occurs When They Are In Different Areas.
An OSPF Backbone Is Responsible For Distributing Routing Information Between Areas. It Consists Of All Area Border Routers, Networks Not Wholly Contained In Any Area, And Their Attached Routers.
OSPF SEVERAL TYPES OF AREAS
OSPF AREAS :
In A Very Large AS With A Large Number Of Networks, Each OSPF Router Must Keep The LSA Of Every Other Router In Its LSDB. Each Router In A Large OSPF AS Has A Large LSDB. The SPF Calculation Of A Large LSDB Can Require A Substantial Amount Of Processing. Also, The Resulting Routing Table Can Be Very Large, Containing A Route To Each Network In The AS.In An Effort To Reduce The Size Of The LSDB And The Processing Overhead For The SPF Tree And Routing Table Calculation, OSPF Allows The AS To Be Divided Up Into Contiguous Groups Of Networks Called Areas. Areas Are Identified Through A 32-Bit Area ID Expressed In Dotted Decimal Notation.
An Area ID Is An Administrative Identifier And Has No Relation To An IP Address Or IP Network ID. Area IDs Are Not Used To Reflect Routing Data. However, If All Of The Networks Within An Area Correspond To A Single Subnetted Network ID, The Area ID Can Be Set To Reflect The Network ID For Administrative Convenience.
Also OSPF Uses Flooding To Exchange Link-State Updates Between Routers. Any Change In Routing Information Is Flooded To All Routers In The Network. Areas Are Introduced To Put A Boundary On The Explosion Of Link-State Updates. Flooding And Calculation Of The Dijkstra Algorithm On A Router Is Limited To Changes Within An Area. All Routers Within An Area Have The Exact Link-State Database. Routers That Belong To Multiple Areas, And Connect These Areas To The Backbone Area Are Called Area Border Routers (ABR). ABRs Must Therefore Maintain Information Describing The Backbone Areas And Other Attached Areas.
BACKBONE AREA : The Design Rules For OSPF Require All Areas Be Connected Through A Single Area, Known As The Backbone Area, Or Area 0. A Router Within This Area Is Referred To As A Backbone Router.
An OSPF Internetwork, Whether Or Not It Is Subdivided Into Areas, Always Has At Least One Area Called The Backbone. The Backbone Has The Reserved Area ID Of 0.0.0.0. The OSPF Backbone Area Is Also Known As Area 0.
The Backbone Acts As A Hub For Inter-Area Transit Traffic And The Distribution Of Routing Information Between Areas. Inter-Area Traffic Is Routed To The Backbone, Then Routed To The Destination Area, And Finally Routed To The Destination Host Within The Destination.
Routers On The Backbone Also Advertise The Summarized Routes Within Their Areas To The Other Routers On The Backbone. These Summary Advertisements Are Flooded Into Area Routers.
Therefore, Each Router In An Area Has A Routing Table That Reflects The Routes Available Within Its Area And The Routes Corresponding To The Summary Advertisements Of The ABRs Of The Other Areas In The AS.
An OSPF Backbone Is Responsible For Distributing Routing Information Between Areas. It Consists Of All Area Border Routers, Networks Not Wholly Contained In Any Area, And Their Attached Routers.
So All Backbone Routers Use The Same Procedures And Algorithms To Maintain Routing Information Within The Backbone That Any Area Router Would. The Backbone Topology Is Invisible To All Intra-Area Routers, As Are Individual Area Topologies To The Backbone. Areas Can Be Defined In Such A Way That The Backbone Is Not Contiguous. In This Case, Backbone Connectivity Must Be Restored Through Virtual Links. Virtual Links Are Configured Between Any Backbone Routers That Share A Link To A Nonbackbone Area And Function As If They Were Direct Links.
Intra-Area Routing Occurs When The Source And Destination Are In The Same Area; Interarea Routing Occurs When They Are In Different Areas.
INTERNAL ROUTER : Responsible For Maintaining A Current And Accurate Database Of Every LSA Within The Area. It Is Also Responsible For Forwarding Data To Other Networks By The Shortest Path. Flooding Of LSAs Is Confined To The Area. All Interfaces On This Router Are Within The Same Area.
AREA BORDER ROUTER (ABR): An ABR Is Responsible For Connecting Two Or More Areas. It Holds A Full Topological Database For Each Area To Which It Is Connected And Sends LSA Updates Between The Areas. These LSA Updates Are Summary Updates Of The Subnets Within An Area, But Are Sent As Type 3 LSAs Only If Summarization Is Configured On The ABR.
Also Area Border Routers, Maintain Separate Topological Databases For Each Area. Area Partitioning Creates Two Different Types Of OSPF Routing, Depending On Whether The Source And The Destination Are In The Same Or Different Areas.
AUTONOMOUS SYSTEM BOUNDARY ROUTER (ASBR): An ASBR Connects To Other Routing Domains. ASBRs Are Typically Located In The Backbone Area.
DIFFERENT TYPES OF AREAS :
It Is Possible To Create An OSPF Network With Only One Area—The Backbone Area Or Area 0. In Addition To The Backbone Area, OSPF Networks Use Several Other Types Of Areas:ORDINARY OR STANDARD AREA : This Area Is Seen As An SPF Domain Unto Itself. Every Router Knows About Every Prefix In The Area, And Each Router Has The Same Topological Database.
STUB AREA : This Is An Area That Will Not Accept External Summary Routes (TYPE 5s). Type 5 LSAs Are Replaced By The ABR With A Default Route, And Internal Routers Send External Traffic To The Closest ABR. Stub Areas Are Useful Because They Protect Slower Or Less Powerful Routers From Being Overwhelmed With Routes From Outside.
TOTALLY STUBBY AREA : This Area Does Not Accept Summary LSAs From Other Areas (TYPEs 3 Or 4) Or External Summary LSAs (Type 5). Types 3, 4, And 5 LSAs Are Replaced By The ABR With A Default Route. Totally Stubby Areas Protect Internal Routers By Minimizing The Routing Table And Summarizing Everything Outside The Area With A Default Route. This Is A Proprietary Cisco Solution. Cisco Recommends This Solution Because It Keeps The Topological Databases And Routing Tables As Small As Possible.
NOT SO STUBBY AREA (NSSA): NSSAs Are Stubby Areas That Can Have ASBRs. Since Stubby Areas Do Not Support Type 5 LSAs, NSSA Uses Type 7 LSAs To Disguise External Information And The ABR Converts The Type 7 LSA To Type 5 When It Is Sent To Area 0.
Note : On Modern Routers, The Greatest Advantage Of Special Area Types Is Decreased Convergence Time.
OSPF LINK-STATE PACKETS
LINK-STATE PACKET :
The Process Of Router Flooding The Network With Information About Its Neighborhood Is Known As Advertising. The Basis Of Advertising Is A Short Packet Called A Link State Packet (LSP).An LSP Usually Contains 4 Fields:
1. The ID Of The Advertiser (Identifier Of The Router Which Advertises The Message),
2. ID Of The Destination Network,
3. The Cost,
4. And The ID Of The Neighbor Router.
There Are Different Types Of Link State Packets, Those Are What You Normally See In An OSPF Database . The Different Types Are Illustrated In The Following Diagram:
Network Links Are Generated By A Designated Router (DR) On A Segment (Drs Will Be Discussed Later). This Information Is An Indication Of All Routers Connected To A Particular Multi-Access Segment Such As Ethernet, Token Ring And FDDI (NBMA Also).
External Links Are An Indication Of Networks Outside Of The AS. These Networks Are Injected Into OSPF Via Redistribution. The ASBR Has The Task Of Injecting These Routes Into An Autonomous System.
LINK STATE DATABASE:
Every Router Receives Every LSP And Then Prepares A Database, Which Represents A Complete Network Topology. This Database Is Known As Link State Database.OSPF LINK STATE ADVERTISEMENT
LINK-STATE ADVERTISEMENT (LSA):
OSPF Is A Link-State Routing Protocol That Calls For The Sending Of Link-State Advertisements (LSAs) To All Other Routers Within The Same Hierarchical Area. Information On Attached Interfaces, Metrics Used, And Other Variables Are Included In OSPF LSAs.It Communicates The Router's Local Routing Topology To All Other Local Routers In The Same OSPF Area. (LSA Is A Basic Communication Means Of The OSPF Routing Protocol For The Internet Protocol (IP). It Communicates The Router's Local Routing Topology To All Other Local Routers In The Same OSPF Area).
Each Router Maintains A Database, Called The Link-State Database (LSDB), Containing The Latest Received LSAs. A Separate LSDB Is Maintained For Each Area Connected To The Router.
OSPF Is Designed For Scalability, So Some LSAs Are Not Flooded Out On All Interfaces, But Only On Those That Belong To The Appropriate Area. In This Way Detailed Information Can Be Kept Localized, While Summary Information Is Flooded To The Rest Of The Network. The Original IPv4-Only OSPFv2 And The Newer IPv6-Compatible OSPFv3 Have Broadly Similar LSA Types.
LSA OPERATION :
Each LSA Is Numbered With A Sequence Number, And A Timer Is Run To Age Out Old LSAs. The Default Timer Is 30 Minutes.When A LSA Is Received, It’s Compared To The LSDB. If It Is New, It Is Added To The Database, And The SPF Algorithm Is Run. If It Is From A Router ID That Is Already In The Database, The Sequence Number Is Compared, And Older LSAs Are Discarded. If It Is A New LSA, It Is Incorporated In The Database, And The SPF Algorithm Is Run. If It Is An Older LSA, The Newer LSA In Memory Is Sent Back To Whoever Sent The Old One.
OSPF Sequence Numbers Are 32 Bits. The First Legal Sequence Number Is 0×80000001. Larger Numbers Are More Recent.
The Sequence Number Changes Only Under Two Conditions:
◙ The LSA Changes Because A Route Is Added Or Deleted.◙ The LSA Ages Out. (LSA Updates Are Flooded Within The Area Every Half Hour, Even If Nothing Changes.)
The Command Show IP OSPF Database Shows The Age (In Seconds) And Sequence Number For Each Router.
LSDB OVERLOAD PROTECTION :
Because Each Router Sends An LSA For Each Link, Routers In Large Networks Might Receive—And Must Process—Numerous LSAs. This Can Tax The Router’s CPU And Memory Resources, And Adversely Affect Its Other Functions. LDSB Overload Protection Monitors The Number Of LSAs Received And Placed Into The LSDB. If The Specified Threshold Is Exceeded For One Minute, The Router Enters The “Ignore” State By Dropping All Adjacencies And Clearing The OSPF Database. The Router Resumes OSPF Operations After Things Have Been Normal For A Specified Period. Be Careful Because This Feature Disrupts Routing When Invoked.Configure LSDB Overload Protection With The OSPF Router Process Command Max-LSA Maximum-Number [Threshold-Percentage] [Warningonly][Ignore-Time Minutes] [Ignore-Count Number] [Reset-Time Minutes].
OSPF LSA TYPES
LSA TYPES :
OSPF Uses Different Types Of LSAs To Advertise Different Types Of Routes, Such As Internal Area Or External Routing Domain. Many Of These Are Represented In The Routing Table With A Distinctive Prefix.Link-State Advertisements Are Used To List Available Routes. The Six Most Common LSA Types Are Described Here :
ROUTER LINK LSA (TYPE 1): Each Router Generates A Type 1 LSA That Lists Its Neighbors And The Cost To Each. Types 1 And 2 Are Flooded Throughout An Area And Are The Basis Of SPF Path Selection.NETWORK LINK LSA (TYPE 2): A Type 2 LSA Is Sent Out By The Designated Router And Lists All The Routers On The Segment It Is Adjacent To. Types 1 And 2 Are Flooded Throughout An Area And Are The Basis Of SPF Path Selection.
NETWORK SUMMARY LINK LSA (TYPE 3): ABRs Generate This LSA To Send Between Areas. The LSA Lists Prefixes Available In A Given Area. If Summarization Happens Within OSPF, Summarized Routes Are Propagated Using Type 3 LSAs.
AS EXTERNAL ASBR SUMMARY LINK LSA (TYPE 4): ASBRs Produce This LSA To Advertise Their Presence. Types 3 And 4 Are Called Inter-Area LSAs Because They Are Passed Between Areas.
EXTERNAL LINK LSA (TYPE 5): This LSA Is Originated By ASBRs And Flooded Throughout The AS. Each External Advertisement Describes A Route External To OSPF. Type 5 LSAs Can Also Describe Default Routes Out Of The AS.
NSSA EXTERNAL LSA (TYPE 7): Type 7 LSAs Are Created By An ASBR Residing In A Not-So-Stubby Area (NSSA). Stubby Areas Do Not Allow Type 5 LSAs, So A Type 7 Is A Type 5 Tunneled Through The NSSA. It Is Converted Into A Type 5 LSA At The ABR.
Note : LSA Type 6: Is Defined As A Group Membership LSA Multicast LSA. Used In Multicast OSPF Operations.
LSA Type 8: Is Defined As A External Attribute LSA Used In OSPF And BGP Interworking.
LSA Types 9 To 11: Defined As Opaque LSAs And Are Reserved For Future Expansion. Used For Specific Applications, Such As OSPF And MPLS Interworking.
◙ - ► TYPE 8 : A link-local only LSA for OSPFv3 For IPv6. A Type 8 LSA Is Used To Give Information About Link-Local Addresses And A List Of IPv6 Addresses On The Link. In OSPFv2, However, The Type 8 Was Originally Intended To Be Used As A So-Called External-Attributes-LSA For Transit Autonomous Systems Where OSPFv2 Could Replace The Internal Border Gateway Protocol (IBGP). In These Networks, The BGP Destinations Would Be Carried In LSA Type 5 While Their BGP Attributes Would Be Inserted Into LSA Type 8. Most Ospfv2 Implementations Never Supported This Feature.
◙ - ► TYPE 9 : A LINK-LOCAL "Opaque" LSA (Defined By RFC2370) In OSPFv2 And The Intra-Area-Prefix LSA In OSPFv3. It Is The Ospfv3 LSA That Contains Prefixes For Stub And Transit Networks In The Link-State ID.
◙ - ► TYPE 10: - An Area-Local "Opaque" LSA As Defined By RFC2370. Opaque LSAs Contain Information Which Should Be Flooded By Other Routers Even If The Router Is Not Able To Understand The Extended Information Itself. Typically Type 10 LSAs Are Used For Traffic Engineering Extensions To OSPF, Flooding Extra Information About Links Beyond Just Their Metric, Such As Link Bandwidth And Color.
◙ - ► TYPE 11: An AS "Opaque" LSA Defined By RFC 5250, Which Is Flooded Everywhere Except Stub Areas. This Is The Opaque Equivalent Of The Type 5 External LSA.
The Opaque LSAs, Types 9, 10, And 11, Are Designated For Upgrades To OSPF For Application-Specific Purposes.
For Example, OSPF-TE Has Traffic Engineering Extensions To Be Used By RSVP-TE In Multiprotocol Label Switching (MPLS). Opaque LSAs Are Used To Flood Link Color And Bandwidth Information. Standard LSDB Flooding Mechanisms Are Used For Distribution Of Opaque LSAs. Each Of The Three Types Has A Different Flooding Scope.
For All Types Of LSAs, There Are 20-Byte LSA Headers. One Of The Fields Of The LSA Header Is The Link-State ID.
ABR LSA PROPAGATION
ABR LSA PROPAGATION :
When A Router Is Configured As An ABR, It Generates Summary LSAs And Floods Them Into The Backbone Area. Adjacencies Within An Area Are Advertised Using Type 1 Or Type 2 LSAs, And These Prefixes Are Passed To The Backbone Using Type 3 Summaries. These Summaries Are Then Injected By Other ABRs Into Their Own Areas (Except For Totally Stubby Areas).External Routes And Summaries From Other Areas Are Received By The ABR And Passed Back Into The Local Area.
OSPF PATH SELECTION BETWEEN AREAS :
The Local Routing Table On A Router Depends On Its Position In The Network And The Type Of Area It Is In. If There Are Routes With Different Routing Information Sources To The Same Destination, The Router Chooses The Path With The Lowest Administrative Distance. If Both Are OSPF, OSPF Will Select Lower Type Advertisements First And Choose Lower Costs To Break Ties. OSPF, Like All IP Routing Protocols On Cisco IOS, Is Capable Of Load-Balancing And Will Automatically Distribute The Load Over Four Equal-Cost Paths.REMEMBER THE SEQUENCE OF EVENTS :
1. The Router Receives LSAs.2. The Router Builds The Topological Database.
3. The Router Runs The Dijkstra Algorithm, From Which The Shortest Path Is Chosen And Entered Into The Routing Table.
Thus, The Routing Table Is The Conclusion Of The Decision-Making Process. The Routing Table Displays Information On How That Decision Was Made By Including The Metric For Each Route. This Enables You To View The Operation Of The Network.
Different LSAs Are Weighted Differently In The Decision-Making Process. It Is Preferable To Take An Internal Route (Within The Area) To A Remote Network Rather Than To Traverse Multiple Areas Just To Arrive At The Same Place. Not Only Does Multiple-Area Traveling Create Unnecessary Traffic, But It Can Also Create A Loop Within The Network.
The Routing Table Reflects The Network Topology Information And Indicates Where The Remote Network Sits In Relation To The Local Router.
CALCULATING THE COST OF A PATH TO ANOTHER AREA
OSPF Calculates The Costs Of Paths To Other Areas Differently Than It Calculates Paths To Other Routing Domains. The Path To Another Area Is Calculated As The Smallest Cost To The ABR, Added To The Smallest Cost Across The Backbone. Thus, If There Were Two Paths From The ABR Into The Backbone, The Shortest (Lowest-Cost) Path Would Be Added To The Cost Of The Path To The ABR.External Routes Are Routes From Another Routing Domain. External Routes Discovered By OSPF Can Have Their Cost Calculated In One Of Two Ways:
E1— The Cost Of The Path To The ASBR Is Added To The External Cost To Reach The Next-Hop Router Outside The AS.
E2 (Default)— The External Cost Of The Path From The ASBR Is All That Is Considered In The Calculation.
E2 Is The Default External Metric, But E1 Is Preferred Over E2 If Two Equal-Cost Paths Exist. E2 Is Useful If You Do Not Want Internal Routing To Determine The Path. E1 Is Useful When Internal Routing Should Be Included In Path Selection.
When You Look At The Routing Table By Using The Show Ip Route Command, The First Column Indicates The Source Of The Information. Typically, This Is Just The Routing Protocol The Route Was Learned From. With OSPF, However, It Includes The LSA Type That Provided The Path.
SUMMARY OF OSPF:
OSPF Terms And Terminology :
1. Link: Network Communication Channel Consist Of A Circuit Or Transmission Path.
2. Link State: The Statistics Of Link Between Routers, In Other Words A Interface Of A Router And Its Relationship To Its Neighbor Router.
3. Topology Of LSDB (Link State Database): A List Of Information About All Networks. All Routers With Same Area Must Have Same LSDB.
4. Area: A Collection Of Network And Router Having Same Logical Boundary. Area Provides OSPF A 2 Layer Hierarchical Concept.
a) Area 0: Known As Backbone Of Area. It Is The Area Which Acts Like A Transit To All Other Area.
b) Off Backbone Area: Areas Which Must Be Connected With Area 0. It Is A Logically Or Physical Ranges Between Area 1 To Area Infinite (∞). Off Backbone Cannot Communicate Each Other Without Traversing Area 0.
5. OSPF Cost: OSPF Cost Is The Value Assign To A Link As Routing Metric. OSPF Cost Is Calculate As 108/Bandwidth Of Link In Bps (Cumulative).
6. Router ID: Router ID Is A Identification Tag Used By OSPF And EIGRP. Normally, It Is The Highest Loopback Interface IP, If Loopback Is Not Configured Then The Highest Physical Interface IP Will Be The Router ID.
7. Election Criteria DR/BDR:
a) Highest Router Interface Priority Will Be The DR. Priority Can Be Assign From 0 To 255. Where 0 Is Not Eligible For DR/BDR Election, 1 Is Default Priority, 255 Is The Highest Priority.
b) In Case Of Tie Then Highest Router ID Will Be DR.
8. OSPF Packet Type:
a) HELLO Packet - Discover Neighbor And Built Adjacency Between Them. Maintain Neighbor Relationship.
b) DBD (Database Description) – Check For Database Synchronization Between Routers.
c) LSR (Link State Request) – Request Specific Link State Records From Another Router.
d) LSU (Link State Update) – Sends Specific Requested Link State Records From Another Router.
e) LSACK (Link State Acknowledgement) – The Other Packet Types.
9.The Data Field Contains Different Information Depending In The OSPF Packet Type:
a) Hello Packet Contains A List Of Known Neighbor.
b) DBD Packet Contains A Summary Of The LSDB Among The Number Of The Field.
c) LSR Packet Contains The Type Of LSU Needed And The Router ID Of The Router That Has The Need Of The LSU.
d) LSU Packet Contains The Full LSA Entries.
e) LSACK Packet Contains Null In This Field.
10. OSPF Neighbor Adjacency Parameters. Same Following Parameters Must Match To Became OSPF Neighbor:
a) Hello And Dead Interval Timer.
b) Area IDs.
c) Authentication Type And Password (If Configured).
d) Area Stub Flag – Which Indicates The Type Area Stub.
11. OSPF Area Characteristic :
a) Minimizing Routing Table.
b) Localized Impact Of A Topology Change.
c) Detail LSA Flooding Stops At The Area Boundary.
d) Required Hierarchical Network Design.
12. OSPF Route Types:
a) Internal Router – Router That Have All Their Interface In The Same Area And Has Same LSDB.
b) Backbone Router – Router That Are Situated On The Backbone And Have At Least One Interface Connected To Area 0.
c) ABR (Area Border Router) – Router That Have Interfaces Attached To Multiple Areas, Maintain Separate LSDB For Each Area To Which They Comes. ABRs Are The Exits Point Of Area.
d) ASBR (Autonomous System Boundary Router) – Router That Have At Least One Interface Attached To An Entire Router Domain (A Network Running Different Routing Protocol Other Then OSPF Known As Different AS). ASBR Can Impact As Non OSPF Network Into The OSPF Network.
13. Type Of Areas:
1. Backbone Area: Known As Area 0. It Is The Area Which Acts Like A Transit To All Other Area.
2. Off Backbone Area: Areas Which Must Be Connected With Area 0. Logically Or Physical Ranges Between Area 1 To 4294967295. Off Backbone Cannot Communicate Each Other Without Traversing Area 0.
Area Types Depend Upon The Characteristic Of The Internal Router Administrative Privilege And Accommodation Of Redistributed Route.
Based On The Information Area Can Be Of Three Types.
a. Stub Area – Does Not Accept Information About External Routes To The OSPF Domain, Such As Route From Non OSPF Sources (Other Routing Protocol). These Mean That No Type 5 LSA Will Be Known Inside This Area And Consequently Type 4 LSA Is Unnecessary. ABRs At The Age Of The Stub Area Are Used Type 3 LSA To Advertise A Single Default Route Into The All Internal Routers Within The Stub Area, So That If The Router Need To Route To The Network Outside Of The OSPF Area Will Use Default Route.
b. Not So Stubby Area (NSSA) – An NSSA Is Another Area To The OSPF Area Terminology Which Offers The Benefit That Are Similar To The Stub Or Totally Stubby Area, But Also All External Route To Be Advertise Into The OSPF Domain. These Forms Of NSSA Allow ASBR (Redistribution Point).
The ASBR Originated Type 7 LSA To Advertise The External Distribution. Type 7 LSAs Are Flooded Throughout The NSSA But Are Blocked By The ABR.
The ABR Convert The Type 7 LSA Into A Type 5 LSA Which Is Propagated Through The OSPF Domain.
c. Totally Stubby Area – These Type Of Area Is Even Restricted Than Stubby Area. The Internal Router Can Communicate, Within Their Networks, Within Their Area Via OSPF Routing. But, Any Communication Beyond The Area Must Be Communicated Via Default Route. Totally Stubby Cannot Contain The ASBR. Except That The ASBR May Also Be ASBR.
OSPF Not-So-Stubby (NSSA):
The OSPF Not-So-Stubby Area (NSSA) Feature Is Described By RFC 1587 And Is First Introduced In Cisco IOS Software Release 11.2. It Is A Non-Proprietary Extension Of The Existing Stub Area Feature That Allows The Injection Of External Routes In A Limited Fashion Into The Stub Area.
Redistribution Into An NSSA Area Creates A Special Type Of Link-State Advertisement (LSA) Known As Type 7, Which Can Only Exist In An NSSA Area. An NSSA Autonomous System Boundary Router (ASBR) Generates This LSA And An NSSA Area Border Router (ABR) Translates It Into A Type 5 LSA, Which Gets Propagated Into The OSPF Domain. The Network Diagram Demonstrates This Principle.
14. OSPF Virtual Link :
Virtual Link Is A Link That Allows Distinguish Area 0 To Be Connected A Disconnecting Area To Be To Be Connecting With Area 0 Via A Transit Area. [Note: Virtual Link Should Not Be Use As Primary Design; Rather It Should Be Use Only For Specific Cases, Such As Temporary Communication Or Backup For Failure.
The Hello Protocol Works Over The Virtual Link As It Does Over Standard Link In 10 Second Interval, However LSA Updates Works Differently On Virtual Link And LSA Usually Refresh Every 30 Munities But, LSAs Learn Through Virtual Link Have “Do Not Age (DNA)” Option Set. So, The LSA Does Age Out. DNA Is Required To Prevent Excessive Flooding Over The Virtual Link.
15. OSPF Route Summarization :
In OSPF Intra Area Route Summarization Is Not Possible But Inter Area (Within The Same Area) Route Summarization Is Possible And External Route Summarization Is Possible.
Inter Area Route Summarization Is Always Occur On An ABR. We Have To Use “Area Range” Command To Instruct The ABR To Summarized Route For A Specific Area Before Injection Them.
External Route Summarization Is Always Occur In The ABR With The Help Of “Summary-Address” Command Which Instruct The ASBR To Summarization To Summarized External Route Before Inject Them Into OSPF Domain As Type 5 External LSA.
16. Default Route Inclusion :
A Default Route While Include In OSPF Domain Is Injected As An LSA Type 5, Default Route Distribution Is Not On By Default In OSPF We Have To Issue The “Default-Information Originated” Command Under The OSPF Routing Process.
17.OSPF NETWORK TYPES :
OSPF Type Of Network To Which The OSPF Interface Is Connected. One Of The Following OSPF Network Types Must Be Selected When Configuring An Interface On An OSPF Router.
Broadcast A Network That Can Connect More Than Two Routers With A Hardware Broadcast Facility Where A Single Packet Sent By A Router Is Received By All Routers Attached To That Network. Ethernet, Token Ring, And FDDI Are Broadcast Networks.
OSPF Messages Sent On Broadcast Networks Use IP Multicast Addresses.
Point-To-Point A Network That Can Connect Only Two Routers. Leased-Line WAN Links Such As Dataphone Digital Service (DDS) And T-Carrier Are Point-To-Point Networks. OSPF Messages Sent On Point-To-Point Networks Use IP Multicast Addresses.
Non-Broadcast Multiple Access A Network That Can Connect More Than Two Routers But Has No Hardware Broadcast Facility. X.25, Frame Relay, And ATM Are Non-Broadcast Multiple Access (NBMA) Networks. Because Multicasted OSPF Messages Do Not Reach All The OSPF Routers On The Network, OSPF Must Be Configured To Unicast To The IP Addresses Of The Routers On The NBMA Network.
1. OSPF-Speaking Routers Send Hello Packets Out All OSPF-Enabled Interfaces. If Two Routers Sharing A Common Data Link Agree On Certain Parameters Specified In Their Respective Hello Packets, They Will Become Neighbors.
2. Adjacencies, Which Can Be Thought Of As Virtual Point-To-Point Links, Are Formed Between Some Neighbors. OSPF Defines Several Network Types And Several Router Types. The Establishment Of An Adjacency Is Determined By The Types Of Routers Exchanging Hellos And The Type Of Network Over Which The Hellos Are Exchanged.
3. Each Router Sends Link-State Advertisements (LSAS) Over All Adjacencies. The LSAs Describe All Of The Router's Links, Or Interfaces, The Router's Neighbors, And The State Of The Links. These Links Might Be To Stub Networks (Networks With No Other Router Attached), To Other OSPF Routers, To Networks In Other Areas, Or To External Networks (Networks Learned From Another Routing Process). Because Of The Varying Types Of Link-State Information, OSPF Defines Multiple LSA Types.
4. Each Router Receiving An LSA From A Neighbor Records The LSA In Its Link-State Database And Sends A Copy Of The LSA To All Of Its Other Neighbors.
5. By Flooding LSAs Throughout An Area, All Routers Will Build Identical Link-State Databases.
6. When The Databases Are Complete, Each Router Uses The SPF Algorithm To Calculate A Loop-Free Graph Describing The Shortest (Lowest Cost) Path To Every Known Destination, With Itself As The Root. This Graph Is The SPF Tree.
7. Each Router Builds Its Route Table From Its SPF Tree.
This Fundamental Procedure Of Calculating Routes From The Link-State Database, Rather Than By Exchanging Routes With Neighbors, Has Repercussions For Route Filtering.
When All Link-State Information Has Been Flooded To All Routers In An Area And Neighbors Have Verified That Their Databases Are Identicalthat Is, The Link-State Databases Have Been Synchronizedand The Route Tables Have Been Built, OSPF Is A Quiet Protocol.
Hello Packets Are Exchanged Between Neighbors As Keepalives, And Lsas Are Retransmitted Every 30 Minutes. If The Network Topology Is Stable, No Other Activity Should Occur.
NEIGHBOR STATES The Neighboring Routers Go Through A Series Of States During The Establishment Of An Adjacency. These States In The Adjacency Relationship In Progressive Order.
OSPF Neighbors For Adjacencies : Before Any LSAs Can Be Sent, OSPF Routers Must Discover Their Neighbors And Establish Adjacencies. The Neighbors Will Be Recorded In A Neighbor Table, Along With The Link (Interface) On Which Each Neighbor Is Located And Which Contains Other Information Necessary For The Maintenance Of The Neighbor.
The Following Is A Summary Of The States An Interface Passes Through Before Becoming Adjacent To Another Router:
Down: No Information Has Been Received From Anybody On The Segment.
Attempt: On Non-Broadcast Multi-Access Clouds Such As Frame Relay And X.25, This State Indicates That No Recent Information Has Been Received From The Neighbor. An Effort Should Be Made To Contact The Neighbor By Sending Hello Packets At The Reduced Rate Pollinterval.
Init: The Interface Has Detected A Hello Packet Coming From A Neighbor But Bi-Directional Communication Has Not Yet Been Established.
Two-Way: There Is Bi-Directional Communication With A Neighbor. The Router Has Seen Itself In The Hello Packets Coming From A Neighbor. At The End Of This Stage The DR And BDR Election Would Have Been Done. At The End Of The 2way Stage, Routers Will Decide Whether To Proceed In Building An Adjacency Or Not. The Decision Is Based On Whether One Of The Routers Is A DR Or BDR Or The Link Is A Point-To-Point Or A Virtual Link.
Exstart: Routers Are Trying To Establish The Initial Sequence Number That Is Going To Be Used In The Information Exchange Packets. The Sequence Number Insures That Routers Always Get The Most Recent Information. One Router Will Become The Primary And The Other Will Become Secondary. The Primary Router Will Poll The Secondary For Information.
Exchange: Routers Will Describe Their Entire Link-State Database By Sending Database Description Packets. At This State, Packets Could Be Flooded To Other Interfaces On The Router.
Loading: At This State, Routers Are Finalizing The Information Exchange. Routers Have Built A Link-State Request List And A Link-State Retransmission List. Any Information That Looks Incomplete Or Outdated Will Be Put On The Request List. Any Update That Is Sent Will Be Put On The Retransmission List Until It Gets Acknowledged.
Full: At This State, The Adjacency Is Complete. The Neighboring Routers Are Fully Adjacent. Adjacent Routers Will Have A Similar Link-State Database.
CONCLUSION:
The Goal Of This Article Is To Give An Easy Way To Understand The “CISCO - OSPF LSA OPERATION AND ITS LSA TYPES". Hope This Article Will Help Every Beginners Who Are Going To Start Cisco Lab Practice Without Any Doubts.Some Topics That You Might Want To Pursue On Your Own That We Did Not Cover In This Article Are Listed Here, Thank You And Best Of Luck.
This Article Written Author By: Premakumar Thevathasan.CCNA, CCNP, MCSE, MCSA, MCSA - MSG, CIW Security Analyst, CompTIA Certified A+.
DISCLAIMER:
This Document Carries No Explicit OR Implied Warranty. Nor Is There Any Guarantee That The Information Contained In This Document Is Accurate. Every Effort Has Been Made To Make All Articles As Complete And As Accurate As Possible.It Is Offered In The Hopes Of Helping Others, But You Use It At Your Own Risk. The Author Will Not Be Liable For Any Special, Incidental, Consequential Or Indirect Any Damages Due To Loss Of Data Or Any Other Reason That Occur As A Result Of Using This Document. But No Warranty Or Fitness Is Implied. The Information Provided Is On An "As Is" Basic. All Use Is Completely At Your Own Risk.
Home Page Of - > The School Of Cisco Networking (SCN)
Contact Details / About Us Page
To Send Email
Window Minimize OR Window Maximize
2 comments:
Q. How often does OSPF send out link-state advertisements (LSAs)?
A. OSPF sends out its self-originated LSAs when the LSA age reaches the link-state refresh time, which is 1800 seconds.
OSPF requires every LSA to be refreshed every 1800 seconds or else
they will expire when they reach 3600 seconds.
Post a Comment