Alpha Centauri Studies
CoursesFor Institutions

Loading...

Alpha Centauri Studies

CSEC past papers, worked

Past papers worked question by question, and courses built on the CSEC syllabus, for students across the Caribbean.

Serving Caribbean students since 2025

Explore

CoursesAboutContact

Support

PrivacyTermsHelp

Subscribe to Our Newsletter

New papers and courses, when they land.

Connect With Us
© 2026 Alpha Centauri Studies. All rights reserved.
3.4 OSPF: how it works, and configuring it

TutorialLab 1105 min

Lab 110: Configuring OSPF Cost Metric

Lab 110: Configuring OSPF Cost Metric

In the previous exercise, we have discussed basics of the Open Shortest Path First (OSPF) protocol and how to configure OSPF routing. In this lab exercise, we will explain how the OSPF protocol decides the best (or shortest) path to a destination network and how to configure OSPF cost metric value.

The OSPF routing protocol uses the cost metric to determine the best path to a destination network. The cost metric is based on the bandwidth of interfaces. The total cost of a route is equal to the sum of all outgoing interface costs. The lowest cost is preferred to route the network traffic.

The following table lists the default OSPF cost values used by Cisco routers, which depends on the types of interface being used for a specific route.

Sr. No.Interface TypeBandwidthCost Value
1Serial56 Kbps1562
2T11.544 Mbps64
3Token Ring4 Mbps25
16 Mbps6
4Ethernet10 Mbps10
5Fast Ethernet100 Mbps1

How to calculate OSPF cost?

Now, let’s have a look how the OSPF cost metric is calculated. To calculate the OSPF cost metric of an interface, the following formula is used.

Cost = 100/ the bandwidth of the interface in Mbps

  1. For example, let’s calculate the OSPF cost metric of an Ethernet interface. We know that the bandwidth of an Ethernet interface is 10.

Cost = 100/ 10 = 10

  1. Let’s have a look at another example: how to calculate the cost of a T1 interface?

Cost = 100/ 1.544 = 64 (approximately)

Note: For the Serial interfaces, OSPF will use the configured bandwidth, measured in Kbps, to determine the cost.

How to change the default OSPF cost metric? ______

Router( config)# interface < name/ number >
Router( config-if)# ip ospf cost < cost value 1-65535 >

For example, let’s set the OSPF cost metric value for the interface Fa0/ 0 as 150. To do so, execute the following command.

Router( config)# interface Fa0/ 0
Router( config-if)# ip ospf cost 150

The following figure shows how to change the default OSPF cost metric.

A Packet Tracer IOS command line window titled Router0, whose prompt reads Router. The student enters interface Fa0/0, then ip ospf cost followed by a question mark; IOS answers with the range <1-65535> and the word Cost. The cost is then set with ip ospf cost 150 and the interface is left.

Your answers

Nothing here is marked. Most of these answers are read off your own machine, so there is no right value to compare them against; they are kept so your work survives.

Check your answersEvery question in this lab, answered. Take your own capture first.→

Source: itexamanswers.net