You are on page 1of 4

‫‪OSPF HOMEWORK‬‬

‫اسم الطالب‪ :‬عبد الرحمن فايد الرشيدي‬


Q1:Give the main function and properties of the OSPF routing
protocol?

OSPF stands for Open Shortest Path First. It is a link-state routing protocol
that uses the Dijkstra algorithm to calculate the shortest path to all
destinations. OSPF is a hierarchical routing protocol that uses areas to group
routers together. It also uses a distributed database to store link-state
information.

Main function of OSPF:

OSPF is used to determine the best path for forwarding traffic between two
IP networks. It does this by maintaining a link-state database, which is a map
of the network topology. Each router in the OSPF network exchanges link-
state information with its neighbors. This information includes the cost of
each link, which is typically determined by the link bandwidth and delay.

Once each router has a complete link-state database, it uses the Dijkstra
algorithm to calculate the shortest path to all destinations. The shortest path
is the path with the lowest cumulative cost.

Properties of OSPF:

 Link-state routing protocol: OSPF maintains a link-state database, which is


a map of the network topology.
 Dijkstra algorithm: OSPF uses the Dijkstra algorithm to calculate the shortest
path to all destinations.
 Hierarchical routing protocol: OSPF uses areas to group routers together.
This helps to reduce the size of the link-state database and the amount of
routing information that needs to be exchanged between routers.
 Distributed database: OSPF uses a distributed database to store link-state
information. This means that each router has a copy of the link-state
database.
 Efficient routing protocol: OSPF is a very efficient routing protocol. It
converges quickly to changes in the network topology and it uses bandwidth
efficiently.
 Widely used: OSPF is widely used in both enterprise and service provider
networks.

OSPF is a powerful and versatile routing protocol. It is well-suited for a


variety of network environments, including large and complex networks.

Q2: What is the metric used by OSPF as network path cost?


The metric used by OSPF as network path cost is link cost. Link cost is
typically calculated based on the link bandwidth, with higher bandwidth
links having a lower cost. OSPF uses a reference bandwidth of 100 Mbps
to calculate link cost by default. This means that a link with a bandwidth of
1 Mbps will have a link cost of 100, while a link with a bandwidth of 1 Gbps
will have a link cost of 1.

OSPF also allows network administrators to manually configure link cost.


This can be useful for tuning OSPF's routing behavior and for prioritizing
certain links over others. For example, a network administrator might
configure a higher link cost for a WAN link than for a LAN link in order to
prefer the LAN link for local traffic.

OSPF calculates the total cost of a path by adding up the link costs of all
the links in the path. The path with the lowest total cost is considered to be
the best path.

OSPF link cost calculation formula:

Link cost = Reference bandwidth / Interface bandwidth in bps

Default OSPF reference bandwidth:

100 Mbps (10^8)

Example:

A link with a bandwidth of 1 Gbps will have a link cost of 1, calculated as


follows:
Link cost = 10^8 / 10^9 = 1

A link with a bandwidth of 1 Mbps will have a link cost of 100, calculated as
follows:

Link cost = 10^8 / 10^6 = 100

OSPF will prefer the link with the lower link cost, which is the link with the
higher bandwidth.

OSPF link cost is a powerful tool that can be used to tune OSPF's routing
behavior and to prioritize certain links over others.

You might also like