You are on page 1of 17

DYNAMIC ROUTING OSPF

Routing Protocols

Distance Vector vs. Link State Routing


With distance vector routing, each node has information only about the next hop:
   

Node A: to reach F go to B Node B: to reach F go to D Node D: to reach F go to E Node E: go directly to F

Distance vector routing makes poor routing decisions if directions are not completely correct (e.g., because a node is down).

If parts of the directions incorrect, the routing may be incorrect until the routing algorithms has re-converged.

Distance Vector vs. Link State Routing


In link state routing, each node has a complete map of the topology
A B C A B C A B C D E F D E F D E F

If a node fails, each node can calculate the new route


D
A A B C D D E F E F D E F B C A B C

Difficulty: All nodes need to have a consistent view of the network

Link State Routing: Properties


Each node requires complete topology information Link state information must be flooded to all nodes Guaranteed to converge

Link State Algorithm


Each router contains a database containing a map of the whole topology
Links Their state (including cost)

All routers have the same information All routers calculate the best path to every destination Any link state changes are flooded across the network

Global spread of local knowledge

Link State Routing


Each router Distributes LSA (Link State
Announcement/Advertisement) to other routers

Each router computes its best path to every destination On network failure
New LSAs are flooded All routers recompute routing table Only changes are propagated

LSA

X
LSA

R1

OSPF: How it works


Hello Protocol
Responsible for establishing and maintaining neighbour relationships Hello Packets sent periodically on all OSPF enabled interfaces Contains information like

Hello Interval  A list of known neighbours  Router Dead Interval




Hello

Hello

Hello

1 Flooding of link-state information

5 Routing Table 3 SPF Algorithm 2 Building a Topological Database 4 SPF Tree

OSPF: How it works


Trade Information using LSAs Each router builds an identical link state database SPF algorithm run on the database Forwarding table built from the SPF tree When change occurs:
Announce

the change to all OSPF neighbours All routers run the SPF algorithm on the revised database Install any change in the forwarding table

OSPF (Open Shortest Path First)


An interior routing protocol Dividing an AS into areas

to handle routing efficiently and in a timely manner

OSPF
Areas is a collection of networks, hosts, and routers in AS AS can be divided into many different areas. Routers inside an area flood the area with routing information. Area Border Router summarizing the information about the area and send it to other areas Backbone All of the areas inside an AS must be connected to the backbone serving as a primary area consisting of backbone routers

OSPF
Areas in an AS

OSPF Cost
Cost is the OSPF metric used in path selection Cost is based on bandwidth Default bandwidth is 1.544Mbps cost is 64 Cost can be 1 (100Mbps) to 65535 Cost is 108 bandwidth

OSPF
Advantages
Changes in an OSPF network are propagated quickly. OSPF is hierarchical, using area 0 as the top as the hierarchy. OSPF is a Link State Algorithm. OSPF supports Variable Length Subnet Masks (VLSM). 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. Using areas, OSPF networks can be logically segmented to decrease the size of routing tables. Table size can be further reduced by using route summarization. OSPF is an open standard, not related to any particular vendor.

Disadvantages
OSPF is very processor intensive. OSPF maintains multiple copies of routing information, increasing the amount of memory needed. OSPF is not as easy to learn as some other protocols. In the case where an entire network is running OSPF, and one link within it is "bouncing" every few seconds, OSPF updates would dominate the network by informing every other router every time the link changed state

Commands

R1(config)# Router OSPF 1 R1(config-router)#network net-add R1(config-router)#network 10.0.0.0 wildcard mask area area-id 0.255.255.255 area 0

R1(config-router)#network 100.0.0.0 0.255.255.255 area 0

Wildcard Mask
A wildcard mask is a mask of bits that indicates which parts of an IP address can assume any value. In the Cisco IOS, they are used in several places, for example:

To indicate the size of a network for some routing protocols, such as OSPF. To indicate what IP addresses should be permitted or denied in access control lists (ACLs).

A wildcard mask can be thought of as a subnet mask, with ones and zeros inverted For example, a wildcard mask of 0.0.0.255 corresponds to a subnet mask of 255.255.255.0.

You might also like