Cost is the metric, OSPF uses to judge a path’s feasibility. Normally to adjust cost on a route you would adjust the cost value on an interface itself. This, however, affects all routes learned via this interface.
If router learns multiple routes to a destination, 1) Router first finds longest prefix match in IP routing table to find outgoing interface. 2) AD: If these multiple routes have same subnet mask learned via different protocol on router then router chooses lowest administrative distance (AD). Example: Router R1 learned 10.1.1.0/24 prefix via OSPF as well as by RIP, router chooses OSPF route as best and install in its routing table, because OSPF (110) has lower AD value than RIP (120) 3) If these multiple routes have same subnet mask learned via same protocol on router then router chooses lowest metric between them.
For Example: Eigrp use composite “metric” and Ospf uses “Cost” for comparison.
Unlike the metric in RIP which is determined by hop count and EIGRP’s long mathematical formulated metric, OSPF is a little simpler. OSPF automatic cost calculation is an inverse function of bandwidth of an interface. As higher the bandwidth values of an interface, the lower the cost value.
For cost calculation default reference bandwidth value used is 100Mbps (10^8).
Hence By default Interface Cost= 10^8/(interface bandwidth)
This mean for 100Mbps fast Ethernet will have a cost of 1 and furthermore all interface with higher bandwidth.The result of this is that OSPF routers in the network cannot make an accurate path calculation when comparing fast Ethernet interface versus a gigabit Ethernet interface as both interfaces has a cost of 1.
In order to resolve this, the reference bandwidth value can modified to allow higher bandwidth interface to have more granular cost value.
The "auto-cost reference-bandwidth" command allows you to change the reference bandwidth that OSPF uses to calculate its metrics:
Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#router ospf 100 Router(config-router)#auto-cost reference-bandwidth 1000 % OSPF: Reference bandwidth is changed. Please ensure reference bandwidth is consistent across all routers. Router(config-router)#exit
It is important to set the same reference bandwidth on all routers throughout the OSPF domain. Recall that OSPF allows every router to calculate its own routing table based on the LSAs that they receive. So they must all agree on the relationship between costs and bandwidth. Suppose you set the reference bandwidth differently on two routers, so that they advertise different link costs for their Ethernet interfaces. This could cause seriously strange routing patterns as OSPF will try to avoid using the higher cost links. For example, that a Fast Ethernet interface on one router is faster than a Gigabit Ethernet interface on the other route.
Since the OSPF cost derives from interface bandwidth, changing the interface bandwidth value should change the cost.
Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface Ethernet0 Router(config-if)#bandwidth 10000000 Router(config-if)# exit
The other way of affecting the cost of an interface is through the "ip ospf cost" command on the interface itself, this will override the calculated cost.
You can also set the cost per neighbor using the "neighbor (neighbor-ip) cost value" command. This command is valid only on OSPF network types that allow neighbor command like point-to-multipoint non broadcast.
An email list is a list of email addresses. When a message is required to send to the list of email address, normally an autoresponder service will be used. This is a convenient way of online communication because you will not need to type in all the emai...
Looking for someone isn't always as easy as one might think. Sometimes it can be quite challenging when you really don't have anything else but their name to work with. For instance, if you had a pen pal when you were a child or a teen and you find yourse...
Got a small network with an ASA and a C2960-L switch connected to it. The switch is divided into vlans trunked to the ASA, which provides internet connectivity and DHCP. There are no other switches or firewalls that the vlans span across. However, since t...
Hello, I am looking for new VDSL modem. I am sick of crappy 20€ solutions, so I found 897. However - I am not sure about it’s max VDSL speed. There should be 35b profile (ISP sells 250 Mbps and it should be real - 250m from DSLAM).So, what is the max spee...
I want to increase the maximum available number of IP addresses that DHCP can allocate, but when I try to go beyond .149 it comes up with an error saying that "PPTP IP and SSL IP" range overlap. We do not need either of these, but I cann...