CCNA4.com - Free CCNA Training & Resources
OSPF OVERVIEW Introduction
The Open Short Path First (OSPF) is defined in RFC 2328.It is an interior Gateway Protocol used to distribute routing information within a single Autonomous system. It is a most common routing protocol using by Service Providers, because unlike EIGRP it is an Open Standard protocol. Why we are calling OSPF is a link state routing protocol. Unlike RIP, OSPF is not only sending the Routing updates to its neighbors. It is sending all the information about the link like IP address of the Interface and subnet mask, the type of network it is connected to (P2P or P2Multipoint or FR) and the routers which is connected to it. The collection of these link states will form a Link state Database.
OSPF Vs RIP
In Earlier days, the most popular routing protocol is RIP. But it is only good when the network is small. It has some certain limitations which could problem in large networks. Comparison between RIP Vs OSPF is given below.
RIP has limited HOP counts. It is 16.A RIP Network spans more than 15 HOPS, considered as unreachable. RIP doesn’t support for VLSM. Periodic update of routing table consumes lots of bandwidth especially on WAN clouds. RIP Converges slower than OSPF does. RIP Network is a FLAT network. Here no concept of Areas & Boundaries & Summarization.
No Limitations on the HOP count. Can use VLSM Converges quickly Can divide into Areas. This will help us to use summarization. Allows Authentication. It uses Dijkstra’s algorithm (SPF Algorithm) Reducing the usage of BW, by sending triggered updates to announce the Network changes. Sending periodic updates on long intervals (30 Mins). Unlike RIP, OSPF doesn’t send any routing updates on periodic intervals. It will only send triggered updates. It means every time it doesn’t send full routing table to its neighbors. Whenever any changes in network, like new router added or a router removed from the network, it will send information about that particular network to its neighbor. In this document we will be learning about some following basic Terminologies of OSPF. Types of Tables Area design and Terminology Understanding the OSPF neighbor relationships
Types of Tables
There are three types of tables used in OSPF. Neighbor Table Topology Table Routing Table
The router tracks all the neighbors which is running OSPF as a routing protocol and put that information in this table. It contains all the information about the directly connected neighbors. Like their router ID, to which network they are connected, and which network they are advertising. It will exchange routing information with routers which is in this table.
This is the one of the big difference between Distance vector and linkstate protocols. Distance vector protocol doesn’t have this topology table. They only know about the directly connected neighbors. This table is a road map for each and every single network which is available in a particular area. All the routers in a particular area will be having the same type of topology table.
This table contains all the best routes to reach a particular network. Based on the topology table it will be having multiple paths for a single destination network. It will run the SPF algorithm to find the best routes for each and every network. The algorithm places each router at the root of a tree and calculates the shortest path to each destination based on the cumulative cost required to reach that destination. Each router will have its own view of the topology even though all the routers will build a shortest path tree using the same link-state database.
OSPF’s Cost= 10000 0000/bandwith in bps
Area design and Terminology
Areas are similar to subnets in that routes & networks which can be summarized easily. The Characteristics of OSPF Area OSPF divides the network into multiple areas. Each area can contain N number of routers. All the Areas should connect to Area 0(Backbone area)
All the routers within the same area will be having the same topology table It contains one Autonomous system border system router(ASBR) While creating multiple areas in OSPF, we should create Area 0 (Backbone Area) first and then only we should create other areas. But all the areas should connect to Area 0. The routers which will be having only one SPF link database are called Internal Router (IR). The routers those which have interfaces in multiple areas are called Area Border Router (ABR). A router which connects, OSPF with other routing protocol is called as Autonomous System Border Router (ASBR). A router which is only in Area 0 or Backbone area is known as Backbone area router.
Types of Areas
There are five types of areas are there in OSPF, which is listed below Normal area Stub area Totally stub area No so stubby area Backbone area
Why we are dividing networks into multiple areas?
The goal is to localize routing updates within the same area It requires a Hierarchical design in IP address allocation. ABR & ASBR are the only two router types where we can do summarization. Let’s consider we are running a company with 100 routers. We are using OSPF as an internal routing protocol. All the routers which are
running OSPF will be having same topology of the entire network. If any link goes down at any point of network, all the routers will come to know about that link failure. Then all the routers will run SPF algorithm to find an alternative path to reach the other networks. It will take more time to converge and to calculate an alternative path if the network is large. The purpose of area is to minimize this. If we split those 100 routers into 2 areas, say Area 1 & Area 2 and each area contains 50 routers. And both the areas are connected to Area 0.In this scenario Area 1 doesn’t care any change happens in Area 2.If any link in Area 2 goes down that will be localized within Area 2.Only those which are in Area 2 need to run SPF to find the alternative path. Area 1 doesn’t care, even doesn’t know about that link failure, which occurs in Area 2. So the OSPF converges quickly. It is more processor efficient.
Understanding the OSPF neighbor relationships
Routers that share a common segment become neighbors on that segment. Neighbors are elected via the Hello protocol. Hello packets are sent periodically out of each interface using IP multicast. Routers become neighbors as soon as they see themselves listed in the neighbor's Hello packet. Two routers will not become neighbors unless they agree on the following They need to be in same Area. They need to have same Mask. Hello and Dead timers should be same on both the routers. Password should be same on both the routers, if Authentication is enabled. To discover the neighbor, OSPF will send hello packets via the OSPF enabled interface. This hello packet contains the following information. Router ID Hello and Dead timers Network Mask Area ID Router priority
DR & BDR IP address
Router ID: The router id is nothing but the router’s name in the OSPF process. Highest active interface will become router id. Loopback beats physical interface. Hello and Dead timers: OSPF exchanges Hello packets on each segment. This is a form of Keepalive used by routers to acknowledge their existence on a segment. The dead interval is the number of seconds that a router's Hello packets have not been received before its neighbors consider to be down. Hello packets are sent once in every 10 secs on Broadcast/point to point network & 30 secs on Non Broadcast Multi-Access. Adjacencies: The adjacency building process takes effect after multiple stages have been fulfilled. Routers that become adjacent will have the exact link-state database. The following is a brief summary of the states an interface passes through before becoming adjacent to another router: Down: Hello packets have been sent the router is waiting to hear the response from the routers to which it sent hello packets. Attempt: 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 Poll Interval. Init: The interface has detected a Hello packet coming from a neighbor but bi-directional communication has not yet been established. It means the router needs to acknowledge. Two-way: There is bi-directional communication with a neighbor. The router has seen its router id in the Hello packets coming from a neighbor. With this info the router will know that whether it is a new neighbor or reply from an old neighbor. At the end of this stage the DR and BDR election would be done. At the end of the 2way stage, routers will decide whether we can build an
adjacency or not. The decision is based on DR& BDR and the type of network with which is connected to. Exstart: Now routers are trying to establish the initial sequence number that is going to be used in the information exchange packets. The sequence number is used to get the most recent information. Exchange: Routers will send their whole link-state database by sending database description packets (DBD).In this stage router won’t send its entire database to its neighbors. It will send only notes of the routing table. Loading: At this state, Routers have built a link-state request list and a link-state retransmission list. Based on the DBD, if any information that looks incomplete 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. After sharing the link-state database the OSPF will start to calculate the best path for each and every network. This is the time to run the SPF algorithm. Once it finds the best path to each and every network, it will put those routes into its Routing table. Till the link which is in routing table goes down, OSPF will never run SPF.
OSPF is an Interior gateway routing protocol. It is advertising the link states rather than sending routing table on periodic intervals. Using Hierarchical routing we can split the network into smaller groups called Areas It calculates best path by placing the routers at the root of a tree based on the Cost.
CCNA4.com - Free CCNA Training & Resources