设为首页收藏本站language 语言切换
查看: 952|回复: 3
收起左侧

[分享] CCNA Lab 110: Configuring OSPF Cost Metric

[复制链接]
 成长值: 63715
发表于 2023-3-8 15:05:57 | 显示全部楼层 |阅读模式
本帖最后由 小乔 于 2023-3-8 15:12 编辑


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.
1.jpg


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
2.  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?
You can change the default cost metric value for an interface. However, you should be careful otherwise your network may misbehave if you have configured the cost metric value inappropriately. In order to change the default OSPF cost metric value, execute the following command.

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.
2.png


发表于 2023-3-17 09:21:05 | 显示全部楼层
谢谢楼主分享
沙发 2023-3-17 09:21:05 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-2-23 19:00 , Processed in 0.074026 second(s), 23 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表